Re: [ROOT] splitting TClonesArray on TTree

From: Susan Kasahara (schubert@physics.umn.edu)
Date: Mon Dec 02 2002 - 06:07:14 MET


Thank you Rene! I find that it does indeed work.
-Sue

Rene Brun wrote:

> Hi Sue,
>
> I have extended TBranchElement to support this case.
> Code is now in CVS.
>
> Rene Brun
>
> On Sat, 21 Sep 2002, Susan Kasahara wrote:
>
> > Hi rooters,
> > I have a question regarding TTree branch splitting & TClonesArrays.
> >
> > I have a class with a datamember that is a pointer to a TClonesArray:
> > class Event: public TObject {
> >     ...
> >    private:
> >       TClonesArray* array;  // stores objects of type Track
> > };
> >
> > When I store objects of class Event on a ROOT TTree in splitmode = 99, e.g.
> >    TTree* tree = new TTree("test","test tree");
> >    Event* event = 0;
> >    tree -> Branch("Event","Event",&event,64000,99);
> >
> > I find that the datamembers of the Tracks stored in the TClonesArray
> > are split over multiple branches in the TTree as is desirable.
> >
> > Now, when I create a class that derives from Event, e.g.:
> >
> > class SpecialEvent: public Event {
> >     ...
> > };
> >
> > and store objects of class SpecialEvent on a ROOT TTree in splitmode = 99,
> > I find that the datamembers of the Tracks stored in the base class Event's TClonesArray are no
> > longer split over multiple branches.
> > Is there a way to request that the base class TClonesArray be split or is there
> > a reason for this limitation?
> > I am using root cvs 9/15/02 on rh linux using gcc 2.95.3.
> > Thanks in advance,
> > -Sue
> >
> >



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