CMS 3D CMS Logo

ContainerSingleProf2D.cc
Go to the documentation of this file.
2 
3 namespace hcaldqm
4 {
5  using namespace quantity;
6  using namespace constants;
8  {
9  _qx = nullptr;
10  _qy = nullptr;
11  _qz = nullptr;
12  }
13 
15  Quantity *qx, Quantity *qy, Quantity *qz):
16  ContainerSingle2D(folder, qx, qy, qz)
17  {
21  }
22 
24  folder, Quantity *qx, Quantity *qy, Quantity *qz,
25  int debug/*=0*/)
26  {
27  ContainerSingle2D::initialize(folder, qx, qy, qz, debug);
31  }
32 
34  folder, std::string const& qname,
35  Quantity *qx, Quantity *qy, Quantity *qz,
36  int debug/*=0*/)
37  {
38  ContainerSingle2D::initialize(folder, qname, qx, qy, qz, debug);
42  }
43 
45  std::string subsystem, std::string aux)
46  {
47  ib.setCurrentFolder(subsystem+"/"+_folder+"/"+_qname);
48  _me = ib.bookProfile2D(_qname+(aux.empty()?aux:"_"+aux),
49  _qname+(aux.empty()?aux:" "+aux),
50  _qx->nbins(), _qx->min(), _qx->max(),
51  _qy->nbins(), _qy->min(), _qy->max(),
52  _qz->min(), _qz->max());
53  customize();
54  }
55 
56  /* virtual */ void ContainerSingleProf2D::fill(int x, int y)
57  {
58  _me->Fill(_qx->getValue(x), _qy->getValue(y));
59  }
60 
61  /* virtual */ void ContainerSingleProf2D::fill(int x, double y)
62  {
63  _me->Fill(_qx->getValue(x), _qy->getValue(y));
64  }
65 
66  /* virtual */ void ContainerSingleProf2D::fill(int x, double y, double z)
67  {
68  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
69  }
70 
71  /* virtual */ void ContainerSingleProf2D::fill(double x, int y)
72  {
73  _me->Fill(_qx->getValue(x), _qy->getValue(y));
74  }
75 
76  /* virtual */ void ContainerSingleProf2D::fill(double x, double y)
77  {
78  _me->Fill(_qx->getValue(x), _qy->getValue(y));
79  }
80 
81  /* virtual */ void ContainerSingleProf2D::fill(double x, double y, double z)
82  {
83  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
84  }
85 
86  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, double z)
87  {
88  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
89  }
90 
91  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, int z)
92  {
93  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
94  }
95 
96  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id)
97  {
98  _me->Fill(_qx->getValue(id), _qy->getValue(id));
99  }
100 
101  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, double x)
102  {
103  if (_qx->isCoordinate() && _qy->isCoordinate())
104  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
105  else if (_qx->isCoordinate())
106  _me->Fill(_qx->getValue(id), _qy->getValue(x));
107  else if (_qy->isCoordinate())
108  _me->Fill(_qx->getValue(x), _qy->getValue(id));
109  }
110 
111  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x)
112  {
113  if (_qx->isCoordinate() && _qy->isCoordinate())
114  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
115  else if (_qx->isCoordinate())
116  _me->Fill(_qx->getValue(id), _qy->getValue(x));
117  else if (_qy->isCoordinate())
118  _me->Fill(_qx->getValue(x), _qy->getValue(id));
119  }
120 
121  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, double x,
122  double y)
123  {
124  if (_qx->isCoordinate() && _qy->isCoordinate())
125  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
126  else if (_qx->isCoordinate() && !_qy->isCoordinate())
127  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
128  else if (!_qx->isCoordinate() && _qy->isCoordinate())
129  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
130  }
131 
132  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x,
133  int y)
134  {
135  if (_qx->isCoordinate() && _qy->isCoordinate())
136  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
137  else if (_qx->isCoordinate() && !_qy->isCoordinate())
138  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
139  else if (!_qx->isCoordinate() && _qy->isCoordinate())
140  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
141  }
142 
143  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x,
144  double y)
145  {
146  if (_qx->isCoordinate() && _qy->isCoordinate())
147  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
148  else if (_qx->isCoordinate() && !_qy->isCoordinate())
149  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
150  else if (!_qx->isCoordinate() && _qy->isCoordinate())
151  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
152  }
153 
154  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id)
155  {
156  _me->Fill(_qx->getValue(id), _qy->getValue(id));
157  }
158 
159  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
160  double x)
161  {
162  if (_qx->isCoordinate() && _qy->isCoordinate())
163  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
164  else if (_qx->isCoordinate())
165  _me->Fill(_qx->getValue(id), _qy->getValue(x));
166  else if (_qy->isCoordinate())
167  _me->Fill(_qx->getValue(x), _qy->getValue(id));
168  }
169 
170  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
171  int x)
172  {
173  if (_qx->isCoordinate() && _qy->isCoordinate())
174  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
175  else if (_qx->isCoordinate())
176  _me->Fill(_qx->getValue(id), _qy->getValue(x));
177  else if (_qy->isCoordinate())
178  _me->Fill(_qx->getValue(x), _qy->getValue(id));
179  }
180 
181  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
182  double x,
183  double y)
184  {
185  if (_qx->isCoordinate() && _qy->isCoordinate())
186  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
187  else if (_qx->isCoordinate() && !_qy->isCoordinate())
188  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
189  else if (!_qx->isCoordinate() && _qy->isCoordinate())
190  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
191  }
192 
193  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
194  int x,
195  int y)
196  {
197  if (_qx->isCoordinate() && _qy->isCoordinate())
198  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
199  else if (_qx->isCoordinate() && !_qy->isCoordinate())
200  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
201  else if (!_qx->isCoordinate() && _qy->isCoordinate())
202  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
203  }
204 
205  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
206  int x,
207  double y)
208  {
209  if (_qx->isCoordinate() && _qy->isCoordinate())
210  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
211  else if (_qx->isCoordinate() && !_qy->isCoordinate())
212  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
213  else if (!_qx->isCoordinate() && _qy->isCoordinate())
214  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
215  }
216 
217  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id)
218  {
219  _me->Fill(_qx->getValue(id), _qy->getValue(id));
220  }
221 
222  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
223  double x)
224  {
225  if (_qx->isCoordinate() && _qy->isCoordinate())
226  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
227  else if (_qx->isCoordinate())
228  _me->Fill(_qx->getValue(id), _qy->getValue(x));
229  else if (_qy->isCoordinate())
230  _me->Fill(_qx->getValue(x), _qy->getValue(id));
231  }
232 
233  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
234  int x)
235  {
236  if (_qx->isCoordinate() && _qy->isCoordinate())
237  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
238  else if (_qx->isCoordinate())
239  _me->Fill(_qx->getValue(id), _qy->getValue(x));
240  else if (_qy->isCoordinate())
241  _me->Fill(_qx->getValue(x), _qy->getValue(id));
242  }
243 
244  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
245  double x, double y)
246  {
247  if (_qx->isCoordinate() && _qy->isCoordinate())
248  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
249  else if (_qx->isCoordinate() && !_qy->isCoordinate())
250  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
251  else if (!_qx->isCoordinate() && _qy->isCoordinate())
252  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
253  }
254 
255  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
256  int x, int y)
257  {
258  if (_qx->isCoordinate() && _qy->isCoordinate())
259  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
260  else if (_qx->isCoordinate() && !_qy->isCoordinate())
261  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
262  else if (!_qx->isCoordinate() && _qy->isCoordinate())
263  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
264  }
265 
266  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
267  int x, double y)
268  {
269  if (_qx->isCoordinate() && _qy->isCoordinate())
270  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
271  else if (_qx->isCoordinate() && !_qy->isCoordinate())
272  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
273  else if (!_qx->isCoordinate() && _qy->isCoordinate())
274  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
275  }
276 
277  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& did,
278  HcalElectronicsId const& eid)
279  {
280  if (_qx->type()==fDetectorQuantity)
281  _me->Fill(_qx->getValue(did), _qy->getValue(eid));
282  else
283  _me->Fill(_qx->getValue(eid), _qy->getValue(did));
284  }
285 
286  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& did,
287  HcalElectronicsId const& eid, double x)
288  {
289  if (_qx->type()==fDetectorQuantity)
290  _me->Fill(_qx->getValue(did), _qy->getValue(eid), x);
291  else
292  _me->Fill(_qx->getValue(eid), _qy->getValue(did), x);
293  }
294 
295 }
virtual void setAxisType(AxisType at)
Definition: Quantity.h:49
virtual double max()
Definition: Quantity.h:76
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
void Fill(long long x)
quantity::Quantity * _qx
quantity::Quantity * _qy
virtual int getValue(HcalDetId const &)
Definition: Quantity.h:59
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:114
void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0) override
std::string _folder
Definition: Container.h:42
#define debug
Definition: HDRShower.cc:19
virtual double min()
Definition: Quantity.h:75
virtual bool isCoordinate()
Definition: Quantity.h:77
std::string _qname
Definition: Container.h:43
virtual QuantityType type()
Definition: Quantity.h:46
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
Readout chain identification for Hcal.
quantity::Quantity * _qz
ib
Definition: cuy.py:662