Re: TTree::AutoSave()

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 30 May 2007 12:59:13 +0200


It looks like your Tree has a small number of entries and all entries fit in memory in the branch buffers,
or more entries but with very large buffer sizes. I can tell you more if you send the result of TTree::Print.
Note that, in general, it is a very bad idea to have many Trees in the same file. It is more efficient
to have one single Tree with more branches.

Rene Brun

Tom Roberts wrote:
> When I use TTree::Autosave() on a tree in a TFile, I get two copies of
> the TTree as expected (different versions), but the file is roughly
> twice as large. As I am making files that are quite large, doubling
> their size is not acceptable. Note my TFile contains many TTree-s, and
> I call AutoSave() on all of them every N events (N=100000 by default).
>
> Is there any other way to "checkpoint" the output file so if the
> generating program crashes I can still recover most of the data that
> was written to the .root file, without doubling the size of the file?
>
> In a related question: how does TFile::Flush() relate to such
> "checkpoints"? My guess is that partly filled buffers of the TTree are
> not written to disk, and for consistency this really needs to happen
> at the TTree level, not the TFile level.
>
>
> Tom Roberts
Received on Wed May 30 2007 - 12:59:19 CEST

This archive was generated by hypermail 2.2.0 : Wed May 30 2007 - 23:50:02 CEST