CMS 3D CMS Logo

ContainerProf1D.cc
Go to the documentation of this file.
2 
3 namespace hcaldqm {
4  using namespace mapper;
5  using namespace quantity;
6  using namespace constants;
7 
9  _qx = nullptr;
10  _qy = nullptr;
11  }
12 
14  hashfunctions::HashType hashtype,
15  Quantity *qx,
16  Quantity *qy)
17  : Container1D(folder, hashtype, qx, qy) {
20  }
21 
22  /* virtual */ void ContainerProf1D::initialize(
23  std::string const &folder, hashfunctions::HashType hashtype, Quantity *qx, Quantity *qy, int debug /*=0*/) {
24  Container1D::initialize(folder, hashtype, qx, qy, debug);
27  }
28 
29  /* virtual */ void ContainerProf1D::initialize(std::string const &folder,
30  std::string const &qname,
31  hashfunctions::HashType hashtype,
32  Quantity *qx,
33  Quantity *qy,
34  int debug /*=0*/) {
35  Container1D::initialize(folder, qname, hashtype, qx, qy, debug);
38  }
39 
41  HcalElectronicsMap const *emap,
43  std::string aux) {
44  // check Container1D.cc for the format
45  //
46  ib.setCurrentFolder(subsystem + "/" + _folder + "/" + _qname + (aux.empty() ? aux : "_" + aux) + "/" +
48  if (_hashmap.isDHash()) {
49  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
50  for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
51  // skip trigger towers and calibration
52  if (!it->isHcalDetId())
53  continue;
54 
55  HcalDetId did = HcalDetId(it->rawId());
56  uint32_t hash = _hashmap.getHash(did);
57  MEMap::iterator mit = _mes.find(hash);
58  if (mit != _mes.end())
59  continue;
60 
62  _mes.insert(std::make_pair(hash,
63  ib.bookProfile(_hashmap.getName(did),
64  _hashmap.getName(did),
65  _qx->nbins(),
66  _qx->min(),
67  _qx->max(),
68  _qy->min(),
69  _qy->max())));
71  }
72  } else if (_hashmap.isEHash()) {
73  std::vector<HcalElectronicsId> eids = emap->allElectronicsIdPrecision();
74  for (std::vector<HcalElectronicsId>::const_iterator it = eids.begin(); it != eids.end(); ++it) {
76  uint32_t hash = _hashmap.getHash(eid);
77  MEMap::iterator mit = _mes.find(hash);
78  if (mit != _mes.end())
79  continue;
80 
82  _mes.insert(std::make_pair(hash,
83  ib.bookProfile(_hashmap.getName(eid),
85  _qx->nbins(),
86  _qx->min(),
87  _qx->max(),
88  _qy->min(),
89  _qy->max())));
91  }
92  } else if (_hashmap.isTHash()) {
93  std::vector<HcalTrigTowerDetId> tids = emap->allTriggerId();
94  for (std::vector<HcalTrigTowerDetId>::const_iterator it = tids.begin(); it != tids.end(); ++it) {
95  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
96  uint32_t hash = _hashmap.getHash(tid);
97  MEMap::iterator mit = _mes.find(hash);
98  if (mit != _mes.end())
99  continue;
100 
102  _mes.insert(std::make_pair(hash,
103  ib.bookProfile(_hashmap.getName(tid),
104  _hashmap.getName(tid),
105  _qx->nbins(),
106  _qx->min(),
107  _qx->max(),
108  _qy->min(),
109  _qy->max())));
110  customize(_mes[hash]);
111  }
112  }
113  }
114 
116  HcalElectronicsMap const *emap,
117  filter::HashFilter const &filter,
119  std::string aux) {
120  // check Container1D.cc for the format
121  //
122  ib.setCurrentFolder(subsystem + "/" + _folder + "/" + _qname + (aux.empty() ? aux : "_" + aux) + "/" +
124  if (_hashmap.isDHash()) {
125  std::vector<HcalGenericDetId> dids = emap->allPrecisionId();
126  for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
127  // skip trigger towers and calibration
128  if (!it->isHcalDetId())
129  continue;
130 
131  HcalDetId did = HcalDetId(it->rawId());
132  uint32_t hash = _hashmap.getHash(did);
133  MEMap::iterator mit = _mes.find(hash);
134  if (mit != _mes.end())
135  continue;
136  if (filter.filter(did))
137  continue;
138 
140  _mes.insert(std::make_pair(hash,
141  ib.bookProfile(_hashmap.getName(did),
142  _hashmap.getName(did),
143  _qx->nbins(),
144  _qx->min(),
145  _qx->max(),
146  _qy->min(),
147  _qy->max())));
148  customize(_mes[hash]);
149  }
150  } else if (_hashmap.isEHash()) {
151  std::vector<HcalElectronicsId> eids = emap->allElectronicsIdPrecision();
152  for (std::vector<HcalElectronicsId>::const_iterator it = eids.begin(); it != eids.end(); ++it) {
153  HcalElectronicsId eid = HcalElectronicsId(it->rawId());
154  uint32_t hash = _hashmap.getHash(eid);
155  MEMap::iterator mit = _mes.find(hash);
156  if (mit != _mes.end())
157  continue;
158  if (filter.filter(eid))
159  continue;
160 
162  _mes.insert(std::make_pair(hash,
163  ib.bookProfile(_hashmap.getName(eid),
165  _qx->nbins(),
166  _qx->min(),
167  _qx->max(),
168  _qy->min(),
169  _qy->max())));
170  customize(_mes[hash]);
171  }
172  } else if (_hashmap.isTHash()) {
173  std::vector<HcalTrigTowerDetId> tids = emap->allTriggerId();
174  for (std::vector<HcalTrigTowerDetId>::const_iterator it = tids.begin(); it != tids.end(); ++it) {
175  HcalTrigTowerDetId tid = HcalTrigTowerDetId(it->rawId());
176  uint32_t hash = _hashmap.getHash(tid);
177  MEMap::iterator mit = _mes.find(hash);
178  if (mit != _mes.end())
179  continue;
180  if (filter.filter(tid))
181  continue;
182 
184  _mes.insert(std::make_pair(hash,
185  ib.bookProfile(_hashmap.getName(tid),
186  _hashmap.getName(tid),
187  _qx->nbins(),
188  _qx->min(),
189  _qx->max(),
190  _qy->min(),
191  _qy->max())));
192  customize(_mes[hash]);
193  }
194  }
195  }
196 } // namespace hcaldqm
hcal_dqm_sourceclient-live_cfg.subsystem
subsystem
Definition: hcal_dqm_sourceclient-live_cfg.py:16
hcaldqm::Container1D::_hashmap
mapper::HashMapper _hashmap
Definition: Container1D.h:233
hcaldqm::mapper::HashMapper::getHash
uint32_t getHash(HcalDetId const &did) const override
Definition: HashMapper.h:29
hcaldqm::mapper::HashMapper::isDHash
virtual bool isDHash() const
Definition: HashMapper.h:58
hcaldqm::quantity::Quantity::setAxisType
virtual void setAxisType(AxisType at)
Definition: Quantity.h:36
hcaldqm::hashfunctions::HashType
HashType
Definition: HashFunctions.h:131
printsummarytable.folder
folder
Definition: printsummarytable.py:7
cond::hash
Definition: Time.h:19
hcaldqm
Definition: Constants.h:8
hcaldqm::Container1D::_mes
MEMap _mes
Definition: Container1D.h:232
constants
hcaldqm::Container1D::_qx
quantity::Quantity * _qx
Definition: Container1D.h:234
hcaldqm::quantity::Quantity::min
virtual double min()
Definition: Quantity.h:59
hcaldqm::Container::_folder
std::string _folder
Definition: Container.h:37
hcaldqm::Container1D::_qy
quantity::Quantity * _qy
Definition: Container1D.h:235
hcaldqm::mapper::HashMapper::getName
std::string getName(HcalDetId const &did) const override
Definition: HashMapper.h:42
HcalElectronicsMap::allPrecisionId
std::vector< HcalGenericDetId > allPrecisionId() const
Definition: HcalElectronicsMap.cc:139
hcaldqm::quantity::Quantity::nbins
virtual int nbins()
Definition: Quantity.h:57
debug
#define debug
Definition: HDRShower.cc:19
hcaldqm::mapper::HashMapper::isTHash
virtual bool isTHash() const
Definition: HashMapper.h:62
HcalElectronicsMap::allTriggerId
std::vector< HcalTrigTowerDetId > allTriggerId() const
Definition: HcalElectronicsMap.cc:151
hcaldqm::ContainerProf1D::ContainerProf1D
ContainerProf1D()
Definition: ContainerProf1D.cc:8
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
hcaldqm::quantity::Quantity::max
virtual double max()
Definition: Quantity.h:60
hcaldqm::quantity::fYAxis
Definition: Quantity.h:25
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
MjjMonitor_cfi.quantity
quantity
Definition: MjjMonitor_cfi.py:10
hcaldqm::filter::HashFilter
Definition: HashFilter.h:21
hcaldqm::Container1D
Definition: Container1D.h:25
hcaldqm::Container::_logger
Logger _logger
Definition: Container.h:39
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
HcalDetId
Definition: HcalDetId.h:12
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
ContainerProf1D.h
cuy.ib
ib
Definition: cuy.py:661
hcaldqm::quantity::Quantity
Definition: Quantity.h:27
HcalElectronicsMap::allElectronicsIdPrecision
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
Definition: HcalElectronicsMap.cc:122
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalElectronicsMap
Definition: HcalElectronicsMap.h:31
hcaldqm::ContainerProf1D::initialize
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
Definition: ContainerProf1D.cc:22
hcaldqm::mapper::HashMapper::getHashTypeName
virtual std::string getHashTypeName() const
Definition: HashMapper.h:54
hcaldqm::Container1D::customize
virtual void customize(MonitorElement *)
Definition: Container1D.cc:737
dqm::implementation::IBooker
Definition: DQMStore.h:43
hcaldqm::Container1D::initialize
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:33
Logger::debug
void debug(STDTYPE const &msg) const
Definition: Logger.h:20
hcaldqm::ContainerProf1D::book
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: ContainerProf1D.cc:40
hcaldqm::quantity::fXAxis
Definition: Quantity.h:25
hcaldqm::Container::_qname
std::string _qname
Definition: Container.h:38
hcaldqm::mapper::HashMapper::isEHash
virtual bool isEHash() const
Definition: HashMapper.h:59
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14