Created
July 14, 2020 08:46
-
-
Save dpiparo/6edae0f6096636ad07815c6cbc60b2f6 to your computer and use it in GitHub Desktop.
Reproduce Memory higher memory usage in 6.20 and 6.22 when reading trees
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void memory() | |
| { | |
| ProcInfo_t info; | |
| gSystem->GetProcInfo(&info); | |
| printf(" res memory = %g Mbytes\n",info.fMemResident/1024.); | |
| } | |
| int repro3() { | |
| auto infiles = { | |
| "/eos/cms/store/user/srimanob/hlttdr/CMSSW_11_1_0/DQM/step1_WithValidation_inDQM_18.root", | |
| "/eos/cms/store/user/srimanob/hlttdr/CMSSW_11_1_0/DQM/step1_WithValidation_inDQM_19.root"}; | |
| for (auto tname : {"TH1Fs","TH2Fs"}) { | |
| for (auto infile : infiles) { | |
| auto tf = TFile::Open(infile); | |
| std::cout << "Reading " << tname << " from " << tf->GetName() << "\n"; | |
| auto m_tree = tf->Get<TTree>(tname); | |
| int max = m_tree->GetEntries(); | |
| for (int i = 0; i < max; i++) { m_tree->GetEntry(i);} | |
| memory(); | |
| } | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment