[ROOT] branch / tree splitlevel issue

From: Axel Naumann (axel@fnal.gov)
Date: Thu Mar 20 2003 - 20:15:42 MET


Hi,

I've been trying to reproduce this problem for ages now - today I 
succeeded. Attached you'll find two simple classes. They're stored in a 
tree which only has one event, and which is written to file. (.x 
test.cxx++, don't forget to gSystem->Load("libPhysics") first). Later, 
we test for consistency reading this tree back (.x read.cxx++).

When setting the splitlevel via the TTree c'tor everything works fine. 
When setting the splitlevel via the TTree::Branch(const char *name, void 
*clonesaddress, Int_t bufsize, Int_t splitlevel) argument instead (not 
setting it via the TTree c'tor), some elements (xyz of the jet) come out 
as 0 when reading back, another (M) differs from the written value.

So TTree::TBranch(const char *name, void *clonesaddress, Int_t bufsize, 
Int_t splitlevel) seems to be broken, at least with splitlevel==99, when 
not explicitly setting the tree splitlevel. Or I misunderstood how it's 
supposed to work; in that case a clarification in the doc about 
"branch's splitlevel can't be higher than tree's splitlevel" or 
something alike would be helpful.

Cheers, Axel.

last week's cvs, gcc 3.1, linux
Disclaimer: The example is not meant to be good c++. Instead, it is 
meant to illustrate a possible problem with ROOT. A real program should 
have tests for 0 pointers etc.





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