[ROOT] tchain and makeclass

From: Roy Lee (rlee@heplaxp5.harvard.edu)
Date: Thu Aug 22 2002 - 22:04:02 MEST


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