Reading variable amount of data from disk using PROOF

Hello,
I am trying to read different amount of data (from disk) per event from a given input root file using proof framework (TSelector). I have a given input root file with following description

“”"
Number of events = 11638
Number of branches = 382
Number of leaves = 382

Total size of all branches (in MB) 36.67 (compressed) 132.40(uncompressed)
Toal size of all branches (in KB)/event 3.23 (compressed) 11.65 (uncompressed)

“”"

For reading 3.23 KB/event of data per event from disk, the analysis framework reads all the branches from the input root file. My next goal is to read 6.46 KB of data per event from disk. In order to achieve it, I would have to read two times all the branches from the input root file provided that second reading of all branches read from disk( but, not from memory). In order to implement it, I modified the 'Init(TTree*) method of my analysis class in following way


// Set branch addresses and branch pointers
if (!tree) return;

// ntimes = 200, arbirtary value
TTree* atree[ntimes];
TFile* afile[ntimes];

const char* treeName = “recoTree/DiMuonTree” ;

//Initialize the tree
for (int j = 0; j <= ntimes; ++j){
atree[j] = new TTree();
afile[j] = tree->GetCurrentFile();

}

//Populate the tree, ntimesp1 = 1
for (int j = 0; j <= ntimesp1; ++j){
atree[j] = dynamic_cast< TTree* >( afile[j]->Get(treeName));
fChain[j] = atree[j];

// fChain[j] = tree;
fChain[j]->SetMakeClass(1);
}


and in “Process” method, branches are being read from “fChain[j]”. But, the above method reads same amount of data from disk for all the cases. It seems to me the content of input file has also been cached to memory. Is there any smart way to achieve it ? The analysis file can be found in following folder on lxplus

cd /afs/cern.ch/user/j/jha/public/CMS/Proof/RootTalk
root -b -q Analysis.C

Then I am using ‘sar’ utility to monitor cpu and disk I/O.

Thanks,
Manoj

This is issue has been followed and solved (at least suggestions given) on the roottalk@cern.ch list.

G. Ganis

Forgot the link: groups.cern.ch/group/roottalk/d … 3BF0CDA2A4