Re: [ROOT] Problems with TSelector

From: Konstantin Olchanski (olchansk@sam.triumf.ca)
Date: Fri Jan 02 2004 - 05:34:08 MET


On Fri, Dec 19, 2003 at 10:12:41AM +0100, Rene Brun wrote:
> In the ProcessFill function, you should call GetEntry for
> the current Tree in the chain, not for the chain itself.

Wrong-----> fChain->GetEntry(entry);
Correct---> fChain->GetTree()->GetEntry(entry);

I confirm that the above fixes my problem with severe slowdown
when processing chained trees (except for the very first tree).

It is surprising that the two statements yeld the same results but
have dramatically different performance.

I suggest that this is at least a usability bug that should be corrected:

- it is a mistake that is too easy to make (TTree->MakeSelector() no longer
  adds the "correct" code to the class template),
- it is hard to catch- the difference only shows up after the first tree,
  and I only test the scripts on the first few hundred events of the first
  tree,
- it is a performance bug- the program yelds the correct answer, but takes
  much longer to run, for no obvious reason.

-- 
Konstantin Olchanski
Data Acquisition Systems: The Bytes Must Flow!
Email: olchansk-at-triumf-dot-ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET