Re: [ROOT] Huge file full of TBaskets

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 08 2002 - 08:43:43 MET


Hi Dan,

A TTree is an object with a header (always in memory) and a list of TBaskets for
each branch. When a TBasket is full, it is dumped to the file.
The TBaskets are not visible in TBrowser but are via TFile::Map.

If the resulting file is really "thousands of times" bigger than what you
expect,
I would suspect an error in your logic filling the tree.
If you do not find it, please provide more info, such as the result
of TTree::Print after all fills.

Rene Brun


dandwyer@socrates.Berkeley.EDU wrote:
> 
> Hi,
> 
> I'm having a problem with a huge file full of TBaskets.  I am
> processing a Tree (t1), and creating a smaller copy (fewer entries) of
> it with some averaged data.  I use the CloneTree(0) command to create
> an initially empty tree (t2), and slowly fill it with processed data
> from the original tree.  Once I am done, I write this smaller tree to
> a file (f1) by having it call t2->Write().  The problem is that the
> file I save it in not only has the tree, but a few hundred TBasket
> objects as well (which you can see by calling f1->Map(), but which are
> not visible in the TBrowser).  I do not call Write at any other point
> in the program.  The TBaskets cause my file to be thousands of times
> larger than the tree I am trying to save.  Why are these objects being
> saved in the file?
> 
> Thanks,
> Dan



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET