[ROOT] TClonesArray and MakeClass

From: Antonio Sidoti (antonio.sidoti@pi.infn.it)
Date: Thu Nov 07 2002 - 19:50:24 MET


Dear Rooters,
I have a root file with several branches made by TClonesArray with 
something like:

MyTree = new TTree("MyTree","MyTree");
an_evt = new TClonesArray("evt");
MyTree->Branch("evt",&an_evt,32000,2);
an_ele = new TClonesArray("ele");
MyTree->Branch("ele",&an_ele,32000,2);    

and ele is made for example by something like
class ele: public TObject{
float energy;
float phi;
float theta;
float et;
ClassDef(ele,1); 
};
The problem is that when I run the MakeClass method on a root file 
produced by such an exectuable, the variables in the .hh of the skeleton 
are present  both as variables and as TBranch. e.g.
 Float_t         ele[maxele];
 Float_t         ele_energy[maxele];
   Float_t         ele_et[maxele];  
   Float_t         ele_phi[maxele];   
   Float_t         ele_theta[maxele];  
//...
TBranch        *b_ele_;
TBranch        *b_ele_energy;
TBranch        *b_ele_et;
TBranch        *b_ele_phi;
TBranch        *b_ele_theta;

with the corresponding commands in the Notify and Init methods.

Is this normal? Will I loose speed in analysis with respect of the case 
where only the ele TBranch is instantiated and the variables included 
there are 
only defined as variables? If there is a performance decrease, what is the 
solution to avoid that?

Thanks a lot,
Cheers
Antonio

-------------------------------------------------------------
           sidoti   antonio: PostDoc(AdR) - University Pisa and INFN
           e-mail:  antonio.sidoti@pi.infn.it 
                    sidoti@fnal.gov
           www:     http://higgs.tn.infn.it/~sidoti/
           Tel:     +39 + 050 880 456 
           Fax:     +39 + 050 880 317-318
-------------------------------------------------------------
"A program is a device used to convert data into error messages."



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