test
CMS 3D CMS Logo

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