Re: [ROOT] branch / tree splitlevel issue

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 07 2003 - 17:11:44 MEST


Hi Axel,

Sorry for being late with this problem. I finally found some time
to investigate it. It was effectively a problem with your class setup
and I have fixed this case in the current version in CVS.
Thanks for providing this simple test case.

Rene Brun

Axel Naumann wrote:
> 
> 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.
> 
>   --------------------------------------------------------------------------------
>                         Name: splitlevel.tar.bz
>    splitlevel.tar.bz    Type: unspecified type (application/octet-stream)
>                     Encoding: base64



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