Data rate when reading a file

When reading a root file (particularly a remote file) are there some means to check the data rate?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Maybe using TTreeCache information, like TTreeCache::Print()

And see also TFileCacheRead::Print()

I am trying TTreeCache::Print()

I see the printout

******TreeCache statistics for tree: Delphes in file: root://eosuser.cern.ch//eos.../filename.root ******

but the rest of the information (cache efficiency, …) is missing. Do I need to provide some option?

@pcanal can give more information, but I guess it depends what you read from the file.

According to the doc you pointed, this method has two possible options.
Just try them …

I have tried three different options:

no option
"a"
"cachedbranches"

All yield the same (incomplete) result:

******TreeCache statistics for tree: Delphes in file: root://eosuser.cern.ch//eos/....root ******

Do you access a tree in the file?

yes via TChain::LoadTree()

Then I don’t know. Maybe @pcanal has an idea

Did you connect the TTreePerfStats to the tree, i.e. something like

TTreePerfStats *ps = new TTreePerfStats("ioperf", tree);

There is an example in the documentation.

yes via TChain::LoadTree()

Note that LoadTree is “only” changing the cursor inside the chain. The only actual reading from file it would do is to read the meta-data (i.e. the TTree object itself) when the cursor is moved from one file to another. You would need to call GetEntry (on the TTree or one or more of the branches to actuall download the data).

The result/printout you saw from the TTreeCache print is indicative that the TTreeCache has not yet been trained nor used. (i.e. It is caching zero branches for now). Once it is trained and some data has been read, it will report only on the efficiency of the cache itself (i.e. whether or not the right set of branches is being cached for the actual read) and will not report on the read speed/data rate.

The read speed/data rate is provide through the TTreePerfStats that Jakob pointed to.
And, of course :), this utility will also report only of the data read and thus will have information only after GetEntry has been called.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.