Re: Question about TTree->GetEntry()

From: Dimitri Bourilkov <Dimitri.Bourilkov_at_cern.ch>
Date: Wed, 9 Nov 2011 16:56:21 -0500


Hi Philippe,

      Thanks, I see. This is a test file, probably the number of branches not filled for each event (and easy to compress) is higher than average.

      As a user, I would be way more interested to get the "real" number of bytes flowing from the source to my application, not the "uncompressed" one. Or, as in rsync, I wouldn't mind getting both, but just the latter is not so useful in many cases.

      Cheers,
      Dimitri

On 11/09/2011 04:14 PM, Philippe Canal wrote:
> 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:56:31 CET

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