Number of read calls in TTreePerfStat with TRFIOFile


When I use TTreePerfStat to analyze the I/O pattern of my analysis job, I noticed that if reading via RFIO protocol (the TRFIOFile is used instead of TFile), I always get “4” read calls recorded in the TTreePerfStat object. The number stays at “4” from the first tree entry to the end.

The file is about 1 GBytes and I am using ROOT 5.28/00g

Therefore I tried to look into the code of TRFIOFile and notice that the ReadBuffers method in which the “fByteRead” and “fReadCalls” are increased every time the data is read, the “fReadCalls” does not look to be increased properly. Hereafter is the snippet of the TRFIOFile code around line 284:

fBytesRead += k;
#ifdef WIN32
SetFileBytesRead(GetFileBytesRead() + k);
SetFileReadCalls(GetFileReadCalls() + 1);
fgBytesRead += k;

It’s just my suspicious so I’m not 100% sure if this is really the problem causing the fixed number of “4” read calls when using TRFIOFile.

I am also curious about why it’s started from “4” instead of “0”.

Thank you for your help.

Cheers, Hurng


You are right. This has been corrected in the trunk and in the patch branches for v5.32 and v5.34. The number 4 must be the number of call to ReadBuffer (without the s).