Re: splitlevel = 1

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 02 1998 - 14:33:41 MEST


Piergiorgio Cerello wrote:
> 
> Dear Rooters,
> 
> I'm trying to automatically split a Tree with the option Splitlevel.
> The code runs, but I get an empty file as output... so, I'm wrong
> somewhere. Please help me to understand where! Here is the code:
> 
>    TTree *hdtt = new TTree("F","FINUDA HDT tree");
>    hdtt->SetAutoSave(10000000);  // autosave when 10 Mbytes written
> 
> ....
> 
>    TFndHdt *fndhdt;
>    TBranch *b=0;
>    Int_t bsize = 64000;
>    Int_t split = 1;
>    if (b)
>      b->SetAddress(fndhdt);
>    else
>      b = hdtt->Branch("fndhdt","TFndHdt",&fndhdt,bsize,split);
> 
> ........   (the fndhdt object is built)
> 
>    hdtt->Fill();    // within a loop on events
> 
> ........
> 
>    hdtt->Write();   //  every 250 events and at end of run
> 
> Thanks in advance,
>        

 Piergiorgio,
To answer your mail, I need a bit more info. Where do you create
the object pointed by fndhdt?

Look at $ROOTSYS/test/Event for an example.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:34 MET