g4tools  5.4.0
h2plot
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_sg_h2plot
5 #define tools_sg_h2plot
6 
7 // Connexion inlib/histo to sg/plotter.
8 
9 // Inheritance :
10 #include "plottables"
11 
12 #include "../histo/h1d"
13 #include "../histo/h2d"
14 #include "../histo/p1d"
15 #include "../histo/p2d"
16 
17 #include "../words"
18 #include "../num2s"
19 
20 #ifdef TOOLS_MEM
21 #include "../mem"
22 #endif
23 
24 namespace tools {
25 namespace sg {
26 
27 class h1d2plot : public virtual bins1D {
28 public:
30 public:
31  virtual void* cast(const std::string& a_class) const {
32  if(void* p = cmp_cast<h1d2plot>(this,a_class)) {return p;}
33  return bins1D::cast(a_class);
34  }
35 public: //plottable
36  virtual plottable* copy() const {return new h1d2plot(*this);}
37  virtual bool is_valid() const {return true;}
38  virtual const std::string& name() const {return m_name;}
39  virtual void set_name(const std::string& a_s) {m_name = a_s;}
40 
41  virtual const std::string& title() const {return m_data.title();}
42  virtual const std::string& legend() const {return m_legend;}
43  virtual void set_legend(const std::string& a_s) {m_legend = a_s;}
44 
45  virtual void infos(const std::string& a_opts,std::string& a_sinfos) const {
46  a_sinfos.clear();
47  std::string f_lf("\n");
48  std::vector<std::string> ws;
49  words(a_opts," ",false,ws);
50  std::vector<std::string>::const_iterator it;
51 
52  /*bool show_fit_ndf = false;
53  {for(it=ws.begin();it!=ws.end();++it) {
54  if((*it)=="fit_ndf") {show_fit_ndf = true;break;}
55  }}*/
56 
57  for(it=ws.begin();it!=ws.end();++it) {
58  if(((*it)=="name") && m_name.size()) {
59  if(a_sinfos.size()) a_sinfos += f_lf;
60  a_sinfos += "Name";
61  a_sinfos += f_lf;
62  a_sinfos += m_name;
63 
64  } else if((*it)=="entries") {
65  if(a_sinfos.size()) a_sinfos += f_lf;
66  a_sinfos += "Entries";
67  a_sinfos += f_lf;
68  if(!numas<unsigned int>(m_data.all_entries(),a_sinfos)){}
69 
70  } else if((*it)=="mean") {
71  if(a_sinfos.size()) a_sinfos += f_lf;
72  a_sinfos += "Mean";
73  a_sinfos += f_lf;
74  if(!numas<double>(m_data.mean(),a_sinfos)) {}
75 
76  } else if((*it)=="rms") {
77  if(a_sinfos.size()) a_sinfos += f_lf;
78  a_sinfos += "RMS";
79  a_sinfos += f_lf;
80  if(!numas<double>(m_data.rms(),a_sinfos)) {}
81 
82  } else if((*it)=="underflow") {
83  if(a_sinfos.size()) a_sinfos += f_lf;
84  a_sinfos += "UDFLW";
85  a_sinfos += f_lf;
86  if(!numas<double>(m_data.bin_height(histo::axis_UNDERFLOW_BIN),a_sinfos)){}
87 
88  } else if((*it)=="overflow") {
89  if(a_sinfos.size()) a_sinfos += f_lf;
90  a_sinfos += "OVFLW";
91  a_sinfos += f_lf;
92  if(!numas<double>(m_data.bin_height(histo::axis_OVERFLOW_BIN),a_sinfos)){}
93 
94 /*
95  } else if((*it)=="fit_quality") {
96  //look in m_data annotations for "fit.chi2" and "fit.ndf" keys :
97  if(show_fit_ndf) {
98  std::string schi2;
99  std::string sndf;
100  if(m_data.annotation("fit.chi2",schi2) &&
101  m_data.annotation("fit.ndf",sndf) ){
102  if(a_sinfos.size()) a_sinfos += f_lf;
103  a_sinfos += "[h]^2! / ndf";
104  a_sinfos += f_lf;
105  a_sinfos += schi2;
106  a_sinfos += " / ";
107  a_sinfos += sndf;
108  }
109  } else { //show chi2 only.
110  std::string schi2;
111  if(m_data.annotation("fit.chi2",schi2)){
112  if(a_sinfos.size()) a_sinfos += f_lf;
113  a_sinfos += "[h]^2!";
114  a_sinfos += f_lf;
115  a_sinfos += schi2;
116  }
117  }
118 
119  } else if((*it)=="fit_parameters") {
120  //look in m_data annotations for "fit.param.<name>" keys :
121  typedef std::map<std::string,std::string> annots_t;
122  const annots_t& annots = m_data.annotations();
123  annots_t::const_iterator it;
124  for(it=annots.begin();it!=annots.end();++it) {
125  const std::string& key = (*it).first;
126  if(key.substr(0,10)=="fit.param.") {
127  //fit.param.mean 14
128  //01234567890123
129  std::string name = key.substr(10,key.size()-10);
130  if(a_sinfos.size()) a_sinfos += f_lf;
131  a_sinfos += name;
132  a_sinfos += f_lf;
133  a_sinfos += (*it).second;
134  }
135  }
136 */
137  }
138  }
139  }
140 public: //bins1D
141  virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
142  if(a_with_entries && m_data.has_entries_per_bin()) {
143  double mn,mx;
146  a_mn = float(mn);
147  a_mx = float(mx);
148  } else {
149  a_mn = (float)m_data.min_bin_height();
150  a_mx = (float)m_data.max_bin_height();
151  }
152  }
153  virtual unsigned int bins() const {return m_data.axis().bins();}
154  virtual float axis_min() const {return (float)m_data.axis().lower_edge();}
155  virtual float axis_max() const {return (float)m_data.axis().upper_edge();}
156  virtual float bin_lower_edge(int aI) const {return (float)m_data.axis().bin_lower_edge(aI);}
157  virtual float bin_upper_edge(int aI) const {return (float)m_data.axis().bin_upper_edge(aI);}
158 
159  virtual bool has_entries_per_bin() const {return m_data.has_entries_per_bin();}
160  virtual unsigned int bin_entries(int aI) const {return m_data.bin_entries(aI);}
161 
162  virtual float bin_Sw(int aI) const {return (float)m_data.bin_height(aI);}
163 
164  virtual float bin_error(int aI) const {return (float)m_data.bin_error(aI);}
165  virtual bool is_profile() const {return false;}
166 public:
167  h1d2plot(const histo::h1d& a_data):m_data(a_data) {
168 #ifdef TOOLS_MEM
169  mem::increment(s_class().c_str());
170 #endif
171  }
172  virtual ~h1d2plot(){
173 #ifdef TOOLS_MEM
174  mem::decrement(s_class().c_str());
175 #endif
176  }
177 public:
178  h1d2plot(const h1d2plot& a_from)
179  :plottable(a_from),bins1D(a_from)
180  ,m_data(a_from.m_data)
181  ,m_name(a_from.m_name)
182  ,m_legend(a_from.m_legend)
183  {
184 #ifdef TOOLS_MEM
185  mem::increment(s_class().c_str());
186 #endif
187  }
188  h1d2plot& operator=(const h1d2plot& a_from){
189  m_name = a_from.m_name;
190  m_legend = a_from.m_legend;
191  return *this;
192  }
193 public:
194  const histo::h1d& data() const {return m_data;}
195 protected:
197  std::string m_name;
198  std::string m_legend;
199 };
200 
201 class h2d2plot : public virtual bins2D {
202 public:
204 public:
205  virtual void* cast(const std::string& a_class) const {
206  if(void* p = cmp_cast<h2d2plot>(this,a_class)) {return p;}
207  return bins2D::cast(a_class);
208  }
209 public: //plottable
210  virtual plottable* copy() const {return new h2d2plot(*this);}
211  virtual bool is_valid() const {return true;}
212  virtual const std::string& name() const {return m_name;}
213  virtual void set_name(const std::string& a_s) {m_name = a_s;}
214  virtual const std::string& title() const {return m_data.title();}
215  virtual const std::string& legend() const {return m_legend;}
216  virtual void set_legend(const std::string& a_s) {m_legend = a_s;}
217 
218  virtual void infos(const std::string& a_opts,std::string& a_sinfos) const {
219  a_sinfos.clear();
220  std::string f_lf("\n");
221  std::vector<std::string> ws;
222  words(a_opts," ",false,ws);
223  std::vector<std::string>::const_iterator it;
224  for(it=ws.begin();it!=ws.end();++it) {
225  if(((*it)=="name") && m_name.size()) {
226  if(a_sinfos.size()) a_sinfos += f_lf;
227  a_sinfos += "Name\n";
228  a_sinfos += m_name;
229 
230  } else if((*it)=="entries") {
231  if(a_sinfos.size()) a_sinfos += f_lf;
232  a_sinfos += "Entries\n";
233  if(!numas<unsigned int>(m_data.all_entries(),a_sinfos)) {}
234 
235  } else if((*it)=="mean") {
236  if(a_sinfos.size()) a_sinfos += f_lf;
237  a_sinfos += "MeanX\n";
238  if(!numas<double>(m_data.mean_x(),a_sinfos)) {}
239  a_sinfos += f_lf;
240  a_sinfos += "MeanY\n";
241  if(!numas<double>(m_data.mean_y(),a_sinfos)) {}
242 
243  } else if((*it)=="rms") {
244  if(a_sinfos.size()) a_sinfos += f_lf;
245  a_sinfos += "RMS X\n";
246  if(!numas<double>(m_data.rms_x(),a_sinfos)) {}
247  a_sinfos += f_lf;
248  a_sinfos += "RMS Y\n";
249  if(!numas<double>(m_data.rms_y(),a_sinfos)) {}
250 
251  }
252  }
253  }
254 public: //bins2D
255  virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
256  if(a_with_entries && m_data.has_entries_per_bin()) {
257  double mn,mx;
260  a_mn = float(mn);
261  a_mx = float(mx);
262  } else {
263  a_mn = (float)m_data.min_bin_height();
264  a_mx = (float)m_data.max_bin_height();
265  }
266  }
267  virtual unsigned int x_bins() const {return m_data.axis_x().bins();}
268  virtual unsigned int y_bins() const {return m_data.axis_y().bins();}
269  virtual float x_axis_min() const {return (float)m_data.axis_x().lower_edge();}
270  virtual float x_axis_max() const {return (float)m_data.axis_x().upper_edge();}
271  virtual float y_axis_min() const {return (float)m_data.axis_y().lower_edge();}
272  virtual float y_axis_max() const {return (float)m_data.axis_y().upper_edge();}
273 
274  virtual float bin_lower_edge_x(int aI) const {return (float)m_data.axis_x().bin_lower_edge(aI);}
275  virtual float bin_upper_edge_x(int aI) const {return (float)m_data.axis_x().bin_upper_edge(aI);}
276  virtual float bin_lower_edge_y(int aI) const {return (float)m_data.axis_y().bin_lower_edge(aI);}
277  virtual float bin_upper_edge_y(int aI) const {return (float)m_data.axis_y().bin_upper_edge(aI);}
278 
279  virtual bool has_entries_per_bin() const {return m_data.has_entries_per_bin();}
280  virtual unsigned int bin_entries(int aI,int aJ) const {return m_data.bin_entries(aI,aJ);}
281 
282  virtual float bin_Sw(int aI,int aJ) const {return (float)m_data.bin_height(aI,aJ);}
283 
284  virtual float bin_error(int aI,int aJ) const {return (float)m_data.bin_error(aI,aJ);}
285 public:
286  h2d2plot(const histo::h2d& a_data)
287  :m_data(a_data)
288  {
289 #ifdef TOOLS_MEM
290  mem::increment(s_class().c_str());
291 #endif
292  }
293  virtual ~h2d2plot(){
294 #ifdef TOOLS_MEM
295  mem::decrement(s_class().c_str());
296 #endif
297  }
298 public:
299  h2d2plot(const h2d2plot& a_from)
300  :plottable(a_from),bins2D(a_from)
301  ,m_data(a_from.m_data)
302  ,m_name(a_from.m_name)
303  ,m_legend(a_from.m_legend)
304  {
305 #ifdef TOOLS_MEM
306  mem::increment(s_class().c_str());
307 #endif
308  }
309  h2d2plot& operator=(const h2d2plot& a_from){
310  m_name = a_from.m_name;
311  m_legend = a_from.m_legend;
312  return *this;
313  }
314 protected:
316  std::string m_name;
317  std::string m_legend;
318 };
319 
320 //NOTE : for the moment, same code as h1d2plot !
321 class p1d2plot : public virtual bins1D {
322 public:
324 public:
325  virtual void* cast(const std::string& a_class) const {
326  if(void* p = cmp_cast<p1d2plot>(this,a_class)) {return p;}
327  return bins1D::cast(a_class);
328  }
329 public:
330  virtual plottable* copy() const {return new p1d2plot(*this);}
331  virtual bool is_valid() const {return true;}
332  virtual const std::string& name() const {return m_name;}
333  virtual void set_name(const std::string& a_s) {m_name = a_s;}
334  virtual const std::string& title() const {return m_data.title();}
335  virtual const std::string& legend() const {return m_legend;}
336  virtual void set_legend(const std::string& a_s) {m_legend = a_s;}
337 
338  virtual void infos(const std::string& a_opts,std::string& a_sinfos) const {
339  a_sinfos.clear();
340  std::string f_lf("\n");
341  std::vector<std::string> ws;
342  words(a_opts," ",false,ws);
343  std::vector<std::string>::const_iterator it;
344  for(it=ws.begin();it!=ws.end();++it) {
345  if(((*it)=="name") && m_name.size()) {
346  if(a_sinfos.size()) a_sinfos += f_lf;
347  a_sinfos += "Name\n";
348  a_sinfos += m_name;
349 
350  } else if((*it)=="entries") {
351  if(a_sinfos.size()) a_sinfos += f_lf;
352  a_sinfos += "Entries\n";
353  if(!numas<unsigned int>(m_data.all_entries(),a_sinfos)) {}
354  } else if((*it)=="mean") {
355  if(a_sinfos.size()) a_sinfos += f_lf;
356  a_sinfos += "Mean\n";
357  if(!numas<double>(m_data.mean(),a_sinfos)) {}
358  } else if((*it)=="rms") {
359  if(a_sinfos.size()) a_sinfos += f_lf;
360  a_sinfos += "RMS\n";
361  if(!numas<double>(m_data.rms(),a_sinfos)) {}
362 
363  }
364  }
365  }
366 public:
367  virtual unsigned int bins() const {return m_data.axis().bins();}
368 
369  virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
370  if(a_with_entries && m_data.has_entries_per_bin()) {
371  double mn,mx;
374  a_mn = float(mn);
375  a_mx = float(mx);
376  } else {
377  a_mn = (float)m_data.min_bin_height();
378  a_mx = (float)m_data.max_bin_height();
379  }
380  }
381 
382  virtual float axis_min() const {return (float)m_data.axis().lower_edge();}
383  virtual float axis_max() const {return (float)m_data.axis().upper_edge();}
384  virtual float bin_lower_edge(int aI) const {return (float)m_data.axis().bin_lower_edge(aI);}
385  virtual float bin_upper_edge(int aI) const {return (float)m_data.axis().bin_upper_edge(aI);}
386 
387  virtual bool has_entries_per_bin() const {return m_data.has_entries_per_bin();}
388  virtual unsigned int bin_entries(int aI) const {return m_data.bin_entries(aI);}
389 
390  virtual float bin_Sw(int aI) const {return (float)m_data.bin_height(aI);}
391 
392  virtual float bin_error(int aI) const {return (float)m_data.bin_error(aI);}
393 
394  virtual bool is_profile() const {return true;}
395 public:
396  p1d2plot(const histo::p1d& a_data):m_data(a_data){}
397  virtual ~p1d2plot(){}
398 public:
399  p1d2plot(const p1d2plot& a_from)
400  :plottable(a_from),bins1D(a_from)
401  ,m_data(a_from.m_data)
402  ,m_name(a_from.m_name)
403  ,m_legend(a_from.m_legend)
404  {}
405  p1d2plot& operator=(const p1d2plot& a_from){
406  m_name = a_from.m_name;
407  m_legend = a_from.m_legend;
408  return *this;
409  }
410 protected:
412  std::string m_name;
413  std::string m_legend;
414 };
415 
416 /*
417 class p2d2plot : public virtual SbPlottableBins2D {
418 public:
419  TOOLS_SCLASS(tools::sg::p2d2plot)
420 public:
421  virtual void* cast(const std::string& a_class) const {
422  if(void* p = cmp_cast<p2d2plot>(this,a_class)) {return p;}
423  return bins2D::cast(a_class);
424  }
425 public: //SbPlottableObject
426  virtual bool is_valid() const {return true;}
427  virtual const char* name(){return m_name;}
428  virtual const char* legend(){return m_legend;}
429 public:
430  virtual int getDimension() const{return 2;}
431  virtual const char* title(){return m_data.title();}
432 public: //SbPlottableBins2D
433  virtual void getBinsSumOfWeightsRange(float& a_mn,float& a_mx) const {
434  a_mn = (float)m_data.min_bin_height();
435  a_mx = (float)m_data.max_bin_height();
436  }
437  virtual int getAxisNumberOfBinsX() const {return m_data.axis_x().bins();}
438  virtual int getAxisNumberOfBinsY() const {return m_data.axis_y().bins();}
439  virtual float getAxisMinimumX() const {return (float)m_data.axis_x().lower_edge();}
440  virtual float getAxisMaximumX() const {return (float)m_data.axis_x().upper_edge();}
441  virtual float getAxisMinimumY() const {return (float)m_data.axis_y().lower_edge();}
442  virtual float getAxisMaximumY() const {return (float)m_data.axis_y().upper_edge();}
443  virtual float getBinLowerEdgeX(int aI) const {
444  return (float)m_data.axis_x().bin_lower_edge(aI);
445  }
446  virtual float bin_upper_edgeX(int aI) const {
447  return (float)m_data.axis_x().bin_upper_edge(aI);
448  }
449  virtual float getBinLowerEdgeY(int aI) const {
450  return (float)m_data.axis_y().bin_lower_edge(aI);
451  }
452  virtual float bin_upper_edgeY(int aI) const {
453  return (float)m_data.axis_y().bin_upper_edge(aI);
454  }
455  virtual int getBinNumberOfEntries(int aI,int aJ) const {
456  return m_data.bin_entries(aI,aJ);
457  }
458  virtual float getBinSumOfWeights(int aI,int aJ) const {
459  return (float)m_data.bin_height(aI,aJ);
460  }
461  virtual float getBinBar(int aI,int aJ) const {
462  return (float)m_data.bin_error(aI,aJ);
463  }
464 
465  virtual void infos(const std::string& a_opts,std::string& a_sinfos) const {
466  a_sinfos.clear();
467  std::string f_lf("\n");
468  std::vector<std::string> ws;
469  words(a_opts," ",false,ws);
470  std::vector<std::string>::const_iterator it;
471  for(it=ws.begin();it!=ws.end();++it) {
472  if(((*it)=="name") && m_name.size()) {
473  if(a_sinfos.size()) a_sinfos += f_lf;
474  a_sinfos += "Name\n";
475  a_sinfos += m_name;
476 
477  } else if((*it)=="entries") {
478  if(a_sinfos.size()) a_sinfos += f_lf;
479  a_sinfos += "Entries\n";
480  if(!numasd int>(m_data.all_entries(),a_sinfos)) {}
481  } else if((*it)=="mean") {
482  if(a_sinfos.size()) a_sinfos += f_lf;
483  a_sinfos += "MeanX\n";
484  if(!numas<double>(m_data.mean_x(),a_sinfos)) {}
485  a_sinfos += f_lf;
486  a_sinfos += "MeanY\n";
487  if(!numas<double>(m_data.mean_y(),a_sinfos)) {}
488  } else if((*it)=="rms") {
489  if(a_sinfos.size()) a_sinfos += f_lf;
490  a_sinfos += "RMS X\n";
491  if(!numas<double>(m_data.rms_x(),a_sinfos)) {}
492  a_sinfos += f_lf;
493  a_sinfos += "RMS Y\n";
494  if(!numas<double>(m_data.rms_y(),a_sinfos)) {}
495 
496  }
497  }
498  }
499 
500 public:
501  p2d2plot(const histo::p2d& a_data)
502  :m_data(a_data)
503  {
504 #ifdef TOOLS_MEM
505  mem::increment(s_class().c_str());
506 #endif
507  }
508  virtual ~p2d2plot(){
509 #ifdef TOOLS_MEM
510  mem::decrement(s_class().c_str());
511 #endif
512  }
513 public:
514  p2d2plot(const p2d2plot& a_from)
515  :m_data(a_from.m_data)
516  ,m_name(a_from.m_name)
517  ,m_legend(a_from.m_legend)
518  {
519 #ifdef TOOLS_MEM
520  mem::increment(s_class().c_str());
521 #endif
522  }
523  p2d2plot& operator=(const p2d2plot& a_from){
524  m_name = a_from.m_name;
525  m_legend = a_from.m_legend;
526  return *this;
527  }
528 protected:
529  const histo::p2d& m_data;
530  std::string m_name;
531  std::string m_legend;
532 };
533 */
534 
535 }}
536 
537 #endif
tools::sg::h1d2plot::has_entries_per_bin
virtual bool has_entries_per_bin() const
Definition: h2plot:159
tools::histo::p1d
Definition: p1d:12
tools::sg::h2d2plot::bin_lower_edge_y
virtual float bin_lower_edge_y(int aI) const
Definition: h2plot:276
tools::histo::b2::rms_x
TC rms_x() const
Definition: b2:37
tools::sg::h2d2plot::bin_error
virtual float bin_error(int aI, int aJ) const
Definition: h2plot:284
tools::sg::h2d2plot::h2d2plot
h2d2plot(const h2d2plot &a_from)
Definition: h2plot:299
tools::histo::h2::bin_error
virtual TH bin_error(int aI, int aJ) const
Definition: h2:24
tools::sg::bins1D
Definition: plottables:13
tools::sg::bins2D
Definition: plottables:42
tools::sg::h1d2plot::data
const histo::h1d & data() const
Definition: h2plot:194
tools::sg::h1d2plot::m_data
const histo::h1d & m_data
Definition: h2plot:196
tools::sg::p1d2plot::m_data
const histo::p1d & m_data
Definition: h2plot:411
tools::sg::h1d2plot::set_name
virtual void set_name(const std::string &a_s)
Definition: h2plot:39
tools::sg::bins1D::cast
virtual void * cast(const std::string &a_class) const
Definition: plottables:17
tools::histo::h1d
Definition: h1d:14
tools::sg::h2d2plot::bin_entries
virtual unsigned int bin_entries(int aI, int aJ) const
Definition: h2plot:280
tools::sg::p1d2plot::bin_entries
virtual unsigned int bin_entries(int aI) const
Definition: h2plot:388
tools::sg::h2d2plot::set_name
virtual void set_name(const std::string &a_s)
Definition: h2plot:213
tools::histo::axis_UNDERFLOW_BIN
@ axis_UNDERFLOW_BIN
Definition: axis:13
tools::sg::h2d2plot::cast
virtual void * cast(const std::string &a_class) const
Definition: h2plot:205
tools::sg::h1d2plot::infos
virtual void infos(const std::string &a_opts, std::string &a_sinfos) const
Definition: h2plot:45
tools::sg::h2d2plot::bin_lower_edge_x
virtual float bin_lower_edge_x(int aI) const
Definition: h2plot:274
tools::sg::p1d2plot::legend
virtual const std::string & legend() const
Definition: h2plot:335
tools::sg::h2d2plot::name
virtual const std::string & name() const
Definition: h2plot:212
tools::sg::h2d2plot::x_axis_max
virtual float x_axis_max() const
Definition: h2plot:270
tools::sg::h1d2plot::bin_entries
virtual unsigned int bin_entries(int aI) const
Definition: h2plot:160
tools::sg::p1d2plot::p1d2plot
p1d2plot(const histo::p1d &a_data)
Definition: h2plot:396
tools::sg::p1d2plot::bin_upper_edge
virtual float bin_upper_edge(int aI) const
Definition: h2plot:385
tools::sg::plottable
Definition: plottable:15
tools::histo::b2::bin_height
TH bin_height(int aI, int aJ) const
Definition: b2:95
tools::sg::h1d2plot::name
virtual const std::string & name() const
Definition: h2plot:38
tools::sg::h1d2plot::h1d2plot
h1d2plot(const histo::h1d &a_data)
Definition: h2plot:167
tools::sg::p1d2plot::is_profile
virtual bool is_profile() const
Definition: h2plot:394
tools::sg::h1d2plot::bin_lower_edge
virtual float bin_lower_edge(int aI) const
Definition: h2plot:156
tools::sg::h2d2plot::y_bins
virtual unsigned int y_bins() const
Definition: h2plot:268
tools::sg::h1d2plot::copy
virtual plottable * copy() const
Definition: h2plot:36
tools::mn
T mn(const T &a, const T &b)
Definition: mnmx:10
tools::sg::h2d2plot::m_legend
std::string m_legend
Definition: h2plot:317
tools::sg::p1d2plot::~p1d2plot
virtual ~p1d2plot()
Definition: h2plot:397
tools::mx
T mx(const T &a, const T &b)
Definition: mnmx:13
tools::sg::h2d2plot::~h2d2plot
virtual ~h2d2plot()
Definition: h2plot:293
tools::histo::b2::mean_x
TC mean_x() const
Definition: b2:27
tools::sg::p1d2plot::copy
virtual plottable * copy() const
Definition: h2plot:330
tools::histo::base_histo::min_bin_height_with_entries
bool min_bin_height_with_entries(TH &a_value) const
Definition: base_histo:175
tools::histo::axis::upper_edge
TC upper_edge() const
Definition: axis:27
tools::sg::h1d2plot::bin_upper_edge
virtual float bin_upper_edge(int aI) const
Definition: h2plot:157
tools::histo::h2d
Definition: h2d:12
tools::sg::p1d2plot::m_name
std::string m_name
Definition: h2plot:412
tools::histo::b2::mean_y
TC mean_y() const
Definition: b2:32
tools::sg::h1d2plot::title
virtual const std::string & title() const
Definition: h2plot:41
tools::sg::p1d2plot::bin_lower_edge
virtual float bin_lower_edge(int aI) const
Definition: h2plot:384
tools::sg::h2d2plot::infos
virtual void infos(const std::string &a_opts, std::string &a_sinfos) const
Definition: h2plot:218
tools::sg::h2d2plot::operator=
h2d2plot & operator=(const h2d2plot &a_from)
Definition: h2plot:309
tools::sg::h2d2plot::bin_upper_edge_x
virtual float bin_upper_edge_x(int aI) const
Definition: h2plot:275
tools::histo::axis_OVERFLOW_BIN
@ axis_OVERFLOW_BIN
Definition: axis:13
tools::sg::h2d2plot::y_axis_min
virtual float y_axis_min() const
Definition: h2plot:271
tools::histo::p1::bin_error
virtual TH bin_error(int aI) const
Definition: p1:52
TOOLS_SCLASS
#define TOOLS_SCLASS(a_name)
Definition: S_STRING:41
tools::sg::h1d2plot::bins_Sw_range
virtual void bins_Sw_range(float &a_mn, float &a_mx, bool a_with_entries) const
Definition: h2plot:141
plottables
tools::histo::axis::bin_lower_edge
TC bin_lower_edge(int a_bin) const
Definition: axis:47
tools::sg::h2d2plot::bin_upper_edge_y
virtual float bin_upper_edge_y(int aI) const
Definition: h2plot:277
tools::histo::b1::axis
const axis_t & axis() const
Definition: b1:103
tools::sg::h1d2plot::~h1d2plot
virtual ~h1d2plot()
Definition: h2plot:172
tools::sg::h2d2plot::x_bins
virtual unsigned int x_bins() const
Definition: h2plot:267
tools::histo::axis::bins
bn_t bins() const
Definition: axis:28
tools::histo::h1::bin_error
virtual TH bin_error(int aI) const
Definition: h1:30
tools::histo::b1::rms
TC rms() const
Definition: b1:37
tools::sg::h2d2plot::bins_Sw_range
virtual void bins_Sw_range(float &a_mn, float &a_mx, bool a_with_entries) const
Definition: h2plot:255
tools::histo::axis::bin_upper_edge
TC bin_upper_edge(int a_bin) const
Definition: axis:63
tools::sg::p1d2plot::title
virtual const std::string & title() const
Definition: h2plot:334
tools::histo::b2::axis_y
const axis_t & axis_y() const
Definition: b2:148
tools::sg::p1d2plot::set_name
virtual void set_name(const std::string &a_s)
Definition: h2plot:333
tools::sg::h1d2plot::h1d2plot
h1d2plot(const h1d2plot &a_from)
Definition: h2plot:178
tools::histo::base_histo::all_entries
TN all_entries() const
Definition: base_histo:95
tools::sg::h1d2plot::bin_Sw
virtual float bin_Sw(int aI) const
Definition: h2plot:162
tools::sg::p1d2plot::bins_Sw_range
virtual void bins_Sw_range(float &a_mn, float &a_mx, bool a_with_entries) const
Definition: h2plot:369
tools::sg::p1d2plot::is_valid
virtual bool is_valid() const
Definition: h2plot:331
tools::sg::p1d2plot
Definition: h2plot:321
tools::sg::p1d2plot::p1d2plot
p1d2plot(const p1d2plot &a_from)
Definition: h2plot:399
tools::histo::b1::bin_height
TH bin_height(int aI) const
Definition: b1:75
tools::sg::p1d2plot::operator=
p1d2plot & operator=(const p1d2plot &a_from)
Definition: h2plot:405
tools::sg::h1d2plot::m_legend
std::string m_legend
Definition: h2plot:198
tools::sg::p1d2plot::axis_max
virtual float axis_max() const
Definition: h2plot:383
tools::histo::base_histo::title
const std::string & title() const
Definition: base_histo:87
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::sg::h1d2plot::operator=
h1d2plot & operator=(const h1d2plot &a_from)
Definition: h2plot:188
tools::words
void words(const std::string &a_string, const std::string &a_sep, bool a_take_empty, std::vector< std::string > &a_words, bool a_clear=true)
Definition: words:12
tools::histo::b2::bin_entries
TN bin_entries(int aI, int aJ) const
Definition: b2:57
tools::sg::h2d2plot::m_name
std::string m_name
Definition: h2plot:316
tools::sg::p1d2plot::infos
virtual void infos(const std::string &a_opts, std::string &a_sinfos) const
Definition: h2plot:338
tools::histo::base_histo::min_bin_height
TH min_bin_height() const
Definition: base_histo:141
tools::sg::h1d2plot::set_legend
virtual void set_legend(const std::string &a_s)
Definition: h2plot:43
tools::sg::h2d2plot::copy
virtual plottable * copy() const
Definition: h2plot:210
tools::sg::p1d2plot::axis_min
virtual float axis_min() const
Definition: h2plot:382
tools::sg::p1d2plot::m_legend
std::string m_legend
Definition: h2plot:413
tools::sg::h2d2plot::has_entries_per_bin
virtual bool has_entries_per_bin() const
Definition: h2plot:279
tools::sg::h2d2plot::bin_Sw
virtual float bin_Sw(int aI, int aJ) const
Definition: h2plot:282
tools::sg::h2d2plot
Definition: h2plot:201
tools::sg::h2d2plot::set_legend
virtual void set_legend(const std::string &a_s)
Definition: h2plot:216
tools::sg::p1d2plot::set_legend
virtual void set_legend(const std::string &a_s)
Definition: h2plot:336
tools::sg::h2d2plot::legend
virtual const std::string & legend() const
Definition: h2plot:215
tools::histo::base_histo::has_entries_per_bin
bool has_entries_per_bin() const
Definition: base_histo:211
tools::sg::p1d2plot::bins
virtual unsigned int bins() const
Definition: h2plot:367
tools::sg::h1d2plot::bins
virtual unsigned int bins() const
Definition: h2plot:153
tools::histo::base_histo::max_bin_height
TH max_bin_height() const
Definition: base_histo:158
tools::sg::p1d2plot::has_entries_per_bin
virtual bool has_entries_per_bin() const
Definition: h2plot:387
tools::sg::h1d2plot::legend
virtual const std::string & legend() const
Definition: h2plot:42
tools::sg::p1d2plot::bin_error
virtual float bin_error(int aI) const
Definition: h2plot:392
tools::sg::h2d2plot::title
virtual const std::string & title() const
Definition: h2plot:214
tools::sg::h1d2plot::m_name
std::string m_name
Definition: h2plot:197
tools::sg::h1d2plot::is_valid
virtual bool is_valid() const
Definition: h2plot:37
tools::sg::h1d2plot::bin_error
virtual float bin_error(int aI) const
Definition: h2plot:164
tools::sg::h1d2plot::axis_max
virtual float axis_max() const
Definition: h2plot:155
tools::sg::h2d2plot::y_axis_max
virtual float y_axis_max() const
Definition: h2plot:272
tools::sg::h2d2plot::is_valid
virtual bool is_valid() const
Definition: h2plot:211
tools::histo::b1::mean
TC mean() const
Definition: b1:30
tools::sg::p1d2plot::bin_Sw
virtual float bin_Sw(int aI) const
Definition: h2plot:390
tools::histo::axis::lower_edge
TC lower_edge() const
Definition: axis:26
tools::histo::b2::axis_x
const axis_t & axis_x() const
Definition: b2:147
tools::sg::h2d2plot::h2d2plot
h2d2plot(const histo::h2d &a_data)
Definition: h2plot:286
tools::histo::base_histo::max_bin_height_with_entries
bool max_bin_height_with_entries(TH &a_value) const
Definition: base_histo:193
tools::sg::h2d2plot::m_data
const histo::h2d & m_data
Definition: h2plot:315
tools::sg::h2d2plot::x_axis_min
virtual float x_axis_min() const
Definition: h2plot:269
tools::sg::h1d2plot::axis_min
virtual float axis_min() const
Definition: h2plot:154
tools::histo::b1::bin_entries
TN bin_entries(int aI) const
Definition: b1:47
tools::sg::p1d2plot::name
virtual const std::string & name() const
Definition: h2plot:332
tools::sg::p1d2plot::cast
virtual void * cast(const std::string &a_class) const
Definition: h2plot:325
tools::sg::h1d2plot::is_profile
virtual bool is_profile() const
Definition: h2plot:165
tools::sg::h1d2plot
Definition: h2plot:27
tools::sg::bins2D::cast
virtual void * cast(const std::string &a_class) const
Definition: plottables:46
tools::histo::b2::rms_y
TC rms_y() const
Definition: b2:43
tools::sg::h1d2plot::cast
virtual void * cast(const std::string &a_class) const
Definition: h2plot:31