Question about TTree->GetEntry()

From: Dimitri Bourilkov <Dimitri.Bourilkov_at_cern.ch>
Date: Wed, 9 Nov 2011 12:44:24 -0500


Hi,

      root 5.22 on SLC5

      The documentation about TTree says:

Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0)

<http://root.cern.ch/root/html522/ListOfTypes.html#Int_t>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 - 18:44:33 CET

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