CMS 3D CMS Logo

ContainerSingle2D.cc
Go to the documentation of this file.
3 
4 namespace hcaldqm {
5  using namespace constants;
6  using namespace quantity;
8  _qx = nullptr;
9  _qy = nullptr;
10  _qz = nullptr;
11  }
12 
14  : Container(folder, qz->name() + "vs" + qy->name() + "vs" + qx->name()), _qx(qx), _qy(qy), _qz(qz) {
18  }
19 
21  std::string const &folder, std::string const &qname, Quantity *qx, Quantity *qy, Quantity *qz, int debug /*=0*/)
22  : Container(folder, qname), _qx(qx), _qy(qy), _qz(qz) {
26  }
27 
29  _qx = c._qx->makeCopy();
30  _qy = c._qy->makeCopy();
31  _qz = c._qz->makeCopy();
32  }
33 
35  if (_qx != nullptr)
36  delete _qx;
37  if (_qy != nullptr)
38  delete _qy;
39  if (_qz != nullptr)
40  delete _qz;
41  _qx = nullptr;
42  _qy = nullptr;
43  _qz = nullptr;
44  }
45 
46  /* virtual */ void ContainerSingle2D::initialize(
47  std::string const &folder, Quantity *qx, Quantity *qy, Quantity *qz, int debug /*=0*/) {
48  Container::initialize(folder, qz->name() + "vs" + qy->name() + "vs" + qx->name(), debug);
49  _qx = qx;
50  _qy = qy;
51  _qz = qz;
55  }
56 
57  /* virtual */ void ContainerSingle2D::initialize(
58  std::string const &folder, std::string const &qname, Quantity *qx, Quantity *qy, Quantity *qz, int debug /*=0*/) {
60  _qx = qx;
61  _qy = qy;
62  _qz = qz;
66  }
67 
69  ib.setCurrentFolder(subsystem + "/" + _folder + "/" + _qname);
70  _me = ib.book2D(_qname + (aux.empty() ? aux : "_" + aux),
71  _qname + (aux.empty() ? aux : " " + aux),
72  _qx->nbins(),
73  _qx->min(),
74  _qx->max(),
75  _qy->nbins(),
76  _qy->min(),
77  _qy->max());
78  customize();
79  }
80 
82  _me = ig.get(subsystem + "/" + _folder + "/" + _qname + "/" + _qname + (aux.empty() ? aux : "_" + aux));
83  }
84 
85  /* virtual */ void ContainerSingle2D::customize() {
86  _me->setAxisTitle(_qx->name(), 1);
87  _me->setAxisTitle(_qy->name(), 2);
88  _me->setAxisTitle(_qz->name(), 3);
89 
90  TH1 *h = _me->getTH1();
91  _qx->setBits(h);
92  _qy->setBits(h);
93  _qz->setBits(h);
94 
95  std::vector<std::string> xlabels = _qx->getLabels();
96  std::vector<std::string> ylabels = _qy->getLabels();
97  for (unsigned int i = 0; i < xlabels.size(); i++) {
98  _me->setBinLabel(i + 1, xlabels[i], 1);
99  }
100  for (unsigned int i = 0; i < ylabels.size(); i++) {
101  _me->setBinLabel(i + 1, ylabels[i], 2);
102  }
103  }
104 
105  /* virtual */ void ContainerSingle2D::fill(int x, int y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
106 
107  /* virtual */ void ContainerSingle2D::fill(int x, double y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
108 
109  /* virtual */ void ContainerSingle2D::fill(int x, double y, double z) {
110  _me->Fill(_qx->getValue(x), _qy->getValue(y), z);
111  }
112 
113  /* virtual */ void ContainerSingle2D::fill(double x, int y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
114 
115  /* virtual */ void ContainerSingle2D::fill(double x, double y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
116 
117  /* virtual */ void ContainerSingle2D::fill(double x, double y, double z) {
118  _me->Fill(_qx->getValue(x), _qy->getValue(y), z);
119  }
120 
121  /* virtual */ void ContainerSingle2D::fill(int x, int y, double z) {
122  _me->Fill(_qx->getValue(x), _qy->getValue(y), z);
123  }
124 
125  /* virtual */ void ContainerSingle2D::fill(int x, int y, int z) { _me->Fill(_qx->getValue(x), _qy->getValue(y), z); }
126 
127  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id) { _me->Fill(_qx->getValue(id), _qy->getValue(id)); }
128 
129  /* virtual */ double ContainerSingle2D::getBinContent(int x, int y) {
130  return _me->getBinContent(_qx->getBin(x), _qy->getBin(y));
131  }
132  /* virtual */ double ContainerSingle2D::getBinContent(int x, double y) {
133  return _me->getBinContent(_qx->getBin(x), _qy->getBin(y));
134  }
135  /* virtual */ double ContainerSingle2D::getBinContent(double x, int y) {
136  return _me->getBinContent(_qx->getBin(x), _qy->getBin(y));
137  }
138  /* virtual */ double ContainerSingle2D::getBinContent(double x, double y) {
139  return _me->getBinContent(_qx->getBin(x), _qy->getBin(y));
140  }
141  /* virtual */ double ContainerSingle2D::getBinEntries(int x, int y) {
142  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(y));
143  }
144  /* virtual */ double ContainerSingle2D::getBinEntries(int x, double y) {
145  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(y));
146  }
147  /* virtual */ double ContainerSingle2D::getBinEntries(double x, int y) {
148  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(y));
149  }
150  /* virtual */ double ContainerSingle2D::getBinEntries(double x, double y) {
151  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(y));
152  }
153 
154  /* virtual */ void ContainerSingle2D::setBinContent(int x, int y, int z) {
155  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
156  }
157  /* virtual */ void ContainerSingle2D::setBinContent(int x, double y, int z) {
158  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
159  }
160  /* virtual */ void ContainerSingle2D::setBinContent(double x, int y, int z) {
161  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
162  }
163  /* virtual */ void ContainerSingle2D::setBinContent(double x, double y, int z) {
164  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
165  }
166  /* virtual */ void ContainerSingle2D::setBinContent(int x, int y, double z) {
167  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
168  }
169  /* virtual */ void ContainerSingle2D::setBinContent(int x, double y, double z) {
170  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
171  }
172  /* virtual */ void ContainerSingle2D::setBinContent(double x, int y, double z) {
173  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
174  }
175  /* virtual */ void ContainerSingle2D::setBinContent(double x, double y, double z) {
176  _me->setBinContent(_qx->getBin(x), _qy->getBin(y), z);
177  }
178 
179  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id, double x) {
180  if (_qx->isCoordinate() && _qy->isCoordinate())
181  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
182  else if (_qx->isCoordinate())
183  _me->Fill(_qx->getValue(id), _qy->getValue(x));
184  else if (_qy->isCoordinate())
185  _me->Fill(_qx->getValue(x), _qy->getValue(id));
186  }
187 
188  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id, int x) {
189  if (_qx->isCoordinate() && _qy->isCoordinate())
190  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
191  else if (_qx->isCoordinate())
192  _me->Fill(_qx->getValue(id), _qy->getValue(x));
193  else if (_qy->isCoordinate())
194  _me->Fill(_qx->getValue(x), _qy->getValue(id));
195  }
196 
197  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id, double x, double y) {
198  if (_qx->isCoordinate() && _qy->isCoordinate())
199  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
200  else if (_qx->isCoordinate() && !_qy->isCoordinate())
201  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
202  else if (!_qx->isCoordinate() && _qy->isCoordinate())
203  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
204  }
205 
206  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id, int x, int y) {
207  if (_qx->isCoordinate() && _qy->isCoordinate())
208  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
209  else if (_qx->isCoordinate() && !_qy->isCoordinate())
210  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
211  else if (!_qx->isCoordinate() && _qy->isCoordinate())
212  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
213  }
214 
215  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &id, int x, double y) {
216  if (_qx->isCoordinate() && _qy->isCoordinate())
217  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
218  else if (_qx->isCoordinate() && !_qy->isCoordinate())
219  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
220  else if (!_qx->isCoordinate() && _qy->isCoordinate())
221  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
222  }
223 
224  /* virtula */ double ContainerSingle2D::getBinContent(HcalDetId const &id) {
225  return _me->getBinContent(_qx->getBin(id), _qy->getBin(id));
226  }
227  /* virtual */ double ContainerSingle2D::getBinContent(HcalDetId const &id, int x) {
228  if (_qx->isCoordinate())
229  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
230  else
231  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
232  }
233  /* virtual */ double ContainerSingle2D::getBinContent(HcalDetId const &id, double x) {
234  if (_qx->isCoordinate())
235  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
236  else
237  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
238  }
239  /* virtula */ double ContainerSingle2D::getBinEntries(HcalDetId const &id) {
240  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(id));
241  }
242  /* virtual */ double ContainerSingle2D::getBinEntries(HcalDetId const &id, int x) {
243  if (_qx->isCoordinate())
244  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
245  else
246  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
247  }
248  /* virtual */ double ContainerSingle2D::getBinEntries(HcalDetId const &id, double x) {
249  if (_qx->isCoordinate())
250  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
251  else
252  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
253  }
254 
255  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, int x) {
256  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
257  }
258  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, double x) {
259  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
260  }
261  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, int x, int y) {
262  if (_qx->isCoordinate())
263  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
264  else
265  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
266  }
267  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, int x, double y) {
268  if (_qx->isCoordinate())
269  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
270  else
271  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
272  }
273  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, double x, int y) {
274  if (_qx->isCoordinate())
275  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
276  else
277  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
278  }
279  /* virtual */ void ContainerSingle2D::setBinContent(HcalDetId const &id, double x, double y) {
280  if (_qx->isCoordinate())
281  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
282  else
283  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
284  }
285 
286  // by ElectronicsId
287  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id) {
288  _me->Fill(_qx->getValue(id), _qy->getValue(id));
289  }
290 
291  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id, double x) {
292  if (_qx->isCoordinate() && _qy->isCoordinate())
293  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
294  else if (_qx->isCoordinate())
295  _me->Fill(_qx->getValue(id), _qy->getValue(x));
296  else if (_qy->isCoordinate())
297  _me->Fill(_qx->getValue(x), _qy->getValue(id));
298  }
299 
300  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id, int x) {
301  if (_qx->isCoordinate() && _qy->isCoordinate())
302  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
303  else if (_qx->isCoordinate())
304  _me->Fill(_qx->getValue(id), _qy->getValue(x));
305  else if (_qy->isCoordinate())
306  _me->Fill(_qx->getValue(x), _qy->getValue(id));
307  }
308 
309  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id, double x, double y) {
310  if (_qx->isCoordinate() && _qy->isCoordinate())
311  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
312  else if (_qx->isCoordinate() && !_qy->isCoordinate())
313  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
314  else if (!_qx->isCoordinate() && _qy->isCoordinate())
315  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
316  }
317 
318  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id, int x, int y) {
319  if (_qx->isCoordinate() && _qy->isCoordinate())
320  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
321  else if (_qx->isCoordinate() && !_qy->isCoordinate())
322  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
323  else if (!_qx->isCoordinate() && _qy->isCoordinate())
324  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
325  }
326 
327  /* virtual */ void ContainerSingle2D::fill(HcalElectronicsId const &id, int x, double y) {
328  if (_qx->isCoordinate() && _qy->isCoordinate())
329  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
330  else if (_qx->isCoordinate() && !_qy->isCoordinate())
331  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
332  else if (!_qx->isCoordinate() && _qy->isCoordinate())
333  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
334  }
335 
336  /* virtula */ double ContainerSingle2D::getBinContent(HcalElectronicsId const &id) {
337  return _me->getBinContent(_qx->getBin(id), _qy->getBin(id));
338  }
339  /* virtual */ double ContainerSingle2D::getBinContent(HcalElectronicsId const &id, int x) {
340  if (_qx->isCoordinate())
341  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
342  else
343  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
344  }
345  /* virtual */ double ContainerSingle2D::getBinContent(HcalElectronicsId const &id, double x) {
346  if (_qx->isCoordinate())
347  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
348  else
349  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
350  }
351  /* virtula */ double ContainerSingle2D::getBinEntries(HcalElectronicsId const &id) {
352  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(id));
353  }
354  /* virtual */ double ContainerSingle2D::getBinEntries(HcalElectronicsId const &id, int x) {
355  if (_qx->isCoordinate())
356  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
357  else
358  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
359  }
360  /* virtual */ double ContainerSingle2D::getBinEntries(HcalElectronicsId const &id, double x) {
361  if (_qx->isCoordinate())
362  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
363  else
364  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
365  }
366 
367  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, int x) {
368  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
369  }
370  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, double x) {
371  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
372  }
373  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, int x, int y) {
374  if (_qx->isCoordinate())
375  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
376  else
377  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
378  }
379  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, int x, double y) {
380  if (_qx->isCoordinate())
381  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
382  else
383  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
384  }
385  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, double x, int y) {
386  if (_qx->isCoordinate())
387  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
388  else
389  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
390  }
391  /* virtual */ void ContainerSingle2D::setBinContent(HcalElectronicsId const &id, double x, double y) {
392  if (_qx->isCoordinate())
393  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
394  else
395  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
396  }
397 
398  // by TrigTowerDetId
399  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id) {
400  _me->Fill(_qx->getValue(id), _qy->getValue(id));
401  }
402 
403  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id, double x) {
404  if (_qx->isCoordinate() && _qy->isCoordinate())
405  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
406  else if (_qx->isCoordinate())
407  _me->Fill(_qx->getValue(id), _qy->getValue(x));
408  else if (_qy->isCoordinate())
409  _me->Fill(_qx->getValue(x), _qy->getValue(id));
410  }
411 
412  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id, int x) {
413  if (_qx->isCoordinate() && _qy->isCoordinate())
414  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
415  else if (_qx->isCoordinate())
416  _me->Fill(_qx->getValue(id), _qy->getValue(x));
417  else if (_qy->isCoordinate())
418  _me->Fill(_qx->getValue(x), _qy->getValue(id));
419  }
420 
421  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id, double x, double y) {
422  if (_qx->isCoordinate() && _qy->isCoordinate())
423  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
424  else if (_qx->isCoordinate() && !_qy->isCoordinate())
425  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
426  else if (!_qx->isCoordinate() && _qy->isCoordinate())
427  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
428  }
429 
430  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id, int x, int y) {
431  if (_qx->isCoordinate() && _qy->isCoordinate())
432  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
433  else if (_qx->isCoordinate() && !_qy->isCoordinate())
434  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
435  else if (!_qx->isCoordinate() && _qy->isCoordinate())
436  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
437  }
438 
439  /* virtual */ void ContainerSingle2D::fill(HcalTrigTowerDetId const &id, int x, double y) {
440  if (_qx->isCoordinate() && _qy->isCoordinate())
441  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
442  else if (_qx->isCoordinate() && !_qy->isCoordinate())
443  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
444  else if (!_qx->isCoordinate() && _qy->isCoordinate())
445  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
446  }
447 
448  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &did, HcalElectronicsId const &eid) {
449  if (_qx->type() == fDetectorQuantity)
450  _me->Fill(_qx->getValue(did), _qy->getValue(eid));
451  else
452  _me->Fill(_qx->getValue(eid), _qy->getValue(did));
453  }
454 
455  /* virtual */ void ContainerSingle2D::fill(HcalDetId const &did, HcalElectronicsId const &eid, double x) {
456  if (_qx->type() == fDetectorQuantity)
457  _me->Fill(_qx->getValue(did), _qy->getValue(eid), x);
458  else
459  _me->Fill(_qx->getValue(eid), _qy->getValue(did), x);
460  }
461 
462  /* virtula */ double ContainerSingle2D::getBinContent(HcalTrigTowerDetId const &id) {
463  return _me->getBinContent(_qx->getBin(id), _qy->getBin(id));
464  }
465  /* virtual */ double ContainerSingle2D::getBinContent(HcalTrigTowerDetId const &id, int x) {
466  if (_qx->isCoordinate())
467  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
468  else
469  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
470  }
471  /* virtual */ double ContainerSingle2D::getBinContent(HcalTrigTowerDetId const &id, double x) {
472  if (_qx->isCoordinate())
473  return _me->getBinContent(_qx->getBin(id), _qy->getBin(x));
474  else
475  return _me->getBinContent(_qx->getBin(x), _qy->getBin(id));
476  }
477  /* virtula */ double ContainerSingle2D::getBinEntries(HcalTrigTowerDetId const &id) {
478  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(id));
479  }
480  /* virtual */ double ContainerSingle2D::getBinEntries(HcalTrigTowerDetId const &id, int x) {
481  if (_qx->isCoordinate())
482  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
483  else
484  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
485  }
486  /* virtual */ double ContainerSingle2D::getBinEntries(HcalTrigTowerDetId const &id, double x) {
487  if (_qx->isCoordinate())
488  return _me->getBinEntries(_qx->getBin(id) + _qx->wofnbins() * _qy->getBin(x));
489  else
490  return _me->getBinEntries(_qx->getBin(x) + _qx->wofnbins() * _qy->getBin(id));
491  }
492 
493  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, int x) {
494  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
495  }
496  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, double x) {
497  _me->setBinContent(_qx->getBin(id), _qy->getBin(id), x);
498  }
499  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, int x, int y) {
500  if (_qx->isCoordinate())
501  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
502  else
503  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
504  }
505  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, int x, double y) {
506  if (_qx->isCoordinate())
507  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
508  else
509  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
510  }
511  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, double x, int y) {
512  if (_qx->isCoordinate())
513  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
514  else
515  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
516  }
517  /* virtual */ void ContainerSingle2D::setBinContent(HcalTrigTowerDetId const &id, double x, double y) {
518  if (_qx->isCoordinate())
519  _me->setBinContent(_qx->getBin(id), _qy->getBin(x), y);
520  else
521  _me->setBinContent(_qx->getBin(x), _qy->getBin(id), y);
522  }
523 
524  /* virtual */ void ContainerSingle2D::extendAxisRange(int l) {
525  if (l < _qx->nbins())
526  return;
527 
528  int x = _qx->nbins();
529  while (l >= x) {
530  _me->getTH1()->LabelsInflate();
531  x *= 2;
532  _qx->setMax(x);
533  }
534  }
535 
536  void ContainerSingle2D::showOverflowZ(bool showOverflow) { _qz->showOverflow(showOverflow); }
537 } // namespace hcaldqm
hcal_dqm_sourceclient-live_cfg.subsystem
subsystem
Definition: hcal_dqm_sourceclient-live_cfg.py:16
hcaldqm::ContainerSingle2D::_qy
quantity::Quantity * _qy
Definition: ContainerSingle2D.h:157
dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:636
hcaldqm::quantity::Quantity::showOverflow
virtual void showOverflow(bool showOverflow)
Definition: Quantity.h:68
mps_fire.i
i
Definition: mps_fire.py:428
hcaldqm::ContainerSingle2D::showOverflowZ
void showOverflowZ(bool showOverflow)
Definition: ContainerSingle2D.cc:536
hcaldqm::quantity::Quantity::setAxisType
virtual void setAxisType(AxisType at)
Definition: Quantity.h:36
printsummarytable.folder
folder
Definition: printsummarytable.py:7
hcaldqm
Definition: Constants.h:8
hcaldqm::quantity::Quantity::setBits
virtual void setBits(TH1 *o)
Definition: Quantity.h:51
hcaldqm::ContainerSingle2D::_me
MonitorElement * _me
Definition: ContainerSingle2D.h:155
hcaldqm::Container::initialize
virtual void initialize(std::string const &folder, std::string const &qname, int debug=0)
Definition: Container.h:30
constants
hcaldqm::quantity::Quantity::type
virtual QuantityType type()
Definition: Quantity.h:33
hcaldqm::ContainerSingle2D
Definition: ContainerSingle2D.h:20
Utilities.h
hcaldqm::quantity::fZAxis
Definition: Quantity.h:25
hcaldqm::quantity::Quantity::min
virtual double min()
Definition: Quantity.h:59
hcaldqm::Container::_folder
std::string _folder
Definition: Container.h:37
hcaldqm::quantity::Quantity::getBin
virtual uint32_t getBin(HcalDetId const &)
Definition: Quantity.h:39
hcaldqm::Container
Definition: Container.h:21
hcaldqm::ContainerSingle2D::fill
virtual void fill(int, int)
Definition: ContainerSingle2D.cc:105
hcaldqm::quantity::Quantity::nbins
virtual int nbins()
Definition: Quantity.h:57
hcaldqm::ContainerSingle2D::load
virtual void load(DQMStore::IGetter &, std::string subsystem="Hcal", std::string aux="")
Definition: ContainerSingle2D.cc:81
hcaldqm::quantity::fDetectorQuantity
Definition: Quantity.h:16
debug
#define debug
Definition: HDRShower.cc:19
hcaldqm::quantity::Quantity::getValue
virtual int getValue(HcalDetId const &)
Definition: Quantity.h:45
hcaldqm::ContainerSingle2D::~ContainerSingle2D
~ContainerSingle2D() override
Definition: ContainerSingle2D.cc:34
hcaldqm::ContainerSingle2D::getBinContent
virtual double getBinContent(int, int)
Definition: ContainerSingle2D.cc:129
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
hcaldqm::quantity::Quantity::wofnbins
virtual int wofnbins()
Definition: Quantity.h:58
hcaldqm::quantity::Quantity::max
virtual double max()
Definition: Quantity.h:60
h
hcaldqm::quantity::fYAxis
Definition: Quantity.h:25
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:475
MjjMonitor_cfi.quantity
quantity
Definition: MjjMonitor_cfi.py:10
hcaldqm::quantity::Quantity::getLabels
virtual std::vector< std::string > getLabels()
Definition: Quantity.h:62
hcaldqm::ContainerSingle2D::customize
virtual void customize()
Definition: ContainerSingle2D.cc:85
hcaldqm::quantity::Quantity::name
virtual std::string name()
Definition: Quantity.h:34
hcaldqm::ContainerSingle2D::getBinEntries
virtual double getBinEntries(int, int)
Definition: ContainerSingle2D.cc:141
hcaldqm::ContainerSingle2D::_qz
quantity::Quantity * _qz
Definition: ContainerSingle2D.h:158
hcaldqm::ContainerSingle2D::ContainerSingle2D
ContainerSingle2D()
Definition: ContainerSingle2D.cc:7
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
HcalDetId
Definition: HcalDetId.h:12
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:762
cuy.ib
ib
Definition: cuy.py:661
hcaldqm::quantity::Quantity
Definition: Quantity.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
hcaldqm::quantity::Quantity::setMax
virtual void setMax(double)
Definition: Quantity.h:64
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:682
hcaldqm::ContainerSingle2D::extendAxisRange
virtual void extendAxisRange(int)
Definition: ContainerSingle2D.cc:524
dqm::implementation::IGetter
Definition: DQMStore.h:484
hcaldqm::ContainerSingle2D::setBinContent
virtual void setBinContent(int, int, int)
Definition: ContainerSingle2D.cc:154
hcaldqm::ContainerSingle2D::book
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
Definition: ContainerSingle2D.cc:68
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
hcaldqm::ContainerSingle2D::initialize
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: ContainerSingle2D.cc:46
ContainerSingle2D.h
hcaldqm::quantity::Quantity::isCoordinate
virtual bool isCoordinate()
Definition: Quantity.h:61
hcaldqm::ContainerSingle2D::_qx
quantity::Quantity * _qx
Definition: ContainerSingle2D.h:156
hcaldqm::quantity::fXAxis
Definition: Quantity.h:25
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:583
hcaldqm::Container::_qname
std::string _qname
Definition: Container.h:38
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14