static TClonesArrays

From: Alessandro Thea <Alessandro.Thea_at_ge.infn.it>
Date: Thu, 10 Feb 2005 14:26:17 +0100


Hi rooters,
up to now I've worked with an event bases on the Event example available with root, in particular it uses a static TClonesArray as suggested in many other posts.
Now I would like, or let's say that I need the capability to have multiple copies of my event and to to that I'm thinking to remove the static attribute of the TClonesArray.
The problem is that I do not understand where and how much my code would be slowed down.
The basic structure I use is the following:

{

    Event* ev = 0;
    TTree *t= new TTree("...");
    t->Branch("Event",&ev);
    for(Int_t i(0); i<nMaxEv; i+) {

       /*
          Fill Event... and the TClonesArray
       */
       t->Fill();
       ev->Clear() // calls TClonesArray::Clear(), not Delete
    }
    // writing tree, closing file and so on }

Thanks in advance for any suggestion,
Alessandro Received on Thu Feb 10 2005 - 14:28:24 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET