ATLAS Offline Software
main_benchmark.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 
8 #include "TH1I.h"
9 #include "LWHists/TH1I_LW.h"
10 #include "TH1F.h"
11 #include "LWHists/TH1F_LW.h"
12 #include "TH1D.h"
13 #include "LWHists/TH1D_LW.h"
14 #include "TH2F.h"
15 #include "LWHists/TH2F_LW.h"
16 #include "TH2D.h"
17 #include "LWHists/TH2D_LW.h"
18 #include "TH2I.h"
19 #include "LWHists/TH2I_LW.h"
20 #include "TProfile.h"
21 #include "LWHists/TProfile_LW.h"
22 #include "TProfile2D.h"
23 #include "LWHists/TProfile2D_LW.h"
24 #include "TRandom3.h"
25 
26 #include <iostream>
27 #include <sstream>
28 #include <ctime>
29 #include <climits>
30 #include <cstdlib>
31 
33 {
34  FILE* file = fopen("/proc/self/status", "r");
35  if (!file) {
36  std::cerr << "ERROR: Could not open /proc/self/stat"<<std::endl;
37  return -1;
38  };
39  long long result = -1;
40  char line[128];
41  while (fgets(line, 128, file) != NULL){
42  if (strncmp(line, "VmSize:", 7) == 0) {
43  std::stringstream s(&(line[7]));
44  s >> result;
45  break;
46  }
47  }
48  fclose(file);
49  return result;
50 }
51 
52 inline double vmemUsedMB()
53 {
54  return thisProcess_VirtualMemUsed_kB()/1024.0;
55 }
56 
57 template <class T> std::string histClassName() { return "unknown"; }
58 template <> std::string histClassName<TH1I>() { return "TH1I"; }
59 template <> std::string histClassName<TH1I_LW>() { return "TH1I_LW"; }
60 template <> std::string histClassName<TH1F>() { return "TH1F"; }
61 template <> std::string histClassName<TH1F_LW>() { return "TH1F_LW"; }
62 template <> std::string histClassName<TH1D>() { return "TH1D"; }
63 template <> std::string histClassName<TH1D_LW>() { return "TH1D_LW"; }
64 template <> std::string histClassName<TH2I>() { return "TH2I"; }
65 template <> std::string histClassName<TH2I_LW>() { return "TH2I_LW"; }
66 template <> std::string histClassName<TH2F>() { return "TH2F"; }
67 template <> std::string histClassName<TH2F_LW>() { return "TH2F_LW"; }
68 template <> std::string histClassName<TH2D>() { return "TH2D"; }
69 template <> std::string histClassName<TH2D_LW>() { return "TH2D_LW"; }
70 template <> std::string histClassName<TProfile>() { return "TProfile"; }
71 template <> std::string histClassName<TProfile_LW>() { return "TProfile_LW"; }
72 template <> std::string histClassName<TProfile2D>() { return "TProfile2D"; }
73 template <> std::string histClassName<TProfile2D_LW>() { return "TProfile2D_LW"; }
74 
75 struct Timer
76 {
77  Timer() : m_time_clock (clock()) {}
78  double end(const std::string& text,
79  const unsigned& n,
80  const unsigned estimatedOverheadToDiscount = 0)
81  {
82  double t((clock()-m_time_clock-estimatedOverheadToDiscount)*(1./double(CLOCKS_PER_SEC))*1.0e6/n);
83  std::cout<<" Timed ["<<text<<"]: "<<t<<" microsecond"<<std::endl;
84  return t;
85  }
86 
88 };
89 
90 struct MemCheck
91 {
93  double end (const std::string& text, const unsigned& n, const double& extra=0.0)
94  {
95  double m(extra+double(thisProcess_VirtualMemUsed_kB()-m_lastMemNKB)*double(1024.0)/n);
96  std::cout<<" Mem-usage ["<<text<<"]: "<<m<<" bytes"<<std::endl;
97  return m;
98  }
99 
100  long long m_lastMemNKB;
101 };
102 
103 double getRandX(TRandom& rand) { return rand.Gaus(50.0,12.5); }
104 
105 // double getRandX() { return 102.0*(rand()*1.0/RAND_MAX)-1.0; }
106 
107 template <class T> void fillX(TRandom& rand, T*t) { t->Fill(getRandX(rand)); }
108 template <class T> void fillXW(TRandom& rand, T*t) { t->Fill(getRandX(rand),1.2); }
109 template <> void fillX(TRandom& rand, TH2F*t) { t->Fill(getRandX(rand),15.0); }
110 template <> void fillX(TRandom& rand, TH2D*t) { t->Fill(getRandX(rand),15.0); }
111 template <> void fillX(TRandom& rand, TH2I*t) { t->Fill(getRandX(rand),15.0); }
112 template <> void fillX(TRandom& rand, TH2F_LW*t) { t->Fill(getRandX(rand),15.0); }
113 template <> void fillX(TRandom& rand, TH2D_LW*t) { t->Fill(getRandX(rand),15.0); }
114 template <> void fillX(TRandom& rand, TH2I_LW*t) { t->Fill(getRandX(rand),15.0); }
115 template <> void fillX(TRandom& rand, TProfile*t) { t->Fill(getRandX(rand),15.0); }
116 template <> void fillX(TRandom& rand, TProfile_LW*t) { t->Fill(getRandX(rand),15.0); }
117 template <> void fillX(TRandom& rand, TProfile2D*t) { t->Fill(getRandX(rand),getRandX(rand),15.0); }
118 template <> void fillX(TRandom& rand, TProfile2D_LW*t) { t->Fill(getRandX(rand),getRandX(rand),15.0); }
119 template <> void fillXW(TRandom& rand, TH2F*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
120 template <> void fillXW(TRandom& rand, TH2D*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
121 template <> void fillXW(TRandom& rand, TH2I*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
122 template <> void fillXW(TRandom& rand, TH2F_LW*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
123 template <> void fillXW(TRandom& rand, TH2D_LW*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
124 template <> void fillXW(TRandom& rand, TH2I_LW*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
125 template <> void fillXW(TRandom& rand, TProfile*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
126 template <> void fillXW(TRandom& rand, TProfile_LW*t) { t->Fill(getRandX(rand),getRandX(rand),1.2); }
127 template <> void fillXW(TRandom& rand, TProfile2D*t) { t->Fill(getRandX(rand),getRandX(rand),15.0,1.2); }
128 template <> void fillXW(TRandom& rand, TProfile2D_LW*t) { t->Fill(getRandX(rand),getRandX(rand),15.0,1.2); }
129 
130 template <class T> void fakeFillRandGen(TRandom& rand) { getRandX(rand); }
131 template <> void fakeFillRandGen<TH2F>(TRandom& rand) { getRandX(rand);getRandX(rand); }
132 template <> void fakeFillRandGen<TH2D>(TRandom& rand) { getRandX(rand);getRandX(rand); }
133 template <> void fakeFillRandGen<TH2I>(TRandom& rand) { getRandX(rand);getRandX(rand); }
134 template <> void fakeFillRandGen<TH2F_LW>(TRandom& rand) { getRandX(rand);getRandX(rand); }
135 template <> void fakeFillRandGen<TH2D_LW>(TRandom& rand) { getRandX(rand);getRandX(rand); }
136 template <> void fakeFillRandGen<TH2I_LW>(TRandom& rand) { getRandX(rand);getRandX(rand); }
137 
138 template <class T> T* book(const std::string& n, const std::string& t, unsigned nbins)
139 {T*h=new T(n.c_str(),t.c_str(),nbins,0.0,100.0);
140  h->Sumw2();//TODO monitor sumw2!!
141  return h; }
142 
143 
144 template <> TH1F_LW* book(const std::string& n, const std::string& t, unsigned nbins)
145 { return TH1F_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0); }
146 template <> TH1D_LW* book(const std::string& n, const std::string& t, unsigned nbins)
147 { return TH1D_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0); }
148 template <> TH1I_LW* book(const std::string& n, const std::string& t, unsigned nbins)
149 { return TH1I_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0); }
150 template <> TProfile_LW* book(const std::string& n, const std::string& t, unsigned nbins)
151 { return TProfile_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0); }
152 template <> TH2F_LW* book(const std::string& n, const std::string& t, unsigned nbins)
153 { return TH2F_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
154 template <> TH2D_LW* book(const std::string& n, const std::string& t, unsigned nbins)
155 { return TH2D_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
156 template <> TH2I_LW* book(const std::string& n, const std::string& t, unsigned nbins)
157 { return TH2I_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
158 template <> TH2F* book(const std::string& n, const std::string& t, unsigned nbins)
159 { return new TH2F(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
160 template <> TH2D* book(const std::string& n, const std::string& t, unsigned nbins)
161 { return new TH2D(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
162 template <> TH2I* book(const std::string& n, const std::string& t, unsigned nbins)
163 { return new TH2I(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
164 template <> TProfile2D* book(const std::string& n, const std::string& t, unsigned nbins)
165 { return new TProfile2D(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
166 template <> TProfile2D_LW* book(const std::string& n, const std::string& t, unsigned nbins)
167 { return TProfile2D_LW::create(n.c_str(),t.c_str(),nbins,0.0,100.0,nbins,0.0,100.0); }
168 
169 template <class T> void triggerConversion(T*) { /*ROOT classes*/ }
170 template <> void triggerConversion(TH1F_LW* h) { h->getROOTHist(); }
171 template <> void triggerConversion(TH1D_LW* h) { h->getROOTHist(); }
172 template <> void triggerConversion(TH1I_LW* h) { h->getROOTHist(); }
173 template <> void triggerConversion(TH2F_LW* h) { h->getROOTHist(); }
174 template <> void triggerConversion(TH2D_LW* h) { h->getROOTHist(); }
175 template <> void triggerConversion(TH2I_LW* h) { h->getROOTHist(); }
176 template <> void triggerConversion(TProfile_LW* h) { h->getROOTHist(); }
177 template <> void triggerConversion(TProfile2D_LW* h) { h->getROOTHist(); }
178 
179 template <class T> bool isROOT() { return true; }
180 template <> bool isROOT<TH1F_LW>() { return false; }
181 template <> bool isROOT<TH1D_LW>() { return false; }
182 template <> bool isROOT<TH1I_LW>() { return false; }
183 template <> bool isROOT<TH2F_LW>() { return false; }
184 template <> bool isROOT<TH2D_LW>() { return false; }
185 template <> bool isROOT<TH2I_LW>() { return false; }
186 template <> bool isROOT<TProfile_LW>() { return false; }
187 template <> bool isROOT<TProfile2D_LW>() { return false; }
188 
189 template <class T> void safeDelete(T*h)
190 {
191  if (isROOT<T>()) {
192  delete dynamic_cast<TH1*>(h);
193  } else {
194  LWHist::safeDelete(reinterpret_cast<LWHist*>(h));
195  }
196 }
197 
198 template <class T>
199 int performBenchmark( TRandom& rand,
200  const unsigned nhists,
201  const unsigned nbins,
202  const int nfills /*<0 for fill(x,w)*/)
203 {
204 
205  std::vector<std::pair<std::string,T*> > hists(nhists);
206  typename std::vector<std::pair<std::string,T*> >::iterator it,itE (hists.end());
207  for (unsigned i = 0; i < nhists; ++i) {
208  std::ostringstream s;
209  s << "some_hist_"<<i;
210  hists.at(i)=std::pair<std::string,T*>(s.str(),0);
211  }
212 
213  //First we book:
214  std::string title("This is some title");
215  it=hists.begin();
216  MemCheck m1;
217  Timer t1;
218  for (;it!=itE;++it)
219  it->second = book<T>(it->first,title,nbins);
220  t1.end(histClassName<T>()+" booking",nhists);
221  double mem_booked = m1.end("Booked size ["+histClassName<T>()+"]",hists.size());
222 
223  if (!isROOT<T>())
224  std::cout<<"Pool wastage: "<<LWHistControls::poolWasteFraction()*100.0<<" %"<<std::endl;
225 
226  const unsigned nrandfills = (nfills<0?-nfills:nfills);
227 
228  //Estimate overhead of random filling (looping & random number generation):
229  const long clock1 = clock();
230  it=hists.begin();
231  for (;it!=itE;++it)
232  for (unsigned i = 0; i < nrandfills; ++i)
233  fakeFillRandGen<T>(rand);
234  const long loopandrandgenoverhead(clock()-clock1);
235 
236  if (nfills!=0) {
237  MemCheck m2;
238 
239 
240  //Time random fills:
241  it=hists.begin();
242  Timer t2;
243  if (nfills<0) {
244  for (;it!=itE;++it)
245  for (unsigned i = 0; i < nrandfills; ++i)
246  fillXW(rand, it->second);
247  t2.end(histClassName<T>()+" average time of random fills (Fill(x,w))",nhists*nrandfills,loopandrandgenoverhead);
248  } else {
249  for (;it!=itE;++it)
250  for (unsigned i = 0; i < nrandfills; ++i)
251  fillX(rand, it->second);
252  t2.end(histClassName<T>()+" average time of random fills (Fill(x))",nhists*nrandfills,loopandrandgenoverhead);
253  }
254 
255  m2.end("Size after random fills ["+histClassName<T>()+"]",hists.size(),mem_booked);
256 
257  if (!isROOT<T>())
258  std::cout<<"Pool wastage: "<<LWHistControls::poolWasteFraction()*100.0<<" %"<<std::endl;
259  }
260  if (!isROOT<T>()) {
261  //Fixme: Perform conversion benchmarks!
262 
263  it=hists.begin();
264  long base_t0(clock());
265  for (;it!=itE;++it)
266  it->second->GetName();
267  long base_t1(clock());
268 
269  it = hists.begin();
270  long actual_t0(clock());
271  for (;it!=itE;++it)
272  triggerConversion(it->second);
273  long actual_t1(clock());
274  std::cout<<"Conversion took "<<((actual_t1-actual_t0)-(base_t1-base_t0))/(double(CLOCKS_PER_SEC)*hists.size())*1.0e3<<" ms/hist"<<std::endl;
275  }
276 
277  //For valgrind we also delete the histograms again:
278  it=hists.begin();
279  for (;it!=itE;++it) {
280  safeDelete(it->second);
281  }
282 
284  //Magic report triggering lines in case librootspy.so is preloaded:
285  TH1F * hreport = new TH1F("rootspy","",1,0,1);
286  hreport->Fill("rootspy_producereport",0.123456);
287  delete hreport;
288  return 0;
289 }
290 
291 int usage (const std::string& progname)
292 {
293  std::cout << "Usage:\n\n "
294  << progname << " [float|double|int|profile] [1d|2d] [root|lw|lwrb] [nbins] [nfills] [nhists]\n\n"
295  << " float|double|int|profile : type of histogram (e.g. TH1F vs. TH1D vs. TH1I vs. TProfile)\n\n"
296  << " 1d|2d : Dimension of histogram (e.g. TH1F vs. TH2F)\n\n"
297  << " 'root': benchmark cpu/vmem usage of booking & filling root hists\n"
298  << " 'lw': benchmark cpu/vmem usage of booking & filling lw hists + conversion lw->root\n\n"
299  << " 'lwrb': benchmark cpu/vmem usage of booking & filling lw hists using a root backend\n\n"
300  << " nbins : Number of histogram bins (in both dimensions for 2D hists)\n\n"
301  << " nfills : Number of fills per histogram (put <0 for fill(x,w) rather than fill(x))\n\n"
302  << " nhists : Number of histograms to use for test"
303  << std::endl;
304  return 1;
305 }
306 int main (int argc, char** argv) {
307  std::string progname=argv[0];
308  if (argc!=7)
309  return usage(progname);
310  const int nbins = atoi(argv[4]);
311  const int nfills = atoi(argv[5]);
312  const int nhists = atoi(argv[6]);
313  if (nbins<1||nbins>USHRT_MAX-1||nhists<1||nhists>1000000)
314  return usage(progname);
315 
316  std::string valtype(argv[1]),dim(argv[2]),histimpl(argv[3]);
317  if (histimpl=="lwrb") {
318  histimpl = "lw";
320  std::cout<<"Using ROOT backend for LW histograms."<<std::endl;
321  }
322 
323  TRandom3 rand(117);
324 
325  if (valtype=="float"&&dim=="1d"&&histimpl=="lw")
326  return performBenchmark<TH1F_LW> (rand, nhists,nbins,nfills);
327  if (valtype=="double"&&dim=="1d"&&histimpl=="lw")
328  return performBenchmark<TH1D_LW> (rand, nhists,nbins,nfills);
329  if (valtype=="int"&&dim=="1d"&&histimpl=="lw")
330  return performBenchmark<TH1I_LW> (rand, nhists,nbins,nfills);
331  if (valtype=="profile"&&dim=="1d"&&histimpl=="lw")
332  return performBenchmark<TProfile_LW> (rand, nhists,nbins,nfills);
333  if (valtype=="float"&&dim=="1d"&&histimpl=="root")
334  return performBenchmark<TH1F> (rand, nhists,nbins,nfills);
335  if (valtype=="double"&&dim=="1d"&&histimpl=="root")
336  return performBenchmark<TH1D> (rand, nhists,nbins,nfills);
337  if (valtype=="int"&&dim=="1d"&&histimpl=="root")
338  return performBenchmark<TH1I> (rand, nhists,nbins,nfills);
339  if (valtype=="profile"&&dim=="1d"&&histimpl=="root")
340  return performBenchmark<TProfile> (rand, nhists,nbins,nfills);
341 
342  if (valtype=="float"&&dim=="2d"&&histimpl=="lw")
343  return performBenchmark<TH2F_LW> (rand, nhists,nbins,nfills);
344  if (valtype=="double"&&dim=="2d"&&histimpl=="lw")
345  return performBenchmark<TH2D_LW> (rand, nhists,nbins,nfills);
346  if (valtype=="int"&&dim=="2d"&&histimpl=="lw")
347  return performBenchmark<TH2I_LW> (rand, nhists,nbins,nfills);
348  if (valtype=="profile"&&dim=="2d"&&histimpl=="lw")
349  return performBenchmark<TProfile2D_LW> (rand, nhists,nbins,nfills);
350  if (valtype=="float"&&dim=="2d"&&histimpl=="root")
351  return performBenchmark<TH2F> (rand, nhists,nbins,nfills);
352  if (valtype=="double"&&dim=="2d"&&histimpl=="root")
353  return performBenchmark<TH2D> (rand, nhists,nbins,nfills);
354  if (valtype=="int"&&dim=="2d"&&histimpl=="root")
355  return performBenchmark<TH2I> (rand, nhists,nbins,nfills);
356  if (valtype=="profile"&&dim=="2d"&&histimpl=="root")
357  return performBenchmark<TProfile2D> (rand, nhists,nbins,nfills);
358 
359  return usage(progname);
360 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Timer
Definition: main_benchmark.cxx:76
LWHist
Definition: LWHist.h:26
performBenchmark
int performBenchmark(TRandom &rand, const unsigned nhists, const unsigned nbins, const int nfills)
Definition: main_benchmark.cxx:199
extractSporadic.nhists
nhists
Definition: extractSporadic.py:111
TH1F_LW.h
fakeFillRandGen< TH2D >
void fakeFillRandGen< TH2D >(TRandom &rand)
Definition: main_benchmark.cxx:132
TH2F_LW.h
checkFileSG.line
line
Definition: checkFileSG.py:75
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
fakeFillRandGen< TH2F_LW >
void fakeFillRandGen< TH2F_LW >(TRandom &rand)
Definition: main_benchmark.cxx:134
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TH1D_LW::create
static TH1D_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup)
Definition: TH1D_LW.cxx:33
histClassName< TH2D_LW >
std::string histClassName< TH2D_LW >()
Definition: main_benchmark.cxx:69
histClassName< TH2F_LW >
std::string histClassName< TH2F_LW >()
Definition: main_benchmark.cxx:67
main
int main(int argc, char **argv)
Definition: main_benchmark.cxx:306
TH1F_LW::create
static TH1F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup)
Definition: TH1F_LW.cxx:33
TH2F
Definition: rootspy.cxx:420
TH1D_LW.h
TH2D_LW.h
histClassName< TH2I >
std::string histClassName< TH2I >()
Definition: main_benchmark.cxx:64
histClassName< TProfile >
std::string histClassName< TProfile >()
Definition: main_benchmark.cxx:70
triggerConversion
void triggerConversion(T *)
Definition: main_benchmark.cxx:169
ALFA_EventTPCnv_Dict::t1
std::vector< ALFA_RawDataCollection_p1 > t1
Definition: ALFA_EventTPCnvDict.h:43
TH1I_LW
Definition: TH1I_LW.h:23
histClassName
std::string histClassName()
Definition: main_benchmark.cxx:57
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TProfile2D
Definition: rootspy.cxx:531
TH1I_LW::create
static TH1I_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup)
Definition: TH1I_LW.cxx:33
fillXW
void fillXW(TRandom &rand, T *t)
Definition: main_benchmark.cxx:108
histClassName< TProfile2D_LW >
std::string histClassName< TProfile2D_LW >()
Definition: main_benchmark.cxx:73
isROOT< TH2F_LW >
bool isROOT< TH2F_LW >()
Definition: main_benchmark.cxx:183
MemCheck::end
double end(const std::string &text, const unsigned &n, const double &extra=0.0)
Definition: main_benchmark.cxx:93
TH1D_LW
Definition: TH1D_LW.h:23
TProfile_LW.h
fakeFillRandGen< TH2I_LW >
void fakeFillRandGen< TH2I_LW >(TRandom &rand)
Definition: main_benchmark.cxx:136
histClassName< TH1F >
std::string histClassName< TH1F >()
Definition: main_benchmark.cxx:60
LArCellConditions.argv
argv
Definition: LArCellConditions.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TProfile2D_LW::create
static TProfile2D_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup, unsigned nbinsy, const double &ylow, const double &yup, const char *option=" ")
Definition: TProfile2D_LW.cxx:32
fakeFillRandGen< TH2F >
void fakeFillRandGen< TH2F >(TRandom &rand)
Definition: main_benchmark.cxx:131
TProfile_LW
Definition: TProfile_LW.h:24
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
TruthTest.itE
itE
Definition: TruthTest.py:25
Timer::end
double end(const std::string &text, const unsigned &n, const unsigned estimatedOverheadToDiscount=0)
Definition: main_benchmark.cxx:78
histClassName< TH1I_LW >
std::string histClassName< TH1I_LW >()
Definition: main_benchmark.cxx:59
Timer::Timer
Timer()
Definition: main_benchmark.cxx:77
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
isROOT< TH2I_LW >
bool isROOT< TH2I_LW >()
Definition: main_benchmark.cxx:185
histClassName< TH1I >
std::string histClassName< TH1I >()
Definition: main_benchmark.cxx:58
TH1F_LW
Definition: TH1F_LW.h:23
getRandX
double getRandX(TRandom &rand)
Definition: main_benchmark.cxx:103
MemCheck::m_lastMemNKB
long long m_lastMemNKB
Definition: main_benchmark.cxx:100
python.changerun.m1
m1
Definition: changerun.py:32
fakeFillRandGen
void fakeFillRandGen(TRandom &rand)
Definition: main_benchmark.cxx:130
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
MemCheck::MemCheck
MemCheck()
Definition: main_benchmark.cxx:92
thisProcess_VirtualMemUsed_kB
long long thisProcess_VirtualMemUsed_kB()
Definition: main_benchmark.cxx:32
book
T * book(const std::string &n, const std::string &t, unsigned nbins)
Definition: main_benchmark.cxx:138
TProfile_LW::create
static TProfile_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup, const char *option=" ")
Definition: TProfile_LW.cxx:32
lumiFormat.i
int i
Definition: lumiFormat.py:92
isROOT< TProfile2D_LW >
bool isROOT< TProfile2D_LW >()
Definition: main_benchmark.cxx:187
TH2I_LW::create
static TH2I_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xmin, const double &xmax, unsigned nbinsy, const double &ymin, const double &ymax)
Definition: TH2I_LW.cxx:33
beamspotman.n
n
Definition: beamspotman.py:731
extractSporadic.h
list h
Definition: extractSporadic.py:97
TH2I
Definition: rootspy.cxx:410
TH1I_LW.h
covarianceTool.title
title
Definition: covarianceTool.py:542
TH2I_LW.h
LWHistControls::setROOTBackend
static void setROOTBackend(bool)
Definition: LWHistControls.cxx:53
file
TFile * file
Definition: tile_monitor.h:29
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
fillX
void fillX(TRandom &rand, T *t)
Definition: main_benchmark.cxx:107
TH2D
Definition: rootspy.cxx:430
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
histClassName< TProfile2D >
std::string histClassName< TProfile2D >()
Definition: main_benchmark.cxx:72
isROOT< TH1F_LW >
bool isROOT< TH1F_LW >()
Definition: main_benchmark.cxx:180
python.handimod.extra
int extra
Definition: handimod.py:522
histClassName< TProfile_LW >
std::string histClassName< TProfile_LW >()
Definition: main_benchmark.cxx:71
TH2I_LW
Definition: TH2I_LW.h:23
LWHistControls::releaseAllHeldMemory
static void releaseAllHeldMemory()
Definition: LWHistControls.cxx:41
histClassName< TH2F >
std::string histClassName< TH2F >()
Definition: main_benchmark.cxx:66
TH2F_LW::create
static TH2F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xmin, const double &xmax, unsigned nbinsy, const double &ymin, const double &ymax)
Definition: TH2F_LW.cxx:33
TProfile2D_LW.h
TProfile
Definition: rootspy.cxx:515
fakeFillRandGen< TH2D_LW >
void fakeFillRandGen< TH2D_LW >(TRandom &rand)
Definition: main_benchmark.cxx:135
TH2D_LW
Definition: TH2D_LW.h:23
TProfile2D_LW
Definition: TProfile2D_LW.h:24
usage
int usage(const std::string &progname)
Definition: main_benchmark.cxx:291
LWHist::safeDelete
static void safeDelete(LWHist *)
Definition: LWHist.cxx:30
LWHistControls::poolWasteFraction
static double poolWasteFraction()
Definition: LWHistControls.cxx:77
ALFA_EventTPCnv_Dict::t2
std::vector< ALFA_RawDataContainer_p1 > t2
Definition: ALFA_EventTPCnvDict.h:44
isROOT< TH2D_LW >
bool isROOT< TH2D_LW >()
Definition: main_benchmark.cxx:184
h
TH1F
Definition: rootspy.cxx:320
fakeFillRandGen< TH2I >
void fakeFillRandGen< TH2I >(TRandom &rand)
Definition: main_benchmark.cxx:133
TH1
Definition: rootspy.cxx:268
MemCheck
Definition: main_benchmark.cxx:91
isROOT< TH1I_LW >
bool isROOT< TH1I_LW >()
Definition: main_benchmark.cxx:182
histClassName< TH1D >
std::string histClassName< TH1D >()
Definition: main_benchmark.cxx:62
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
histClassName< TH1F_LW >
std::string histClassName< TH1F_LW >()
Definition: main_benchmark.cxx:61
histClassName< TH2D >
std::string histClassName< TH2D >()
Definition: main_benchmark.cxx:68
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
safeDelete
void safeDelete(T *h)
Definition: main_benchmark.cxx:189
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
TH2F_LW
Definition: TH2F_LW.h:23
LWHistControls.h
histClassName< TH2I_LW >
std::string histClassName< TH2I_LW >()
Definition: main_benchmark.cxx:65
isROOT< TProfile_LW >
bool isROOT< TProfile_LW >()
Definition: main_benchmark.cxx:186
vmemUsedMB
double vmemUsedMB()
Definition: main_benchmark.cxx:52
histClassName< TH1D_LW >
std::string histClassName< TH1D_LW >()
Definition: main_benchmark.cxx:63
isROOT< TH1D_LW >
bool isROOT< TH1D_LW >()
Definition: main_benchmark.cxx:181
TH2D_LW::create
static TH2D_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xmin, const double &xmax, unsigned nbinsy, const double &ymin, const double &ymax)
Definition: TH2D_LW.cxx:33
Timer::m_time_clock
long m_time_clock
Definition: main_benchmark.cxx:87
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
isROOT
bool isROOT()
Definition: main_benchmark.cxx:179