Hi Bernhard,
Bernhard Ketzer wrote:
>
> Hi all,
>
> I am trying to create a tree with several nested branches, like
>
> Event -> Plane -> Hit -> Position, Amplitude, etc.
>
> For the last level ("Hit") I understand from the examples in the
> Event/Track classes that I can use a TClonesArray with automatic
> branching, while for the higher levels I have to use TObjArrays and
> create every branch by hand.
>
True, You must call TTree::Branch for each "Plane" TClonesArray of hits.
Typically one does that in a loop.
You can also use the function:
Int_t TTree::Branch(TList *list, Int_t bufsize)
where list can be a list of "Planes"
I could also add a variant with TObjArrays.
You can also look at a slightly different example "ATLFast" at:
http://root.cern.ch/root/Atlfast.html
Rene Brun
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:35 MET