On Mon, 01 Jul 2002 23:35:10 +0200
Bernhard KETZER <Bernhard.Ketzer@cern.ch> wrote
concerning "[ROOT] TClonesArray / TRefArray ":
> Hi Rooters!
>
> I am trying to create a tree that contains as subbranches two
> TClonesArrays, say *Tracks and *Hits, where Hits contains all hits in
> the detectors, and tracks contains all tracks found (similar to the
> Event example).
>
> Now I would like that each track keeps a reference to its hits. I was
> trying to add a TRefArray of *Hits to each track, which seems ok when I
> am creating the tree. Reading back the tree, however, I get segmentation
> violations. Is it possible at all to nest TClonesArrays and TRefArrays
> in a tree, or did I miss something else?
See if [1] is of any help to you. In example the class `TFwLine' has
a `TRefArray*' to `TFwPoints'. It seems to work for me.
Yours,
____ | Christian Holm Christensen
|_| | -------------------------------------------------------------
| | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91
_| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91
_| Denmark Office: (+45) 353 25 305
____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm
| |
[1] http://cholm.home.cern.ch/cholm/root/#rootfw
> Thanks for your help,
>
> Bernhard
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:58 MET