Re: Cloning trees with TChain: drastic performance loss

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Mon, 16 May 2011 10:46:14 -0500


Hi Alexander,

LoadTree should be most of the time 'immediate'. The behavior you describe usually indicates that some other portion of the code is directly or indirectly doing another call to LoadTree with a totally different entry number ( 0 or GetEntries()-1 are the most typical). This result is having to open the file and load the TTree object every entry (and this is a 'slow' operation).

Cheers,
Philippe.

On 5/16/11 10:41 AM, Alexander Mann wrote:
>
> Hi,
>
> I am using a slightly modified version of some standard ROOT example code from
>
> http://root.cern.ch/root/html/tutorials/tree/copytree3.C.html
>
> to skim TTrees. The main difference is that I am using TChain instead of TTree, and therefore I am using
>
> Long64_t ientry = collChain->LoadTree(jentry);
> collChain->GetEntry(ientry);
>
> This works fine, but after ~500 events (which is probably all from the first file in the TChain) the speed abruptly decreases from
> about 27 events/s to 0.05 events/s, spent in equal parts in LoadTree and GetEntry as it seems.
>
> Is there something I can do about this?
>
> cu,
> Alexander
>
Received on Mon May 16 2011 - 17:46:21 CEST

This archive was generated by hypermail 2.2.0 : Mon May 16 2011 - 23:50:01 CEST