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::book(DQMStore *store,
57  std::string subsystem, std::string aux)
58  {
59  store->setCurrentFolder(subsystem+"/"+_folder+"/"+_qname);
60  _me = store->bookProfile2D(_qname+(aux.empty()?aux:"_"+aux),
61  _qname+(aux.empty()?aux:" "+aux),
62  _qx->nbins(), _qx->min(), _qx->max(),
63  _qy->nbins(), _qy->min(), _qy->max(),
64  _qz->min(), _qz->max());
65  customize();
66  }
67 
68  /* virtual */ void ContainerSingleProf2D::fill(int x, int y)
69  {
70  _me->Fill(_qx->getValue(x), _qy->getValue(y));
71  }
72 
73  /* virtual */ void ContainerSingleProf2D::fill(int x, double y)
74  {
75  _me->Fill(_qx->getValue(x), _qy->getValue(y));
76  }
77 
78  /* virtual */ void ContainerSingleProf2D::fill(int x, double y, double z)
79  {
80  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
81  }
82 
83  /* virtual */ void ContainerSingleProf2D::fill(double x, int y)
84  {
85  _me->Fill(_qx->getValue(x), _qy->getValue(y));
86  }
87 
88  /* virtual */ void ContainerSingleProf2D::fill(double x, double y)
89  {
90  _me->Fill(_qx->getValue(x), _qy->getValue(y));
91  }
92 
93  /* virtual */ void ContainerSingleProf2D::fill(double x, double y, double z)
94  {
95  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
96  }
97 
98  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, double z)
99  {
100  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
101  }
102 
103  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, int z)
104  {
105  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
106  }
107 
108  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id)
109  {
110  _me->Fill(_qx->getValue(id), _qy->getValue(id));
111  }
112 
113  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, double x)
114  {
115  if (_qx->isCoordinate() && _qy->isCoordinate())
116  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
117  else if (_qx->isCoordinate())
118  _me->Fill(_qx->getValue(id), _qy->getValue(x));
119  else if (_qy->isCoordinate())
120  _me->Fill(_qx->getValue(x), _qy->getValue(id));
121  }
122 
123  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x)
124  {
125  if (_qx->isCoordinate() && _qy->isCoordinate())
126  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
127  else if (_qx->isCoordinate())
128  _me->Fill(_qx->getValue(id), _qy->getValue(x));
129  else if (_qy->isCoordinate())
130  _me->Fill(_qx->getValue(x), _qy->getValue(id));
131  }
132 
133  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, double x,
134  double y)
135  {
136  if (_qx->isCoordinate() && _qy->isCoordinate())
137  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
138  else if (_qx->isCoordinate() && !_qy->isCoordinate())
139  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
140  else if (!_qx->isCoordinate() && _qy->isCoordinate())
141  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
142  }
143 
144  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x,
145  int y)
146  {
147  if (_qx->isCoordinate() && _qy->isCoordinate())
148  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
149  else if (_qx->isCoordinate() && !_qy->isCoordinate())
150  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
151  else if (!_qx->isCoordinate() && _qy->isCoordinate())
152  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
153  }
154 
155  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& id, int x,
156  double y)
157  {
158  if (_qx->isCoordinate() && _qy->isCoordinate())
159  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
160  else if (_qx->isCoordinate() && !_qy->isCoordinate())
161  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
162  else if (!_qx->isCoordinate() && _qy->isCoordinate())
163  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
164  }
165 
166  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id)
167  {
168  _me->Fill(_qx->getValue(id), _qy->getValue(id));
169  }
170 
171  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
172  double x)
173  {
174  if (_qx->isCoordinate() && _qy->isCoordinate())
175  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
176  else if (_qx->isCoordinate())
177  _me->Fill(_qx->getValue(id), _qy->getValue(x));
178  else if (_qy->isCoordinate())
179  _me->Fill(_qx->getValue(x), _qy->getValue(id));
180  }
181 
182  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
183  int x)
184  {
185  if (_qx->isCoordinate() && _qy->isCoordinate())
186  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
187  else if (_qx->isCoordinate())
188  _me->Fill(_qx->getValue(id), _qy->getValue(x));
189  else if (_qy->isCoordinate())
190  _me->Fill(_qx->getValue(x), _qy->getValue(id));
191  }
192 
193  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const& id,
194  double x,
195  double 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  int 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(HcalElectronicsId const& id,
218  int x,
219  double y)
220  {
221  if (_qx->isCoordinate() && _qy->isCoordinate())
222  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
223  else if (_qx->isCoordinate() && !_qy->isCoordinate())
224  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
225  else if (!_qx->isCoordinate() && _qy->isCoordinate())
226  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
227  }
228 
229  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id)
230  {
231  _me->Fill(_qx->getValue(id), _qy->getValue(id));
232  }
233 
234  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
235  double x)
236  {
237  if (_qx->isCoordinate() && _qy->isCoordinate())
238  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
239  else if (_qx->isCoordinate())
240  _me->Fill(_qx->getValue(id), _qy->getValue(x));
241  else if (_qy->isCoordinate())
242  _me->Fill(_qx->getValue(x), _qy->getValue(id));
243  }
244 
245  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
246  int x)
247  {
248  if (_qx->isCoordinate() && _qy->isCoordinate())
249  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
250  else if (_qx->isCoordinate())
251  _me->Fill(_qx->getValue(id), _qy->getValue(x));
252  else if (_qy->isCoordinate())
253  _me->Fill(_qx->getValue(x), _qy->getValue(id));
254  }
255 
256  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
257  double x, double y)
258  {
259  if (_qx->isCoordinate() && _qy->isCoordinate())
260  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
261  else if (_qx->isCoordinate() && !_qy->isCoordinate())
262  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
263  else if (!_qx->isCoordinate() && _qy->isCoordinate())
264  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
265  }
266 
267  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
268  int x, int y)
269  {
270  if (_qx->isCoordinate() && _qy->isCoordinate())
271  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
272  else if (_qx->isCoordinate() && !_qy->isCoordinate())
273  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
274  else if (!_qx->isCoordinate() && _qy->isCoordinate())
275  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
276  }
277 
278  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const& id,
279  int x, double y)
280  {
281  if (_qx->isCoordinate() && _qy->isCoordinate())
282  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
283  else if (_qx->isCoordinate() && !_qy->isCoordinate())
284  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
285  else if (!_qx->isCoordinate() && _qy->isCoordinate())
286  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
287  }
288 
289  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& did,
290  HcalElectronicsId const& eid)
291  {
292  if (_qx->type()==fDetectorQuantity)
293  _me->Fill(_qx->getValue(did), _qy->getValue(eid));
294  else
295  _me->Fill(_qx->getValue(eid), _qy->getValue(did));
296  }
297 
298  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const& did,
299  HcalElectronicsId const& eid, double x)
300  {
301  if (_qx->type()==fDetectorQuantity)
302  _me->Fill(_qx->getValue(did), _qy->getValue(eid), x);
303  else
304  _me->Fill(_qx->getValue(eid), _qy->getValue(did), x);
305  }
306 
307 }
308 
309 
310 
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
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:166
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
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
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
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:545
ib
Definition: cuy.py:661
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1314