Re: loading all chain to the memory

From: <bandurin_at_fnal.gov>
Date: Thu, 11 Aug 2005 18:39:56 -0500

In addition to my prev. email below.
It turned out that, after processing of the first file is finished, the cycle starts again from the first event of same (first) file! How to make it move to the second file?

thanks a lot,
Dmitry

>
> Hello,
>
> I am using the following code to create the chain of two files:
> --------------------------------------------------------------------
> --------------------------------------------
> TChain * chain = new TChain("TMBTree",""); // do not modify this
> line // Point here your root-tuples. Wildcards are allowded:
> TString FilesToRead1 = "./1_new.root";
> TString FilesToRead2 = "./2_new.root";
> Int_t fnum1 = chain->Add(FilesToRead1);
> Int_t fnum2 = chain->Add(FilesToRead2);
> int nb_read = chain->GetEntry(0);
> cout << endl << nb_read <<" bytes read" << endl;
> TTree *tree = (TTree*)chain->GetTree()->CloneTree(0);
> --------------------------------------------------------------------
> --------------------------------------------
>
> But I have faced with the following problem.
> When I do a cycle over all entries (250+250 in my case)
> the program works fast just for 250 entries from the first file.
> Starting from the second (Event number 251), it seems to load to
> the memory entry by entry
> and execution becomes much slower.
>
> How to speed up the execution ? Perhaps one needs to load a larger
> portion of entries
> (may be equal to the number of entries in each file)?
>
> thanks,
> Dmitry
>
>
>
Received on Fri Aug 12 2005 - 01:40:03 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET