Re: Storing pointers to objects in TClonesArrays

Nick West (n.west1@physics.oxford.ac.uk)
Mon, 21 Dec 1998 13:56:35 GMT


Hi Rene,

thanks for:-

> This cannot work with TClonesArray, but works with a normal
> TObjArray.
> The logic, however, could be implemented in TClonesArray too.
> I believe that having a TClonesArray supporting references
> is much better.

Please can I confirm that I understand what you are telling me: Currently we
cannot do I/O with pointers to objects held in TClonesArray? References sound
like a good idea but what if the relationship expressed is dynamic? Put it
another way: suppose I have an Event with 2 TClonesArray objects, one filled
with Track objects and the other Vertex objects. Further suppose that I want to
link these together, but I want to be able to make and break links throughout
the lifetime of these objects. Is there currently anyway to do this except by
using the TClonesArray indices?

Cheers

Nick.