Re: [ROOT] branches within branches

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Sep 05 2003 - 17:34:49 MEST


Hi Charles,

You can do this in principle, using TBranchElement::Branch.
Note that 2 levels branches are automatically created when using
a TClonesArray (and soon STL vectors and list).
See also TFolder and TTree::Branch(const char* folder,..)

However, we try to discourage people doing multi-level branches for other cases
to avoid a fragmentation of the data base.

Rene Brun

Charles Leggett wrote:
> 
> Is it possible to manually create a subbranch of a branch within a tree?
> ie, a structure like:
> 
>                 tree
>                 /  \
>                /    \
>           branch1    branch2
>            /  \         /  \
>           /    \       /    \
>         b1.1    b1.2  b2.1   b2.2
>         /\       /\    /\     /\
>        leafs
> 
> I couldn't figure out how to do this from the docs.
> 
>                         thanks...       Charles.
> 
> --
> +---------------------------------------------------------------------+
> | Charles Leggett                |         CGLeggett@lbl.gov          |
> | Lawrence Berkeley National Lab |        HCG / NERSC : Atlas         |
> | 1 Cyclotron Road, MS 50B-3238  |                                    |
> | Berkeley, CA 94720             | Eagles may soar, but weasels don't |
> | (510) 495-2930  room: 50B-3201 |    get sucked into jet engines.    |
> +------------------- http://annwm.lbl.gov/~leggett -------------------+



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