CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Container2D.cc
Go to the documentation of this file.
1 
4 
5 namespace hcaldqm
6 {
7  using namespace constants;
8  using namespace quantity;
9  using namespace mapper;
10 
12  _qz(NULL)
13  {}
14 
16  hashfunctions::HashType hashtype, Quantity *qx, Quantity *qy,
17  Quantity *qz) :
18  Container1D(folder, hashtype, qx, qy), _qz(qz)
19  {
23  }
24 
26  {
27  if (_qz!=NULL)
28  delete _qz;
29  _qz = NULL;
30  }
31 
32  /* virtual */ void Container2D::initialize(std::string const& folder,
33  hashfunctions::HashType hashtype,
34  Quantity *qx, Quantity *qy, Quantity *qz,
35  int debug/*=0*/)
36  {
38  qz->name()+"vs"+qy->name()+"vs"+qx->name(),
39  hashtype, qx, qy, debug);
40  _qz = qz;
43  _qz->setAxisType(quantity::fZAxis);
44  }
45 
46  /* virtual */ void Container2D::initialize(std::string const& folder,
47  std::string const& qname,
48  hashfunctions::HashType hashtype,
49  Quantity *qx, Quantity *qy, Quantity *qz,
50  int debug/*=0*/)
51  {
52  Container1D::initialize(folder, qname, hashtype, qx, qy, debug);
53  _qz = qz;
57  }
58 
59  /* virtual */ void Container2D::fill(HcalDetId const& did)
60  {
61  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
62  _qy->getValue(did));
63  }
64 
65  // HcalDetId based
66  /* virtual */ void Container2D::fill(HcalDetId const& did, int x)
67  {
68  if (_qx->isCoordinate() && _qy->isCoordinate())
69  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
70  _qy->getValue(did), x);
71  else if (_qx->isCoordinate())
72  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
73  _qy->getValue(x));
74  else if (_qy->isCoordinate())
75  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
76  _qy->getValue(did));
77  }
78 
79  /* virtual */ void Container2D::fill(HcalDetId const& did, double x)
80  {
81  if (_qx->isCoordinate() && _qy->isCoordinate())
82  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
83  _qy->getValue(did), x);
84  else if (_qx->isCoordinate())
85  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
86  _qy->getValue(x));
87  else if (_qy->isCoordinate())
88  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
89  _qy->getValue(did));
90  }
91 
92  /* virtual */ void Container2D::fill(HcalDetId const& did,
93  int x, double y)
94  {
95  if (_qx->isCoordinate() && !_qy->isCoordinate())
96  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
97  _qy->getValue(x), y);
98  else if (!_qx->isCoordinate() && _qy->isCoordinate())
99  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
100  _qy->getValue(did), y);
101  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
102  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
103  _qy->getValue(y));
104  }
105 
106  /* virtual */ void Container2D::fill(HcalDetId const& did,
107  int x, int y)
108  {
109  if (_qx->isCoordinate() && !_qy->isCoordinate())
110  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
111  _qy->getValue(x), y);
112  else if (!_qx->isCoordinate() && _qy->isCoordinate())
113  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
114  _qy->getValue(did), y);
115  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
116  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
117  _qy->getValue(y));
118  }
119 
120  /* virtual */ void Container2D::fill(HcalDetId const& did,
121  double x, double y)
122  {
123  if (_qx->isCoordinate() && !_qy->isCoordinate())
124  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
125  _qy->getValue(x), y);
126  else if (!_qx->isCoordinate() && _qy->isCoordinate())
127  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
128  _qy->getValue(did), y);
129  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
130  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
131  _qy->getValue(y));
132  }
133 
134  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
135  id)
136  {
137  return _mes[_hashmap.getHash(id)]->getBinEntries(
138  _qx->getBin(id)+_qy->getBin(id)*_qx->wofnbins());
139  }
140 
141  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
142  id, int x)
143  {
144  if (_qx->isCoordinate())
145  return _mes[_hashmap.getHash(id)]->getBinEntries(
146  _qx->getBin(id)+_qy->getBin(x)*_qx->wofnbins());
147  else
148  return _mes[_hashmap.getHash(id)]->getBinEntries(
149  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
150  }
151 
152  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
153  id, double x)
154  {
155  if (_qx->isCoordinate())
156  return _mes[_hashmap.getHash(id)]->getBinEntries(
157  _qx->getBin(id)+ _qy->getBin(x)*_qx->wofnbins());
158  else
159  return _mes[_hashmap.getHash(id)]->getBinEntries(
160  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
161  }
162 
163  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
164  id, int x, int y)
165  {
166  return _mes[_hashmap.getHash(id)]->getBinEntries(
167  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
168  }
169 
170  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
171  id, int x, double y)
172  {
173  return _mes[_hashmap.getHash(id)]->getBinEntries(
174  _qx->getBin(x)+_qy->getBin(y)*_qx->wofnbins());
175  }
176 
177  /* virtual */ double Container2D::getBinEntries(HcalDetId const&
178  id, double x, double y)
179  {
180  return _mes[_hashmap.getHash(id)]->getBinEntries(
181  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
182  }
183 
184  /* virtual */ double Container2D::getBinContent(HcalDetId const&
185  id)
186  {
187  return _mes[_hashmap.getHash(id)]->getBinContent(
188  _qx->getBin(id), _qy->getBin(id));
189  }
190 
191  /* virtual */ double Container2D::getBinContent(HcalDetId const&
192  id, int x)
193  {
194  if (_qx->isCoordinate())
195  return _mes[_hashmap.getHash(id)]->getBinContent(
196  _qx->getBin(id), _qy->getBin(x));
197  else
198  return _mes[_hashmap.getHash(id)]->getBinContent(
199  _qx->getBin(x), _qy->getBin(id));
200  }
201 
202  /* virtual */ double Container2D::getBinContent(HcalDetId const&
203  id, double x)
204  {
205  if (_qx->isCoordinate())
206  return _mes[_hashmap.getHash(id)]->getBinContent(
207  _qx->getBin(id), _qy->getBin(x));
208  else
209  return _mes[_hashmap.getHash(id)]->getBinContent(
210  _qx->getBin(x), _qy->getBin(id));
211  }
212 
213  /* virtual */ double Container2D::getBinContent(HcalDetId const&
214  id, int x, int y)
215  {
216  return _mes[_hashmap.getHash(id)]->getBinContent(
217  _qx->getBin(x), _qy->getBin(y));
218  }
219 
220  /* virtual */ double Container2D::getBinContent(HcalDetId const&
221  id, int x, double y)
222  {
223  return _mes[_hashmap.getHash(id)]->getBinContent(
224  _qx->getBin(x), _qy->getBin(y));
225  }
226 
227  /* virtual */ double Container2D::getBinContent(HcalDetId const&
228  id, double x, double y)
229  {
230  return _mes[_hashmap.getHash(id)]->getBinContent(
231  _qx->getBin(x), _qy->getBin(y));
232  }
233 
234  // setBinContent
235  /* virtual */ void Container2D::setBinContent(HcalDetId const& id, int x)
236  {
237  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
238  _qy->getBin(id), x);
239  }
240  /* virtual */ void Container2D::setBinContent(HcalDetId const& id, double x)
241  {
242  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
243  _qy->getBin(id), x);
244  }
245  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
246  int x, int y)
247  {
248  if (_qx->isCoordinate())
249  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
250  _qy->getBin(x), y);
251  else
252  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
253  _qy->getBin(id), y);
254  }
255 
256  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
257  int x, double y)
258  {
259  if (_qx->isCoordinate())
260  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
261  _qy->getBin(x), y);
262  else
263  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
264  _qy->getBin(id), y);
265  }
266  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
267  double x, int y)
268  {
269  if (_qx->isCoordinate())
270  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
271  _qy->getBin(x), y);
272  else
273  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
274  _qy->getBin(id), y);
275  }
276  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
277  double x, double y)
278  {
279  if (_qx->isCoordinate())
280  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
281  _qy->getBin(x), y);
282  else
283  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
284  _qy->getBin(id), y);
285  }
286 
287  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
288  int x, int y, int z)
289  {
290  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
291  _qy->getBin(y), z);
292  }
293  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
294  int x, double y, int z)
295  {
296  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
297  _qy->getBin(y), z);
298  }
299  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
300  double x, int y, int z)
301  {
302  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
303  _qy->getBin(y), z);
304  }
305  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
306  double x, double y, int z)
307  {
308  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
309  _qy->getBin(y), z);
310  }
311  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
312  int x, int y, double z)
313  {
314  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
315  _qy->getBin(y), z);
316  }
317  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
318  int x, double y, double z)
319  {
320  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
321  _qy->getBin(y), z);
322  }
323  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
324  double x, int y, double z)
325  {
326  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
327  _qy->getBin(y), z);
328  }
329  /* virtual */ void Container2D::setBinContent(HcalDetId const& id,
330  double x, double y, double z)
331  {
332  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
333  _qy->getBin(y), z);
334  }
335 
336  // by ElectronicsId
337  /* virtual */ void Container2D::fill(HcalElectronicsId const& did)
338  {
339  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
340  _qy->getValue(did));
341  }
342 
343  /* virtual */ void Container2D::fill(HcalElectronicsId const& did, int x)
344  {
345  if (_qx->isCoordinate() && _qy->isCoordinate())
346  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
347  _qy->getValue(did), x);
348  else if (_qx->isCoordinate())
349  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
350  _qy->getValue(x));
351  else if (_qy->isCoordinate())
352  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
353  _qy->getValue(did));
354  }
355 
356  /* virtual */ void Container2D::fill(HcalElectronicsId const& did, double x)
357  {
358  if (_qx->isCoordinate() && _qy->isCoordinate())
359  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
360  _qy->getValue(did), x);
361  else if (_qx->isCoordinate())
362  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
363  _qy->getValue(x));
364  else if (_qy->isCoordinate())
365  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
366  _qy->getValue(did));
367  }
368 
369  /* virtual */ void Container2D::fill(HcalElectronicsId const& did,
370  int x, double y)
371  {
372  if (_qx->isCoordinate() && !_qy->isCoordinate())
373  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
374  _qy->getValue(x), y);
375  else if (!_qx->isCoordinate() && _qy->isCoordinate())
376  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
377  _qy->getValue(did), y);
378  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
379  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
380  _qy->getValue(y));
381  }
382 
383  /* virtual */ void Container2D::fill(HcalElectronicsId const& did,
384  int x, int y)
385  {
386  if (_qx->isCoordinate() && !_qy->isCoordinate())
387  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
388  _qy->getValue(x), y);
389  else if (!_qx->isCoordinate() && _qy->isCoordinate())
390  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
391  _qy->getValue(did), y);
392  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
393  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
394  _qy->getValue(y));
395  }
396 
397  /* virtual */ void Container2D::fill(HcalElectronicsId const& did,
398  double x, double y)
399  {
400  if (_qx->isCoordinate() && !_qy->isCoordinate())
401  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
402  _qy->getValue(x), y);
403  else if (!_qx->isCoordinate() && _qy->isCoordinate())
404  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
405  _qy->getValue(did), y);
406  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
407  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
408  _qy->getValue(y));
409  }
410 
411  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
412  id)
413  {
414  return _mes[_hashmap.getHash(id)]->getBinEntries(
415  _qx->getBin(id)+_qy->getBin(id)*_qx->wofnbins());
416 
417  }
418 
419  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
420  id, int x)
421  {
422  if (_qx->isCoordinate())
423  return _mes[_hashmap.getHash(id)]->getBinEntries(
424  _qx->getBin(id)+_qy->getBin(x)*_qx->wofnbins());
425  else
426  return _mes[_hashmap.getHash(id)]->getBinEntries(
427  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
428  }
429 
430  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
431  id, double x)
432  {
433  if (_qx->isCoordinate())
434  return _mes[_hashmap.getHash(id)]->getBinEntries(
435  _qx->getBin(id)+ _qy->getBin(x)*_qx->wofnbins());
436  else
437  return _mes[_hashmap.getHash(id)]->getBinEntries(
438  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
439  }
440 
441  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
442  id, int x, int y)
443  {
444  return _mes[_hashmap.getHash(id)]->getBinEntries(
445  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
446  }
447 
448  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
449  id, int x, double y)
450  {
451  return _mes[_hashmap.getHash(id)]->getBinEntries(
452  _qx->getBin(x)+_qy->getBin(y)*_qx->wofnbins());
453  }
454 
455  /* virtual */ double Container2D::getBinEntries(HcalElectronicsId const&
456  id, double x, double y)
457  {
458  return _mes[_hashmap.getHash(id)]->getBinEntries(
459  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
460  }
461 
462  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
463  id)
464  {
465  return _mes[_hashmap.getHash(id)]->getBinContent(
466  _qx->getBin(id), _qy->getBin(id));
467  }
468 
469  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
470  id, int x)
471  {
472  if (_qx->isCoordinate())
473  return _mes[_hashmap.getHash(id)]->getBinContent(
474  _qx->getBin(id), _qy->getBin(x));
475  else
476  return _mes[_hashmap.getHash(id)]->getBinContent(
477  _qx->getBin(x), _qy->getBin(id));
478  }
479 
480  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
481  id, double x)
482  {
483  if (_qx->isCoordinate())
484  return _mes[_hashmap.getHash(id)]->getBinContent(
485  _qx->getBin(id), _qy->getBin(x));
486  else
487  return _mes[_hashmap.getHash(id)]->getBinContent(
488  _qx->getBin(x), _qy->getBin(id));
489  }
490 
491  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
492  id, int x, int y)
493  {
494  return _mes[_hashmap.getHash(id)]->getBinContent(
495  _qx->getBin(x), _qy->getBin(y));
496  }
497 
498  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
499  id, int x, double y)
500  {
501  return _mes[_hashmap.getHash(id)]->getBinContent(
502  _qx->getBin(x), _qy->getBin(y));
503  }
504 
505  /* virtual */ double Container2D::getBinContent(HcalElectronicsId const&
506  id, double x, double y)
507  {
508  return _mes[_hashmap.getHash(id)]->getBinContent(
509  _qx->getBin(x), _qy->getBin(y));
510  }
511 
512  // setBinContent
513  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
514  int x)
515  {
516  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
517  _qy->getBin(id), x);
518  }
519  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id, double x)
520  {
521  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
522  _qy->getBin(id), x);
523  }
524  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
525  int x, int y)
526  {
527  if (_qx->isCoordinate())
528  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
529  _qy->getBin(x), y);
530  else
531  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
532  _qy->getBin(id), y);
533  }
534 
535  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
536  int x, double y)
537  {
538  if (_qx->isCoordinate())
539  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
540  _qy->getBin(x), y);
541  else
542  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
543  _qy->getBin(id), y);
544  }
545  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
546  double x, int y)
547  {
548  if (_qx->isCoordinate())
549  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
550  _qy->getBin(x), y);
551  else
552  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
553  _qy->getBin(id), y);
554  }
555  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
556  double x, double y)
557  {
558  if (_qx->isCoordinate())
559  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
560  _qy->getBin(x), y);
561  else
562  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
563  _qy->getBin(id), y);
564  }
565 
566  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
567  int x, int y, int z)
568  {
569  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
570  _qy->getBin(y), z);
571  }
572  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
573  int x, double y, int z)
574  {
575  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
576  _qy->getBin(y), z);
577  }
578  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
579  double x, int y, int z)
580  {
581  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
582  _qy->getBin(y), z);
583  }
584  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
585  double x, double y, int z)
586  {
587  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
588  _qy->getBin(y), z);
589  }
590  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
591  int x, int y, double z)
592  {
593  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
594  _qy->getBin(y), z);
595  }
596  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
597  int x, double y, double z)
598  {
599  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
600  _qy->getBin(y), z);
601  }
602  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
603  double x, int y, double z)
604  {
605  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
606  _qy->getBin(y), z);
607  }
608  /* virtual */ void Container2D::setBinContent(HcalElectronicsId const& id,
609  double x, double y, double z)
610  {
611  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
612  _qy->getBin(y), z);
613  }
614 
615  // by TrigTowerDetId
616  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did)
617  {
618  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
619  _qy->getValue(did));
620  }
621 
622  // HcalDetId based
623  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did, int x)
624  {
625  if (_qx->isCoordinate() && _qy->isCoordinate())
626  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
627  _qy->getValue(did), x);
628  else if (_qx->isCoordinate())
629  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
630  _qy->getValue(x));
631  else if (_qy->isCoordinate())
632  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
633  _qy->getValue(did));
634  }
635 
636  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did,
637  double x)
638  {
639  if (_qx->isCoordinate() && _qy->isCoordinate())
640  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
641  _qy->getValue(did), x);
642  else if (_qx->isCoordinate())
643  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
644  _qy->getValue(x));
645  else if (_qy->isCoordinate())
646  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
647  _qy->getValue(did));
648  }
649 
650  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did,
651  int x, double y)
652  {
653  if (_qx->isCoordinate() && !_qy->isCoordinate())
654  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
655  _qy->getValue(x), y);
656  else if (!_qx->isCoordinate() && _qy->isCoordinate())
657  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
658  _qy->getValue(did), y);
659  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
660  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
661  _qy->getValue(y));
662  }
663 
664  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did,
665  int x, int y)
666  {
667  if (_qx->isCoordinate() && !_qy->isCoordinate())
668  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
669  _qy->getValue(x), y);
670  else if (!_qx->isCoordinate() && _qy->isCoordinate())
671  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
672  _qy->getValue(did), y);
673  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
674  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
675  _qy->getValue(y));
676  }
677 
678  /* virtual */ void Container2D::fill(HcalTrigTowerDetId const& did,
679  double x, double y)
680  {
681  if (_qx->isCoordinate() && !_qy->isCoordinate())
682  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(did),
683  _qy->getValue(x), y);
684  else if (!_qx->isCoordinate() && _qy->isCoordinate())
685  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
686  _qy->getValue(did), y);
687  else if (!_qx->isCoordinate() && !_qy->isCoordinate())
688  _mes[_hashmap.getHash(did)]->Fill(_qx->getValue(x),
689  _qy->getValue(y));
690  }
691 
692  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
693  id)
694  {
695  return _mes[_hashmap.getHash(id)]->getBinEntries(
696  _qx->getBin(id)+_qy->getBin(id)*_qx->wofnbins());
697  }
698 
699  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
700  id, int x)
701  {
702  if (_qx->isCoordinate())
703  return _mes[_hashmap.getHash(id)]->getBinEntries(
704  _qx->getBin(id)+_qy->getBin(x)*_qx->wofnbins());
705  else
706  return _mes[_hashmap.getHash(id)]->getBinEntries(
707  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
708  }
709 
710  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
711  id, double x)
712  {
713  if (_qx->isCoordinate())
714  return _mes[_hashmap.getHash(id)]->getBinEntries(
715  _qx->getBin(id)+ _qy->getBin(x)*_qx->wofnbins());
716  else
717  return _mes[_hashmap.getHash(id)]->getBinEntries(
718  _qx->getBin(x)+_qy->getBin(id)*_qx->wofnbins());
719  }
720 
721  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
722  id, int x, int y)
723  {
724  return _mes[_hashmap.getHash(id)]->getBinEntries(
725  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
726  }
727 
728  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
729  id, int x, double y)
730  {
731  return _mes[_hashmap.getHash(id)]->getBinEntries(
732  _qx->getBin(x)+_qy->getBin(y)*_qx->wofnbins());
733  }
734 
735  /* virtual */ double Container2D::getBinEntries(HcalTrigTowerDetId const&
736  id, double x, double y)
737  {
738  return _mes[_hashmap.getHash(id)]->getBinEntries(
739  _qx->getBin(x)+ _qy->getBin(y)*_qx->wofnbins());
740  }
741 
742  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
743  id)
744  {
745  return _mes[_hashmap.getHash(id)]->getBinContent(
746  _qx->getBin(id), _qy->getBin(id));
747  }
748 
749  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
750  id, int x)
751  {
752  if (_qx->isCoordinate())
753  return _mes[_hashmap.getHash(id)]->getBinContent(
754  _qx->getBin(id), _qy->getBin(x));
755  else
756  return _mes[_hashmap.getHash(id)]->getBinContent(
757  _qx->getBin(x), _qy->getBin(id));
758  }
759 
760  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
761  id, double x)
762  {
763  if (_qx->isCoordinate())
764  return _mes[_hashmap.getHash(id)]->getBinContent(
765  _qx->getBin(id), _qy->getBin(x));
766  else
767  return _mes[_hashmap.getHash(id)]->getBinContent(
768  _qx->getBin(x), _qy->getBin(id));
769  }
770 
771  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
772  id, int x, int y)
773  {
774  return _mes[_hashmap.getHash(id)]->getBinContent(
775  _qx->getBin(x), _qy->getBin(y));
776  }
777 
778  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
779  id, int x, double y)
780  {
781  return _mes[_hashmap.getHash(id)]->getBinContent(
782  _qx->getBin(x), _qy->getBin(y));
783  }
784 
785  /* virtual */ double Container2D::getBinContent(HcalTrigTowerDetId const&
786  id, double x, double y)
787  {
788  return _mes[_hashmap.getHash(id)]->getBinContent(
789  _qx->getBin(x), _qy->getBin(y));
790  }
791 
792  // setBinContent
793  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id, int x)
794  {
795  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
796  _qy->getBin(id), x);
797  }
798  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id, double x)
799  {
800  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
801  _qy->getBin(id), x);
802  }
803  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
804  int x, int y)
805  {
806  if (_qx->isCoordinate())
807  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
808  _qy->getBin(x), y);
809  else
810  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
811  _qy->getBin(id), y);
812  }
813 
814  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
815  int x, double y)
816  {
817  if (_qx->isCoordinate())
818  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
819  _qy->getBin(x), y);
820  else
821  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
822  _qy->getBin(id), y);
823  }
824  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
825  double x, int y)
826  {
827  if (_qx->isCoordinate())
828  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
829  _qy->getBin(x), y);
830  else
831  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
832  _qy->getBin(id), y);
833  }
834  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
835  double x, double y)
836  {
837  if (_qx->isCoordinate())
838  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(id),
839  _qy->getBin(x), y);
840  else
841  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
842  _qy->getBin(id), y);
843  }
844 
845  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
846  int x, int y, int z)
847  {
848  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
849  _qy->getBin(y), z);
850  }
851  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
852  int x, double y, int z)
853  {
854  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
855  _qy->getBin(y), z);
856  }
857  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
858  double x, int y, int z)
859  {
860  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
861  _qy->getBin(y), z);
862  }
863  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
864  double x, double y, int z)
865  {
866  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
867  _qy->getBin(y), z);
868  }
869  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
870  int x, int y, double z)
871  {
872  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
873  _qy->getBin(y), z);
874  }
875  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
876  int x, double y, double z)
877  {
878  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
879  _qy->getBin(y), z);
880  }
881  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
882  double x, int y, double z)
883  {
884  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
885  _qy->getBin(y), z);
886  }
887  /* virtual */ void Container2D::setBinContent(HcalTrigTowerDetId const& id,
888  double x, double y, double z)
889  {
890  _mes[_hashmap.getHash(id)]->setBinContent(_qx->getBin(x),
891  _qy->getBin(y), z);
892  }
893 
894  // booking
895  /* virtual */ void Container2D::book(DQMStore::IBooker &ib,
896  HcalElectronicsMap const *emap,
898  {
899 
900  // full path as in Container1D.cc
901  //
902  ib.setCurrentFolder(subsystem+"/"+_folder+"/"+_qname+
903  (aux==""?aux:"_"+aux)+"/"+_hashmap.getHashTypeName());
904  if (_hashmap.isDHash())
905  {
906  // for Detector Hashes
907  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
908  for (std::vector<HcalGenericDetId>::const_iterator it=
909  dids.begin(); it!=dids.end(); ++it)
910  {
911  // skip trigger towers and calib
912  if (!it->isHcalDetId())
913  continue;
914 
915  HcalDetId did = HcalDetId(it->rawId());
916  uint32_t hash = _hashmap.getHash(did);
917  MEMap::iterator mit = _mes.find(hash);
918  if (mit!=_mes.end())
919  continue;
920 
922  _mes.insert(
923  std::make_pair(hash, ib.book2D(_hashmap.getName(did),
924  _hashmap.getName(did), _qx->nbins(), _qx->min(),
925  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
926  customize(_mes[hash]);
927  }
928  }
929  else if (_hashmap.isEHash())
930  {
931  // for Electronics hashes
932  std::vector<HcalElectronicsId> eids =
934  for (std::vector<HcalElectronicsId>::const_iterator it=
935  eids.begin(); it!=eids.end(); ++it)
936  {
937  HcalElectronicsId eid = HcalElectronicsId(it->rawId());
938  uint32_t hash = _hashmap.getHash(eid);
939  MEMap::iterator mit = _mes.find(hash);
940  if (mit!=_mes.end())
941  continue;
942 
944  _mes.insert(
945  std::make_pair(hash, ib.book2D(_hashmap.getName(eid),
946  _hashmap.getName(eid), _qx->nbins(), _qx->min(),
947  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
948  customize(_mes[hash]);
949  }
950  }
951  else if (_hashmap.isTHash())
952  {
953  // for TrigTower hashes
954  std::vector<HcalTrigTowerDetId> tids =
955  emap->allTriggerId();
956  for (std::vector<HcalTrigTowerDetId>::const_iterator it=
957  tids.begin(); it!=tids.end(); ++it)
958  {
959  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
961  uint32_t hash = _hashmap.getHash(tid);
962  MEMap::iterator mit = _mes.find(hash);
963  if (mit!=_mes.end())
964  continue;
965 
967  _mes.insert(
968  std::make_pair(hash, ib.book2D(_hashmap.getName(tid),
969  _hashmap.getName(tid), _qx->nbins(), _qx->min(),
970  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
971 
972  customize(_mes[hash]);
973  }
974  }
975  }
976 
977  /* virtual */ void Container2D::book(DQMStore::IBooker &ib,
978  HcalElectronicsMap const *emap, filter::HashFilter const& filter,
980  {
981 
982  // full path as in Container1D.cc
983  //
984  ib.setCurrentFolder(subsystem+"/"+_folder+"/"+_qname+
985  (aux==""?aux:"_"+aux)+"/"+_hashmap.getHashTypeName());
986  if (_hashmap.isDHash())
987  {
988  // for Detector Hashes
989  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
990  for (std::vector<HcalGenericDetId>::const_iterator it=
991  dids.begin(); it!=dids.end(); ++it)
992  {
993  // skip trigger towers and calib
994  if (!it->isHcalDetId())
995  continue;
996 
997  HcalDetId did = HcalDetId(it->rawId());
998  uint32_t hash = _hashmap.getHash(did);
999  MEMap::iterator mit = _mes.find(hash);
1000  if (mit!=_mes.end())
1001  continue;
1002  if (filter.filter(did))
1003  continue;
1004 
1005  _logger.debug(_hashmap.getName(did));
1006  _mes.insert(
1007  std::make_pair(hash, ib.book2D(_hashmap.getName(did),
1008  _hashmap.getName(did), _qx->nbins(), _qx->min(),
1009  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1010  customize(_mes[hash]);
1011  }
1012  }
1013  else if (_hashmap.isEHash())
1014  {
1015  // for Electronics hashes
1016  std::vector<HcalElectronicsId> eids =
1017  emap->allElectronicsIdPrecision();
1018  for (std::vector<HcalElectronicsId>::const_iterator it=
1019  eids.begin(); it!=eids.end(); ++it)
1020  {
1021  HcalElectronicsId eid = HcalElectronicsId(it->rawId());
1022  uint32_t hash = _hashmap.getHash(eid);
1023  MEMap::iterator mit = _mes.find(hash);
1024  if (mit!=_mes.end())
1025  continue;
1026  if (filter.filter(eid))
1027  continue;
1028 
1029  _logger.debug(_hashmap.getName(eid));
1030  _mes.insert(
1031  std::make_pair(hash, ib.book2D(_hashmap.getName(eid),
1032  _hashmap.getName(eid), _qx->nbins(), _qx->min(),
1033  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1034  customize(_mes[hash]);
1035  }
1036  }
1037  else if (_hashmap.isTHash())
1038  {
1039  // for TrigTower hashes
1040  std::vector<HcalTrigTowerDetId> tids =
1041  emap->allTriggerId();
1042  for (std::vector<HcalTrigTowerDetId>::const_iterator it=
1043  tids.begin(); it!=tids.end(); ++it)
1044  {
1045  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
1046  _logger.debug(_hashmap.getName(tid));
1047  uint32_t hash = _hashmap.getHash(tid);
1048  MEMap::iterator mit = _mes.find(hash);
1049  if (mit!=_mes.end())
1050  continue;
1051  if (filter.filter(tid))
1052  continue;
1053 
1054  _logger.debug(_hashmap.getName(tid));
1055  _mes.insert(
1056  std::make_pair(hash, ib.book2D(_hashmap.getName(tid),
1057  _hashmap.getName(tid), _qx->nbins(), _qx->min(),
1058  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1059 
1060  customize(_mes[hash]);
1061  }
1062  }
1063  }
1064 
1065  /* virtual */ void Container2D::book(DQMStore *store,
1066  HcalElectronicsMap const *emap,
1068  {
1069 
1070  // full path as in Container1D.cc
1071  //
1072  store->setCurrentFolder(subsystem+"/"+_folder+"/"+_qname+
1073  (aux==""?aux:"_"+aux)+"/"+_hashmap.getHashTypeName());
1074  if (_hashmap.isDHash())
1075  {
1076  // for Detector Hashes
1077  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
1078  for (std::vector<HcalGenericDetId>::const_iterator it=
1079  dids.begin(); it!=dids.end(); ++it)
1080  {
1081  // skip trigger towers and calib
1082  if (!it->isHcalDetId())
1083  continue;
1084 
1085  HcalDetId did = HcalDetId(it->rawId());
1086  uint32_t hash = _hashmap.getHash(did);
1087  MEMap::iterator mit = _mes.find(hash);
1088  if (mit!=_mes.end())
1089  continue;
1090 
1091  _logger.debug(_hashmap.getName(did));
1092  _mes.insert(
1093  std::make_pair(hash, store->book2D(_hashmap.getName(did),
1094  _hashmap.getName(did), _qx->nbins(), _qx->min(),
1095  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1096  customize(_mes[hash]);
1097  }
1098  }
1099  else if (_hashmap.isEHash())
1100  {
1101  // for Electronics hashes
1102  std::vector<HcalElectronicsId> eids =
1103  emap->allElectronicsIdPrecision();
1104  for (std::vector<HcalElectronicsId>::const_iterator it=
1105  eids.begin(); it!=eids.end(); ++it)
1106  {
1107  HcalElectronicsId eid = HcalElectronicsId(it->rawId());
1108  uint32_t hash = _hashmap.getHash(eid);
1109  MEMap::iterator mit = _mes.find(hash);
1110  if (mit!=_mes.end())
1111  continue;
1112 
1113  _logger.debug(_hashmap.getName(eid));
1114  _mes.insert(
1115  std::make_pair(hash, store->book2D(_hashmap.getName(eid),
1116  _hashmap.getName(eid), _qx->nbins(), _qx->min(),
1117  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1118  customize(_mes[hash]);
1119  }
1120  }
1121  else if (_hashmap.isTHash())
1122  {
1123  // for TrigTower hashes
1124  std::vector<HcalTrigTowerDetId> tids =
1125  emap->allTriggerId();
1126  for (std::vector<HcalTrigTowerDetId>::const_iterator it=
1127  tids.begin(); it!=tids.end(); ++it)
1128  {
1129  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
1130  _logger.debug(_hashmap.getName(tid));
1131  uint32_t hash = _hashmap.getHash(tid);
1132  MEMap::iterator mit = _mes.find(hash);
1133  if (mit!=_mes.end())
1134  continue;
1135 
1136  _logger.debug(_hashmap.getName(tid));
1137  _mes.insert(
1138  std::make_pair(hash, store->book2D(_hashmap.getName(tid),
1139  _hashmap.getName(tid), _qx->nbins(), _qx->min(),
1140  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1141 
1142  customize(_mes[hash]);
1143  }
1144  }
1145  }
1146 
1147  /* virtual */ void Container2D::book(DQMStore *store,
1148  HcalElectronicsMap const *emap, filter::HashFilter const& filter,
1150  {
1151 
1152  // full path as in Container1D.cc
1153  //
1154  store->setCurrentFolder(subsystem+"/"+_folder+"/"+_qname+
1155  (aux==""?aux:"_"+aux)+"/"+_hashmap.getHashTypeName());
1156  if (_hashmap.isDHash())
1157  {
1158  // for Detector Hashes
1159  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
1160  for (std::vector<HcalGenericDetId>::const_iterator it=
1161  dids.begin(); it!=dids.end(); ++it)
1162  {
1163  // skip trigger towers and calib
1164  if (!it->isHcalDetId())
1165  continue;
1166 
1167  HcalDetId did = HcalDetId(it->rawId());
1168  uint32_t hash = _hashmap.getHash(did);
1169  MEMap::iterator mit = _mes.find(hash);
1170  if (mit!=_mes.end())
1171  continue;
1172  if (filter.filter(did))
1173  continue;
1174 
1175  _logger.debug(_hashmap.getName(did));
1176  _mes.insert(
1177  std::make_pair(hash, store->book2D(_hashmap.getName(did),
1178  _hashmap.getName(did), _qx->nbins(), _qx->min(),
1179  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1180  customize(_mes[hash]);
1181  }
1182  }
1183  else if (_hashmap.isEHash())
1184  {
1185  // for Electronics hashes
1186  std::vector<HcalElectronicsId> eids =
1187  emap->allElectronicsIdPrecision();
1188  for (std::vector<HcalElectronicsId>::const_iterator it=
1189  eids.begin(); it!=eids.end(); ++it)
1190  {
1191  HcalElectronicsId eid = HcalElectronicsId(it->rawId());
1192  uint32_t hash = _hashmap.getHash(eid);
1193  MEMap::iterator mit = _mes.find(hash);
1194  if (mit!=_mes.end())
1195  continue;
1196  if (filter.filter(eid))
1197  continue;
1198 
1199  _logger.debug(_hashmap.getName(eid));
1200  _mes.insert(
1201  std::make_pair(hash, store->book2D(_hashmap.getName(eid),
1202  _hashmap.getName(eid), _qx->nbins(), _qx->min(),
1203  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1204  customize(_mes[hash]);
1205  }
1206  }
1207  else if (_hashmap.isTHash())
1208  {
1209  // for TrigTower hashes
1210  std::vector<HcalTrigTowerDetId> tids =
1211  emap->allTriggerId();
1212  for (std::vector<HcalTrigTowerDetId>::const_iterator it=
1213  tids.begin(); it!=tids.end(); ++it)
1214  {
1215  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
1216  _logger.debug(_hashmap.getName(tid));
1217  uint32_t hash = _hashmap.getHash(tid);
1218  MEMap::iterator mit = _mes.find(hash);
1219  if (mit!=_mes.end())
1220  continue;
1221  if (filter.filter(tid))
1222  continue;
1223 
1224  _logger.debug(_hashmap.getName(tid));
1225  _mes.insert(
1226  std::make_pair(hash, store->book2D(_hashmap.getName(tid),
1227  _hashmap.getName(tid), _qx->nbins(), _qx->min(),
1228  _qx->max(), _qy->nbins(), _qy->min(), _qy->max())));
1229 
1230  customize(_mes[hash]);
1231  }
1232  }
1233  }
1234 
1235  /* virtual */ void Container2D::customize(MonitorElement* me)
1236  {
1237  me->setAxisTitle(_qx->name(), 1);
1238  me->setAxisTitle(_qy->name(), 2);
1239  me->setAxisTitle(_qz->name(), 3);
1240 
1241  TH1 *h = me->getTH1();
1242  _qx->setBits(h);
1243  _qy->setBits(h);
1244  _qz->setBits(h);
1245 
1246  std::vector<std::string> xlabels = _qx->getLabels();
1247  std::vector<std::string> ylabels = _qy->getLabels();
1248  for (unsigned int i=0; i<xlabels.size(); i++)
1249  me->setBinLabel(i+1, xlabels[i], 1);
1250  for (unsigned int i=0; i<ylabels.size(); i++)
1251  me->setBinLabel(i+1, ylabels[i], 2);
1252  }
1253 }
1254 
1255 
virtual uint32_t getHash(HcalDetId const &did) const
Definition: HashMapper.h:33
int i
Definition: DBlmapReader.cc:9
virtual void setBits(TH1 *o)
Definition: Quantity.h:65
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *qy=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:40
virtual std::string name()
Definition: Quantity.h:47
virtual void setAxisType(AxisType at)
Definition: Quantity.h:49
virtual void setBinContent(HcalDetId const &, int)
Definition: Container2D.cc:235
virtual double getBinEntries(HcalDetId const &)
Definition: Container2D.cc:134
int ib
Definition: cuy.py:660
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
virtual int wofnbins()
Definition: Quantity.h:74
virtual std::vector< std::string > getLabels()
Definition: Quantity.h:78
virtual bool isTHash() const
Definition: HashMapper.h:62
virtual double max()
Definition: Quantity.h:76
void debug(STDTYPE const &msg) const
Definition: Logger.h:31
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)
#define NULL
Definition: scimark2.h:8
virtual std::string getHashTypeName() const
Definition: HashMapper.h:49
virtual void fill(HcalDetId const &)
Definition: Container2D.cc:59
virtual int getValue(HcalDetId const &)
Definition: Quantity.h:59
virtual ~Container2D()
Definition: Container2D.cc:25
virtual void customize(MonitorElement *)
virtual uint32_t getBin(HcalDetId const &)
Definition: Quantity.h:53
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
TH1 * getTH1(void) const
std::vector< HcalGenericDetId > allPrecisionId() const
std::string _folder
Definition: Container.h:42
#define debug
Definition: HDRShower.cc:19
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container2D.cc:895
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
mapper::HashMapper _hashmap
Definition: Container1D.h:330
virtual double min()
Definition: Quantity.h:75
virtual bool isCoordinate()
Definition: Quantity.h:77
virtual bool isDHash() const
Definition: HashMapper.h:55
std::string _qname
Definition: Container.h:43
virtual bool filter(HcalDetId const &) const
Definition: HashFilter.cc:36
virtual bool isEHash() const
Definition: HashMapper.h:57
virtual std::string getName(HcalDetId const &did) const
Definition: HashMapper.h:41
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1145
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Readout chain identification for Hcal.
std::vector< HcalTrigTowerDetId > allTriggerId() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:723
virtual double getBinContent(HcalDetId const &)
Definition: Container2D.cc:184