CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ContainerSingleProf2D.cc
Go to the documentation of this file.
2 
3 namespace hcaldqm {
4  using namespace quantity;
5  using namespace constants;
7  _qx = nullptr;
8  _qy = nullptr;
9  _qz = nullptr;
10  }
11 
13  : ContainerSingle2D(folder, qx, qy, qz) {
17  }
18 
20  std::string const &folder, Quantity *qx, Quantity *qy, Quantity *qz, int debug /*=0*/) {
21  ContainerSingle2D::initialize(folder, qx, qy, qz, debug);
25  }
26 
28  std::string const &folder, std::string const &qname, Quantity *qx, Quantity *qy, Quantity *qz, int debug /*=0*/) {
29  ContainerSingle2D::initialize(folder, qname, qx, qy, qz, debug);
33  }
34 
36  ib.setCurrentFolder(subsystem + "/" + _folder + "/" + _qname);
37  _me = ib.bookProfile2D(_qname + (aux.empty() ? aux : "_" + aux),
38  _qname + (aux.empty() ? aux : " " + aux),
39  _qx->nbins(),
40  _qx->min(),
41  _qx->max(),
42  _qy->nbins(),
43  _qy->min(),
44  _qy->max(),
45  _qz->min(),
46  _qz->max());
47  customize();
48  }
49 
50  /* virtual */ void ContainerSingleProf2D::fill(int x, int y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
51 
52  /* virtual */ void ContainerSingleProf2D::fill(int x, double y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
53 
54  /* virtual */ void ContainerSingleProf2D::fill(int x, double y, double z) {
55  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
56  }
57 
58  /* virtual */ void ContainerSingleProf2D::fill(double x, int y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
59 
60  /* virtual */ void ContainerSingleProf2D::fill(double x, double y) { _me->Fill(_qx->getValue(x), _qy->getValue(y)); }
61 
62  /* virtual */ void ContainerSingleProf2D::fill(double x, double y, double z) {
63  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
64  }
65 
66  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, double z) {
67  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
68  }
69 
70  /* virtual */ void ContainerSingleProf2D::fill(int x, int y, int z) {
71  _me->Fill(_qx->getValue(x), _qy->getValue(y), _qz->getValue(z));
72  }
73 
74  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id) {
75  _me->Fill(_qx->getValue(id), _qy->getValue(id));
76  }
77 
78  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id, double x) {
79  if (_qx->isCoordinate() && _qy->isCoordinate())
80  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
81  else if (_qx->isCoordinate())
82  _me->Fill(_qx->getValue(id), _qy->getValue(x));
83  else if (_qy->isCoordinate())
84  _me->Fill(_qx->getValue(x), _qy->getValue(id));
85  }
86 
87  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id, int x) {
88  if (_qx->isCoordinate() && _qy->isCoordinate())
89  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
90  else if (_qx->isCoordinate())
91  _me->Fill(_qx->getValue(id), _qy->getValue(x));
92  else if (_qy->isCoordinate())
93  _me->Fill(_qx->getValue(x), _qy->getValue(id));
94  }
95 
96  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id, double x, double y) {
97  if (_qx->isCoordinate() && _qy->isCoordinate())
98  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
99  else if (_qx->isCoordinate() && !_qy->isCoordinate())
100  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
101  else if (!_qx->isCoordinate() && _qy->isCoordinate())
102  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
103  }
104 
105  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id, int x, int y) {
106  if (_qx->isCoordinate() && _qy->isCoordinate())
107  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
108  else if (_qx->isCoordinate() && !_qy->isCoordinate())
109  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
110  else if (!_qx->isCoordinate() && _qy->isCoordinate())
111  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
112  }
113 
114  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &id, int x, double y) {
115  if (_qx->isCoordinate() && _qy->isCoordinate())
116  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
117  else if (_qx->isCoordinate() && !_qy->isCoordinate())
118  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
119  else if (!_qx->isCoordinate() && _qy->isCoordinate())
120  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
121  }
122 
123  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const &id) {
124  _me->Fill(_qx->getValue(id), _qy->getValue(id));
125  }
126 
127  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const &id, double x) {
128  if (_qx->isCoordinate() && _qy->isCoordinate())
129  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
130  else if (_qx->isCoordinate())
131  _me->Fill(_qx->getValue(id), _qy->getValue(x));
132  else if (_qy->isCoordinate())
133  _me->Fill(_qx->getValue(x), _qy->getValue(id));
134  }
135 
136  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const &id, int x) {
137  if (_qx->isCoordinate() && _qy->isCoordinate())
138  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
139  else if (_qx->isCoordinate())
140  _me->Fill(_qx->getValue(id), _qy->getValue(x));
141  else if (_qy->isCoordinate())
142  _me->Fill(_qx->getValue(x), _qy->getValue(id));
143  }
144 
145  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const &id, double x, double y) {
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, int x, int y) {
155  if (_qx->isCoordinate() && _qy->isCoordinate())
156  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
157  else if (_qx->isCoordinate() && !_qy->isCoordinate())
158  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
159  else if (!_qx->isCoordinate() && _qy->isCoordinate())
160  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
161  }
162 
163  /* virtual */ void ContainerSingleProf2D::fill(HcalElectronicsId const &id, int x, double y) {
164  if (_qx->isCoordinate() && _qy->isCoordinate())
165  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
166  else if (_qx->isCoordinate() && !_qy->isCoordinate())
167  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
168  else if (!_qx->isCoordinate() && _qy->isCoordinate())
169  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
170  }
171 
172  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id) {
173  _me->Fill(_qx->getValue(id), _qy->getValue(id));
174  }
175 
176  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id, double x) {
177  if (_qx->isCoordinate() && _qy->isCoordinate())
178  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
179  else if (_qx->isCoordinate())
180  _me->Fill(_qx->getValue(id), _qy->getValue(x));
181  else if (_qy->isCoordinate())
182  _me->Fill(_qx->getValue(x), _qy->getValue(id));
183  }
184 
185  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id, int x) {
186  if (_qx->isCoordinate() && _qy->isCoordinate())
187  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
188  else if (_qx->isCoordinate())
189  _me->Fill(_qx->getValue(id), _qy->getValue(x));
190  else if (_qy->isCoordinate())
191  _me->Fill(_qx->getValue(x), _qy->getValue(id));
192  }
193 
194  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id, double x, double y) {
195  if (_qx->isCoordinate() && _qy->isCoordinate())
196  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
197  else if (_qx->isCoordinate() && !_qy->isCoordinate())
198  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
199  else if (!_qx->isCoordinate() && _qy->isCoordinate())
200  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
201  }
202 
203  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id, int x, int y) {
204  if (_qx->isCoordinate() && _qy->isCoordinate())
205  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
206  else if (_qx->isCoordinate() && !_qy->isCoordinate())
207  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
208  else if (!_qx->isCoordinate() && _qy->isCoordinate())
209  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
210  }
211 
212  /* virtual */ void ContainerSingleProf2D::fill(HcalTrigTowerDetId const &id, int x, double y) {
213  if (_qx->isCoordinate() && _qy->isCoordinate())
214  _me->Fill(_qx->getValue(id), _qy->getValue(id), x);
215  else if (_qx->isCoordinate() && !_qy->isCoordinate())
216  _me->Fill(_qx->getValue(id), _qy->getValue(x), y);
217  else if (!_qx->isCoordinate() && _qy->isCoordinate())
218  _me->Fill(_qx->getValue(x), _qy->getValue(id), y);
219  }
220 
221  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &did, HcalElectronicsId const &eid) {
222  if (_qx->type() == fDetectorQuantity)
223  _me->Fill(_qx->getValue(did), _qy->getValue(eid));
224  else
225  _me->Fill(_qx->getValue(eid), _qy->getValue(did));
226  }
227 
228  /* virtual */ void ContainerSingleProf2D::fill(HcalDetId const &did, HcalElectronicsId const &eid, double x) {
229  if (_qx->type() == fDetectorQuantity)
230  _me->Fill(_qx->getValue(did), _qy->getValue(eid), x);
231  else
232  _me->Fill(_qx->getValue(eid), _qy->getValue(did), x);
233  }
234 
235 } // namespace hcaldqm
virtual void setAxisType(AxisType at)
Definition: Quantity.h:36
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:476
int ib
Definition: cuy.py:661
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual double max()
Definition: Quantity.h:60
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
quantity::Quantity * _qx
void Fill(long long x)
quantity::Quantity * _qy
virtual int getValue(HcalDetId const &)
Definition: Quantity.h:45
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:37
#define debug
Definition: HDRShower.cc:19
virtual double min()
Definition: Quantity.h:59
virtual bool isCoordinate()
Definition: Quantity.h:61
std::string _qname
Definition: Container.h:38
virtual QuantityType type()
Definition: Quantity.h:33
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
Readout chain identification for Hcal.
quantity::Quantity * _qz