Re: split parameter for TTree

Rene Brun (Rene.Brun@cern.ch)
Wed, 29 Oct 1997 15:34:55 +0100


Christoph Borgmeier wrote:
>
> Hello,
>
> as I understand it, the function
>
> TBranch* TTree::Branch(const Text_t *name, const Text_t *classname,
> void* addobj, Int_t bufsize=32000,
> Int_t splitlevel=1);
>
> takes a pointer to an object derived from TObject (with correct Streamer
> functions). I have written an example similar to the famous Event example,
> where the Track class has two ThreeVector members. The event class has a
> pointer to an TClonesArray.
>
> If I call the function above with splitlevel=1, the tracks in the file are
> completely flattened, i.e. the ThreeVectors are not visible any more and
> one of them is not easyly accessable, because its member names are
> shadowed by the other.
>
> This type of splitting seems to be a property of
>
> TBranch* TTree::Branch(const Text_t *name, TClonesArray *list,
> Int_t bufsize=32000, Int_t splitlevel=1);
>
> Is there the possibility of making branches in a TClonesArray by hand?

The automatic split algorithm in case of TClonesArray was not able
so far to split subobjects in the objects of the TClonesArray.
It was trivial to add this possibility. The new feature is part
of our development version 1.03/07 to appear in the coming days.
Rene Brun