Re: Problem with Tree Filling

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 29 Apr 2009 09:24:12 -0500


Hi,

Make sure that the HSr* are initialized (to the max expected value) before you create the StripID_R* branches.

Cheers,
Philippe.

vito palladino wrote:
> Hi,
>
> I'm using the root release 5.22/00 and I want fill a tree with branch
> of variable length.
> So in my code I define a branch:
>
> Tree->Branch( "NHittedStrips", NHittedStrips,
> "HSr0/I:HSr1:HSr2:HSr3:HSr4:HSr5:HSr6:HSr7:HSr8:HSr9:HSr10:HSr11" );
>
> and after I define the other branches:
>
> Int_t** StripID = new Int_t*[NOfRings];
> for(Int_t RingID=0; RingID<NOfRings; RingID++) {
> ANTI0_Tree->Branch( Form("StripID_R%d",RingID),
> StripID[RingID], Form("SidR%d[HSr%d]/I",RingID) );
> }
>
> After, in the code, I allocate each StripID[i] and fill it. I print
> the matrix in order to understand if it is correctly filled.
> But when I want access to the event I found that the Branches
> dimentions are correc but the values are completly random.
>
> Can someone help me?
> Thanks
> Vito
>
>
Received on Wed Apr 29 2009 - 16:24:19 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 29 2009 - 23:50:02 CEST