Re: [ROOT] tchain and makeclass

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Aug 22 2002 - 22:16:54 MEST


Hi Roy,

Currentlty TTree::MakeClass does not read entries at all.
The min/max count for each array of a branch is stored in the branch
header itself. Doing what you propose would imply reading the
Tree/Branch headers from all the files. Could be done.
Any volunteer to implement this logic ?

Rene Brun



On Thu, 22 Aug 2002, Roy Lee wrote:

> Hi,
> 
> I noticed a problem when calling the MakeClass() method for a TChain when
> a tree contains TClonesArray objects.  Here are the command I issue:
> 
>   TChain reco("reco");
>   reco->Add("eventsr1.root");
>   reco->Add("eventsr2.root");
>   reco->MakeClass();
> 
> If I look in the output file reco.h, I see at the top:
> 
> //////////////////////////////////////////////////////////
> //   This class has been automatically generated
> //     (Thu Aug 22 11:49:49 2002 by ROOT version3.03/06)
> //   from TChain reco/
> //////////////////////////////////////////////////////////
> 
> 
> #ifndef reco_h
> #define reco_h
> 
> #include <TROOT.h>
> #include <TChain.h>
> #include <TFile.h>
>    const Int_t kMaxvetodgt = 104;
>    const Int_t kMaxstp = 2200;
>    const Int_t kMaxslc = 1;
>    const Int_t kMaxtrk = 3;
>    const Int_t kMaxshw = 1;
>    const Int_t kMaxevt = 2;
> 
> These kMax* variables define the maximum number of entries each
> TClonesArray object contains.  What I noticed is that these maximums seem
> to be valid only for the first tree added in the chain.  In other words,
> if kMaxvetodgt is 200 for eventsr2.root/reco, it totally ignores that and
> puts the value for eventsr1.root/reco (since it was the first tree to be
> added).
> 
> Is this an intended feature?  It seems logical to have these kMax* values
> calculated over all trees added to a chain.
> 
> Roy
> 
> ------------------------------------------------------------------------------
> Roy Lee / rlee@physics.harvard.edu / Department of Physics, Harvard University
> 



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