[ROOT] Splitting eterogeneous arrays

From: Stefano Bagnasco (bagnasco@to.infn.it)
Date: Tue Mar 19 2002 - 13:47:16 MET


Hi Rooters,

suppose I have an event class holding a set (a list, array, TClonesArray
or whatever) of objects representing particles, let's call the
AbsParticles. AbsParticle is an abstract class, holding some basic
obvious information (masses, momenta, etc); what I use actually are
concrete classes that inherit from it, adding extra functionalities and
data members; for example, a PiZero class would hold pointers to two
Photon objects, where both PiZero and Photon inherit from AbsParticle.
So the list in a k->3Pi0 event, for example, contains 6 Photons and 3
PiZeros.
The point is: how can I get all the objects split in branches in the
output tree, so that I can nicely browse them? A TClonesArray wouldn't
do, since the objects are not clones. A TObjArray cannot be split. Or
can it? Any hint?

Thanks, 

Stefano
-- 
+---------------------------------------+
|           Stefano Bagnasco            |
|   I.N.F.N. and University of Torino   |
+---------------------------------------+
|        Home:   +39.011.819.6991       |
|        Office: +39.011.670.7340       |
|        GSM:    +39.348.1868717        |
|  bagnasco@to.infn.it sbagnasco@iol.it |
+---------------------------------------+



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:46 MET