Re: [ROOT] using LoadTree with a TChain

From: Ken Bloom (kenbloom@umich.edu)
Date: Sun Jan 06 2002 - 21:56:51 MET


	OK, I think I understand what is going on now -- at least some of my 
trouble was pilot error, but not all of it, I think.  Let's take a look at 
those lines of code again:

    for (Int_t jentry=0; jentry<nentries;jentry++) {
       Int_t ientry = LoadTree(jentry); //in case of a TChain, ientry is the entry number in the current file
       nb = fChain->GetEntry(jentry);   nbytes += nb;

I didn't read that comment line carefully enough -- it says that ientry is 
the number that I want, as it will point me to the event number in the 
current file.  If I do fChain->GetEntry(ientry) instead of 
fChain->GetEntry(jentry), then all is well.

	So, maybe the skeleton code made by MakeClass should have 
GetEntry(ientry) instead of GetEntry(jentry)?  I think that's the way to go.  
Thanks for the help, best wishes.

						Ken

------------------------------------------------------------------------------
Ken Bloom, Karma Adjuster                                Department of Physics
734-763-2329 / 734-936-1817 (fax)                       University of Michigan
kenbloom@umich.edu                              http://www.umich.edu/~kenbloom



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