Hi rooters
I'm having memory issues when trying to add weight information to a histogram. I book the histogram:
TH1F* ht = new TH1F("ht","title;x;y",100, xlow,xhigh);
and fill it with information from a tree:
tree->Draw("X>>ht","(getMap(NUM))*(" + cuts + ")");
where X and NUM are branches in the tree, 'cuts' is a TString containing some cuts to be applied, getMap is a function that I have defined to get values from 'theMap':
map<Int_t,Double_t> theMap;
double getMap(Int_t &);
//main body of program here
double getMap(Int_t & evNum){
return theMap[evNum];
}
I am filling the histogram repeatedly in a loop (24k iterations). With the weight information, after approximately 600 iterations, the memory usage begins increasing steadily until the program freezes. When I fill the histogram in the same way without the weight information, tree->Draw("X>>ht","cuts"); , I don't (appear to) have any problem.
I've tried using ROOT versions 5.26.00 and 5.28.00.
Thanks in advance
Chris Received on Tue Jan 18 2011 - 14:42:28 CET
This archive was generated by hypermail 2.2.0 : Tue Jan 18 2011 - 17:50:01 CET