Re: Question about TTree->GetEntry()

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 9 Nov 2011 15:14:00 -0600


Hi,

The number returned by GetEntry is the uncompressed size of the data while the size of the file is the sum of the compressed data size. So it is expected that the size/rate seen as from GetEntry should be higher than the one as seen from the file size(/file system). However a factor of 125 times higher is still a bit high ....

Cheers,
Philippe.

On 11/9/11 11:44 AM, Dimitri Bourilkov wrote:
> Hi,
>
> root 5.22 on SLC5
>
> The documentation about TTree says:
>
> Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0)
>
> The function returns the number of bytes read from the input buffer.
>
> When I loop on a 7 GB file with 250k events, a tree with many branches, it takes ~ 3600 s, so the read rate is ~ 2 MB/s. As I am
> reading from a remote source, this rate is confirmed by the Ganglia plot for the network traffic. So far so good.
>
> Now if I look at the output from the root code (generated with MakeClass, snippet below) for nb (bytes per event) and nbytes, I
> get a rate which is 125 times higher?!
>
> Can someone comment on the output from GetEntry.
>
> Thanks, Dimitri
>
>
> Long64_t nentries = fChain->GetEntriesFast();
>
> Long64_t nbytes = 0, nb = 0;
> for (Long64_t jentry=0; jentry<nentries;jentry++) {
> Long64_t ientry = LoadTree(jentry);
> if (ientry < 0) break;
> nb = fChain->GetEntry(jentry); nbytes += nb;
> // if (Cut(ientry) < 0) continue;
> if(jentry-int(jentry/ifreq)*ifreq == 0) {
> cout << "Event, bytes = " << jentry << ", " << nb << endl;
> }
> }
>
> cout << "N entries, Nbytes = " << nentries << ", " << nbytes << endl;
Received on Wed Nov 09 2011 - 22:14:12 CET

This archive was generated by hypermail 2.2.0 : Wed Nov 09 2011 - 23:50:02 CET