Hi Rooters,
I have some trouble with chains - I do the following:
1. I have used h2root to make a set of rootfile from ntuples. There are
1436 files. I have used MakeClass to make a class for the tree in the
rootfiles. The main of the tree is h1. The name of the class is myclass.
2. In a standalone program, I want to go through as many files as I can
using chains. So I do
TChain mychain("h1");
mychain.Add("file1.root");
mychain.Add("file2.root");
.
.
Double_t nevent=mychain.GetEntries();
TTree* mytree=mychain.GetTree();
myclass *event=new myclass();
mychain.SetBranchAddress("b_eventno",&event); /* Note: b_eventno is */
/*branch in tree */
for(int i=0;i<nevent;i++)
{
mychain.GetEvent(i,1);
.
.
.
}
The correct data does not show up in event. what am I doing wrong?
Two more general questions:
1. MakeClass seems to put every array from the cwm in it's own branch. do
I need to do a SetBranchAddress for each one? Is there another way to do
MakeClass?
2. What is the ultimate limit to the number of files/events in a chain? I
have 1436 files with 150 events.
thank you all for you time an effort answering questions. It really makes
root work.
Peter Fisher
MIT
Peter Fisher Office
617-253-8561
Professor of Physics Fax 617-253-4100
44-118 MIT email fisherp@mit.edu
Cambridge, MA, 02139
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET