Hi Stefano, There are two different things -browsing a TTree -browsing one event In your case, I assume that you want to browse a TTree (nothing to change) For a particular event (do a tree.GetEntry(i)) and browse your event structure. By default all ROOT collections are browsable. You can browse your own objects/collections if you implement the Browse function (assuming your objects derive from TObject) and implement the function IsFolder returning kTRUE for collections or objects that contain sub-objects. See examples in ROOT classes such as TDirectory, TNode, etc Rene Brun Stefano Bagnasco wrote: > > 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