I know that one can enable asynchronous file prefetching in ROOT with
Is it possible to enable asynchronous prefetching only when reading a specific file or only
when reading a particular tree?
It seems it is a global setting only. @pcanal might tell you more.
Hi @couet, @pcanal
looking at the code it seems I could add a field
TTree and a setter method
SetCacheAsyncPrefetching(Bool_t), which could be called by the user before they start reading tree entries.
Then, whenever the
TTree creates a new
TTree will communicate to the cache the
TTree:: fEnableAsyncPrefetch variable (through
TTreeCache's constructor or
This will make it easy to enable async prefetching per TTree and per
TFile (maybe TFile will need a similar member variable).
A use case for this feature would be when a program reads multiple ROOT files and async prefetching would be advantageous for some the files only.
Shall I give it a go with a pull request?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
tree->GetReadCache(tree->GetCurrentFile(), true) -> SetEnablePrefetching();
already accomplish what you need?