I have problem in reading multiple files having same tree name.
I would like to read three root files, each consist of 20 thousand event and total of 60000 event.
when I used ch->Add(“filename1”)
but it is reading only first file and start plotting the histograms, not reading the event from next two files.
I am using fchain to get entries in the loop.
That’s odd. When I do anything like this I use:
TChain * myChain = new TChain("TreeName");
for (Int_t i=0;i<(Int_t)myChain->GetEntries();i++)
//here is the code that does something with each entry in a loop
Please make sure you’re doing the same thing!
[quote]I am using fchain to get entries in the loop.[/quote]Which loop and using with value. Most likely your are passing to fChain->GetEntry( value ), a value that must be passed to fChain->GetTree()->GetEntry( value ) … (because it is the entry number within the local tree rather than the entry number within the chain).