Re: Unexpected TTree cycle numbers

From: Brett Viren <bv_at_bnl.gov>
Date: Tue, 27 Apr 2010 10:19:55 -0400


Rene Brun <Rene.Brun_at_cern.ch> writes:

> When AutoSave is called, the current buffers are flushed and the
> current version of the TTree header written to the file. I am not sure
> what you mean by "Both trees hold identical data". The Tree header
> contains only the metadata describing the Tree, not the data
> itself. If your Tree headers are identical, it means that you save it
> twice.

Sorry for not being clear. What I mean is that I can browse the tree through each cycle I see in the TBrowser and click on selected quantities and the resulting plots are identical.

There is one other pathology here. If I browse, say, ";3" and then try to browse ";4" ROOT goes into a loop of producing SegV's. I can restart ROOT and reverse the order and get the same results. This isn't a problem for us as our I/O layer only considers the first tree of a given name that it encounters.

So, if I understand you correctly, I probably only have duplicated Tree headers and not duplicated all the Tree data itself.

> A typical scenario reproducing this case is when doing
> tree.Write()
> file.Write()

I am calling TTree::Write() for each tree in the file and finally TFile::Close() followed by deleting the TFile object.

Thanks,
-Brett.

Received on Tue Apr 27 2010 - 16:20:02 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 27 2010 - 17:50:01 CEST