Hi Fred,
You can either modify the constructor of the generated class.
to contains something along the line (this comes from a MakeClass generated
from a TChain):
TChain * chain = new TChain("treename","");
chain->Add("file.root");
tree = chain;
Or you can do it before instantiate the object and passed as a parameter:
TChain * chain = new TChain("treename","");
chain->Add("file.root");
MadeByMakeClass m(chain);
m.Loop();
Cheers,
Philippe.
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Fred Sarazin
Sent: Friday, September 27, 2002 5:44 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] TChain after a TTree::MakeClass() call ?
Hello,
I generated a class with TTree::MakeClass().
If I want the Loop() method to inspect trees of same
structure located in different files, where do I declare
the TChain and its elements and how do I relate
it to TTree *fChain ?
Thanks,
Fred
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:11 MET