8 #include "TDirectory.h"
65 Int_t lastElement =
fTime.size()-1;
67 fTime.at(lastElement-1) );
83 TList* histoList =
new TList();
91 Int_t entries =
fTime.size();
92 Double_t timePeriod =
fTime.back()-
fTime.front();
94 TH1F* ResidentMemoryVsEvent =
new TH1F(
"ResidentMemoryVsEvent",
"Resident Memory as function of Eventnumber;Event;Memory [MB]",entries, 0, entries);
95 TH1F* VirtualMemoryVsEvent =
new TH1F(
"VirtualMemoryVsEvent",
"Virtual Memory as function of Eventnumber;Event;Memory [MB]",entries, 0, entries);
96 TH1F* ResidentMemoryVsTime =
new TH1F(
"ResidentMemoryVsTime",
"Resident memory as function of Runtime;Time [s];Memory [MB]",(Int_t)(timePeriod*10), 0, (Int_t)timePeriod);
97 TH1F* VirtualMemoryVsTime =
new TH1F(
"VirtualMemoryVsTime",
"Virtual memory as function of Runtime;Time [s];Memory [MB]",(Int_t)(timePeriod*10), 0, (Int_t)timePeriod);
98 TH1F* EventtimeVsEvent =
new TH1F(
"EventtimeVsEvent",
"Runtime per Event as function of Event number;Event;Time [s]",entries-1, 1, entries);
100 std::vector<Double_t> timeDiffSorted(
fTimeDiff);
101 std::vector<Double_t>::iterator
it;
102 std::sort(timeDiffSorted.begin(), timeDiffSorted.end());
104 Double_t minTime = timeDiffSorted.front();
105 Double_t maxTime = timeDiffSorted.back();
106 timePeriod = maxTime - minTime;
108 TH1F* TimePerEvent =
new TH1F(
"TimePerEvent",
"Runtime;Time [s];Events",(Int_t)((timePeriod+20)*10), (Int_t)minTime-10, (Int_t)maxTime+10);
111 std::vector<Long_t>::iterator lit;
112 Double_t timeOffset =
fTime.front()+1.;
114 ResidentMemoryVsEvent->Fill(counter, *lit);
115 ResidentMemoryVsTime->Fill(
fTime.at(counter)-timeOffset, *lit);
118 histoList->AddLast(ResidentMemoryVsEvent);
119 histoList->AddLast(ResidentMemoryVsTime);
123 VirtualMemoryVsEvent->Fill(counter, *lit);
124 VirtualMemoryVsTime->Fill(
fTime.at(counter)-timeOffset, *lit);
127 histoList->AddLast(VirtualMemoryVsEvent);
128 histoList->AddLast(VirtualMemoryVsTime);
132 TimePerEvent->Fill(*it);
133 EventtimeVsEvent->Fill(counter, *it);
136 histoList->AddLast(TimePerEvent);
137 histoList->AddLast(EventtimeVsEvent);
150 TFile* oldfile = gFile;
152 TString directory = gFile->GetName();
155 Ssiz_t posLastSlash = directory.Last(
'/');
156 directory.Remove(posLastSlash+1, directory.Length()-posLastSlash-1);
158 if ( directory.EndsWith(
"/") ) {
159 filename += directory;
163 directory = gFile->GetName();
166 posLastSlash = directory.Last(
'/');
167 directory.Remove(0, posLastSlash+1);
168 directory.ReplaceAll(
".root",
"");
174 Int_t
pid = gSystem->GetPid();
175 filename +=
"FairRunInfo_";
176 filename += directory;
181 TFile* f1 =
new TFile(filename,
"recreate");
184 TIterator* listIter=histoList->MakeIterator();
187 while((obj=listIter->Next())) {
204 TIterator* listIter=histoList->MakeIterator();
207 while((obj=listIter->Next())) {