Re: [ROOT] naive question on tree saving

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Feb 26 2003 - 17:28:23 MET


Hi Sylvie,

I do not understand this problem. TTree::AutoSave (the function called
by TTree::Fill) is correctly setting the directory for the output file.
You should not set the directory yourself before calling Fill. This would slow
down substantially the filling.

Please give me more information and a snapshot of the relevant code.
Please mention also the version that you are using.

Rene Brun

Sylvie Dagoret-Campagne wrote:
> 
> Hello rootalk people,
> 
>  I would ask a naive question about 2 trees handling, one at input, one
> at the output.
>  I have a program which read a huge root tree from an input file and write
> a huge root tree in an output file.
> 
>  I want to do a regular backup in an event loop.
> 
>  If I activate the SetAutosave() function of the output tree
>  the Fill function of the output tree cannot save partially  the output tree
> in output file. A error is generated because Root want to write in the
> input file even if I do "outputfile->cd()" before calling "outputtree->Fill()".
> 
>  For the moment I only have the solution to do inside the event loop
> 
>  outputfile->cd()
>  outputtree->Fill()
>  outputtree->Write()
> 
>  This may generate a too large output file ?
> 
>  Could you tell me how to switch to the proper Root file.
> 
> Best regards !
> 
>                 Sylvie Dagoret-Campagne
> 
> 
> --
> ==============================================================================
> 
> Sylvie Dagoret-Campagne         | e-mail: dagoret@lpnhep.in2p3.fr,
> LPNHE, Universite Paris VI-VII  | Sylvie.Dagoret-Campagne@lpnhep.in2p3.fr
> 4, Place Jussieu Tour 33, Rdc   | Telephone (33) 01 44 27 73 30
> 75252 PARIS CEDEX 05 - FRANCE   | Fax       (33) 01 44 27 46 38
>                                 | Standard  (33) 01 44 27 63 13
> 
> My web page is at http://lpnhe-auger.in2p3.fr/Sylvie/WWW/HOME/index.html
> ==============================================================================



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET