CMS 3D CMS Logo

Container1D.h
Go to the documentation of this file.
1 #ifndef Container1D_h
2 #define Container1D_h
3 
4 /*
5  * file: Container1D.h
6  * Author: Viktor Khristenko
7  *
8  * Description:
9  * 1D Container
10  */
19 
20 #include <string>
21 #include <unordered_map>
22 #include <vector>
23 
24 namespace hcaldqm {
25  class Container1D : public Container {
26  public:
27  Container1D();
28  // Initialize Container
29  // @folder - folder name where to start saving - root.
30  // By default it will be the Task's name.
31  //
36  ~Container1D() override;
37 
38  // Initialize Container
39  // @folder - folder name where to save. Should already include the
40  // Tasks's name
41  // @nametitle - namebase of the name and of the title
42  //
43  virtual void initialize(std::string const &folder,
47  int debug = 0);
48 
49  // @qname - to replace the QyvsQx naming
50  virtual void initialize(std::string const &folder,
51  std::string const &qname,
55  int debug = 0);
57 
58  // filling by hash
59  virtual void fill(uint32_t);
60  virtual void fill(uint32_t, int);
61  virtual void fill(uint32_t, double);
62  virtual void fill(uint32_t, int, double);
63  virtual void fill(uint32_t, int, int);
64  virtual void fill(uint32_t, double, double);
65 
66  // using DetId as mapper
67  virtual void fill(HcalDetId const &);
68  virtual void fill(HcalDetId const &, int);
69  virtual void fill(HcalDetId const &, double);
70  virtual void fill(HcalDetId const &, int, double);
71  virtual void fill(HcalDetId const &, int, int);
72  virtual void fill(HcalDetId const &, double, double);
73 
74  virtual double getBinEntries(HcalDetId const &);
75  virtual double getBinEntries(HcalDetId const &, int);
76  virtual double getBinEntries(HcalDetId const &, double);
77  virtual double getBinEntries(HcalDetId const &did, int x, int) { return getBinEntries(did, x); }
78  virtual double getBinEntries(HcalDetId const &did, int x, double) { return getBinEntries(did, x); }
79  virtual double getBinEntries(HcalDetId const &did, double x, double) { return getBinEntries(did, x); }
80 
81  virtual double getBinContent(HcalDetId const &);
82  virtual double getBinContent(HcalDetId const &, int);
83  virtual double getBinContent(HcalDetId const &, double);
84  virtual double getBinContent(HcalDetId const &did, int x, int) { return getBinContent(did, x); }
85  virtual double getBinContent(HcalDetId const &did, int x, double) { return getBinContent(did, x); }
86  virtual double getBinContent(HcalDetId const &did, double x, double) { return getBinContent(did, x); }
87  virtual double getMean(HcalDetId const &, int axis = 1);
88  virtual double getRMS(HcalDetId const &, int axix = 1);
89 
90  virtual void setBinContent(HcalDetId const &, int);
91  virtual void setBinContent(HcalDetId const &, double);
92  virtual void setBinContent(HcalDetId const &, int, int);
93  virtual void setBinContent(HcalDetId const &, int, double);
94  virtual void setBinContent(HcalDetId const &, double, double);
95  virtual void setBinContent(HcalDetId const &, double, int);
96  virtual void setBinContent(HcalDetId const &id, int x, int y, int) { setBinContent(id, x, y); }
97  virtual void setBinContent(HcalDetId const &id, int x, double y, int) { setBinContent(id, x, y); }
98  virtual void setBinContent(HcalDetId const &id, double x, int y, int) { setBinContent(id, x, y); }
99  virtual void setBinContent(HcalDetId const &id, double x, double y, int) { setBinContent(id, x, y); }
100  virtual void setBinContent(HcalDetId const &id, int x, int y, double) { setBinContent(id, x, y); }
101  virtual void setBinContent(HcalDetId const &id, int x, double y, double) { setBinContent(id, x, y); }
102  virtual void setBinContent(HcalDetId const &id, double x, int y, double) { setBinContent(id, x, y); }
103  virtual void setBinContent(HcalDetId const &id, double x, double y, double) { setBinContent(id, x, y); }
104 
105  // using ElectronicsId
106  virtual void fill(HcalElectronicsId const &);
107  virtual void fill(HcalElectronicsId const &, int);
108  virtual void fill(HcalElectronicsId const &, double);
109  virtual void fill(HcalElectronicsId const &, int, double);
110  virtual void fill(HcalElectronicsId const &, int, int);
111  virtual void fill(HcalElectronicsId const &, double, double);
112 
113  virtual double getBinEntries(HcalElectronicsId const &);
114  virtual double getBinEntries(HcalElectronicsId const &, int);
115  virtual double getBinEntries(HcalElectronicsId const &, double);
116  virtual double getBinEntries(HcalElectronicsId const &eid, int x, int) { return getBinEntries(eid, x); }
117  virtual double getBinEntries(HcalElectronicsId const &eid, int x, double) { return getBinEntries(eid, x); }
118  virtual double getBinEntries(HcalElectronicsId const &eid, double x, double) { return getBinEntries(eid, x); }
119 
120  virtual double getBinContent(HcalElectronicsId const &);
121  virtual double getBinContent(HcalElectronicsId const &, int);
122  virtual double getBinContent(HcalElectronicsId const &, double);
123  virtual double getBinContent(HcalElectronicsId const &eid, int x, int) { return getBinContent(eid, x); }
124  virtual double getBinContent(HcalElectronicsId const &eid, int x, double) { return getBinContent(eid, x); }
125  virtual double getBinContent(HcalElectronicsId const &eid, double x, double) { return getBinContent(eid, x); }
126  virtual double getMean(HcalElectronicsId const &, int axis = 1);
127  virtual double getRMS(HcalElectronicsId const &, int axis = 1);
128 
129  virtual void setBinContent(HcalElectronicsId const &, int);
130  virtual void setBinContent(HcalElectronicsId const &, double);
131  virtual void setBinContent(HcalElectronicsId const &, int, int);
132  virtual void setBinContent(HcalElectronicsId const &, int, double);
133  virtual void setBinContent(HcalElectronicsId const &, double, double);
134  virtual void setBinContent(HcalElectronicsId const &, double, int);
135  virtual void setBinContent(HcalElectronicsId const &id, int x, int y, int) { setBinContent(id, x, y); }
136  virtual void setBinContent(HcalElectronicsId const &id, int x, double y, int) { setBinContent(id, x, y); }
137  virtual void setBinContent(HcalElectronicsId const &id, double x, int y, int) { setBinContent(id, x, y); }
138  virtual void setBinContent(HcalElectronicsId const &id, double x, double y, int) { setBinContent(id, x, y); }
139  virtual void setBinContent(HcalElectronicsId const &id, int x, int y, double) { setBinContent(id, x, y); }
140  virtual void setBinContent(HcalElectronicsId const &id, int x, double y, double) { setBinContent(id, x, y); }
141  virtual void setBinContent(HcalElectronicsId const &id, double x, int y, double) { setBinContent(id, x, y); }
142  virtual void setBinContent(HcalElectronicsId const &id, double x, double y, double) { setBinContent(id, x, y); }
143 
144  // using DetId as mapper
145  virtual void fill(HcalTrigTowerDetId const &);
146  virtual void fill(HcalTrigTowerDetId const &, int);
147  virtual void fill(HcalTrigTowerDetId const &, double);
148  virtual void fill(HcalTrigTowerDetId const &, int, double);
149  virtual void fill(HcalTrigTowerDetId const &, int, int);
150  virtual void fill(HcalTrigTowerDetId const &, double, double);
151 
152  virtual double getBinEntries(HcalTrigTowerDetId const &);
153  virtual double getBinEntries(HcalTrigTowerDetId const &, int);
154  virtual double getBinEntries(HcalTrigTowerDetId const &, double);
155  virtual double getBinEntries(HcalTrigTowerDetId const &tid, int x, int) { return getBinEntries(tid, x); }
156  virtual double getBinEntries(HcalTrigTowerDetId const &tid, int x, double) { return getBinEntries(tid, x); }
157  virtual double getBinEntries(HcalTrigTowerDetId const &tid, double x, double) { return getBinEntries(tid, x); }
158 
159  virtual double getBinContent(HcalTrigTowerDetId const &);
160  virtual double getBinContent(HcalTrigTowerDetId const &, int);
161  virtual double getBinContent(HcalTrigTowerDetId const &, double);
162  virtual double getBinContent(HcalTrigTowerDetId const &tid, int x, int) { return getBinContent(tid, x); }
163  virtual double getBinContent(HcalTrigTowerDetId const &tid, int x, double) { return getBinContent(tid, x); }
164  virtual double getBinContent(HcalTrigTowerDetId const &tid, double x, double) { return getBinContent(tid, x); }
165  virtual double getMean(HcalTrigTowerDetId const &, int axis = 1);
166  virtual double getRMS(HcalTrigTowerDetId const &, int axis = 1);
167 
168  virtual void setBinContent(HcalTrigTowerDetId const &, int);
169  virtual void setBinContent(HcalTrigTowerDetId const &, double);
170  virtual void setBinContent(HcalTrigTowerDetId const &, int, int);
171  virtual void setBinContent(HcalTrigTowerDetId const &, int, double);
172  virtual void setBinContent(HcalTrigTowerDetId const &, double, double);
173  virtual void setBinContent(HcalTrigTowerDetId const &, double, int);
174  virtual void setBinContent(HcalTrigTowerDetId const &id, int x, int y, int) { setBinContent(id, x, y); }
175  virtual void setBinContent(HcalTrigTowerDetId const &id, int x, double y, int) { setBinContent(id, x, y); }
176  virtual void setBinContent(HcalTrigTowerDetId const &id, double x, int y, int) { setBinContent(id, x, y); }
177  virtual void setBinContent(HcalTrigTowerDetId const &id, double x, double y, int) { setBinContent(id, x, y); }
178  virtual void setBinContent(HcalTrigTowerDetId const &id, int x, int y, double) { setBinContent(id, x, y); }
179  virtual void setBinContent(HcalTrigTowerDetId const &id, int x, double y, double) { setBinContent(id, x, y); }
180  virtual void setBinContent(HcalTrigTowerDetId const &id, double x, int y, double) { setBinContent(id, x, y); }
181  virtual void setBinContent(HcalTrigTowerDetId const &id, double x, double y, double) { setBinContent(id, x, y); }
182 
183  // booking using IBooker
184  // @aux - typically a cut or anything else
185  // @subsystem - subsystem under which to save
186  //
187  virtual void book(DQMStore::IBooker &,
188  HcalElectronicsMap const *,
189  std::string subsystem = "Hcal",
190  std::string aux = "");
191  virtual void book(DQMStore::IBooker &,
192  HcalElectronicsMap const *,
193  filter::HashFilter const &,
194  std::string subsystem = "Hcal",
195  std::string aux = "");
196 
197  // loading using DQMStore
198  // @DQMStore
199  // @emap
200  // @prepend - name to prepend to /<subsystem> - used when load
201  // a file to DQMStore without stripping and in case a name is
202  // appended
203  // @mode - if StripRunDirs - then there will be no Run Summary
204  // otherwise there is Run Summary folde. Used for retrieving
205  // MEs which were loaded into the DQM store from a file
206  virtual void load(DQMStore::IGetter &,
207  HcalElectronicsMap const *,
208  std::string const &subsystem = "Hcal",
209  std::string const &aux = "");
210  virtual void load(DQMStore::IGetter &,
211  HcalElectronicsMap const *,
212  filter::HashFilter const &,
213  std::string const &subsystem = "Hcal",
214  std::string const &aux = "");
215 
216  // reset all the elements
217  virtual void reset();
218 
219  // print all the elements
220  virtual void print();
221 
222  // TO BE USED IN THE FUTURE!
223  virtual void extendAxisRange(int);
224 
225  virtual void showOverflowX(bool showOverflow);
226  virtual void showOverflowY(bool showOverflow);
227 
228  protected:
229  virtual void customize(MonitorElement *);
230 
231  typedef std::unordered_map<uint32_t, MonitorElement *> MEMap;
236  };
237 } // namespace hcaldqm
238 
239 #endif
hcal_dqm_sourceclient-live_cfg.subsystem
subsystem
Definition: hcal_dqm_sourceclient-live_cfg.py:16
hcaldqm::Container1D::Container1D
Container1D()
Definition: Container1D.cc:8
hcaldqm::Container1D::showOverflowX
virtual void showOverflowX(bool showOverflow)
Definition: Container1D.cc:769
hcaldqm::Container1D::load
virtual void load(DQMStore::IGetter &, HcalElectronicsMap const *, std::string const &subsystem="Hcal", std::string const &aux="")
Definition: Container1D.cc:450
hcaldqm::Container1D::getMean
virtual double getMean(HcalDetId const &, int axis=1)
Definition: Container1D.cc:189
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, int x, int y, int)
Definition: Container1D.h:174
hcaldqm::Container1D::_hashmap
mapper::HashMapper _hashmap
Definition: Container1D.h:233
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalDetId const &)
Definition: Container1D.cc:165
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, double x, int y, double)
Definition: Container1D.h:102
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, int x, int y, double)
Definition: Container1D.h:139
Container.h
hcaldqm::Container1D::print
virtual void print()
Definition: Container1D.cc:66
hcaldqm::hashfunctions::HashType
HashType
Definition: HashFunctions.h:122
printsummarytable.folder
folder
Definition: printsummarytable.py:7
hcaldqm::quantity::ValueQuantity
Definition: ValueQuantity.h:309
hcaldqm::Container1D::reset
virtual void reset()
Definition: Container1D.cc:60
hcaldqm
Definition: Constants.h:8
hcaldqm::Container::initialize
virtual void initialize(std::string const &folder, std::string const &qname, int debug=0)
Definition: Container.h:30
hcaldqm::Container1D::_mes
MEMap _mes
Definition: Container1D.h:232
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalElectronicsId const &eid, double x, double)
Definition: Container1D.h:125
Utilities.h
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalDetId const &)
Definition: Container1D.cc:177
hcaldqm::Container1D::_qx
quantity::Quantity * _qx
Definition: Container1D.h:234
hcaldqm::Container1D::_qy
quantity::Quantity * _qy
Definition: Container1D.h:235
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, double x, double y, int)
Definition: Container1D.h:99
hcaldqm::Container
Definition: Container.h:21
hcaldqm::mapper::HashMapper
Definition: HashMapper.h:17
hcaldqm::Container1D::MEMap
std::unordered_map< uint32_t, MonitorElement * > MEMap
Definition: Container1D.h:231
ValueQuantity.h
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalDetId const &did, int x, int)
Definition: Container1D.h:84
debug
#define debug
Definition: HDRShower.cc:19
ElectronicsQuantity.h
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalElectronicsId const &eid, int x, int)
Definition: Container1D.h:123
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, int x, double y, double)
Definition: Container1D.h:179
hcaldqm::Container1D::getRMS
virtual double getRMS(HcalDetId const &, int axix=1)
Definition: Container1D.cc:193
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalElectronicsId const &eid, int x, double)
Definition: Container1D.h:117
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalElectronicsId const &eid, int x, double)
Definition: Container1D.h:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hcaldqm::quantity::fN
Definition: ValueQuantity.h:11
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalDetId const &did, double x, double)
Definition: Container1D.h:86
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, double x, int y, int)
Definition: Container1D.h:98
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalDetId const &did, int x, double)
Definition: Container1D.h:78
hcaldqm::filter::HashFilter
Definition: HashFilter.h:21
hcaldqm::Container1D
Definition: Container1D.h:25
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &, int)
Definition: Container1D.cc:198
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, double x, double y, double)
Definition: Container1D.h:181
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, double x, double y, double)
Definition: Container1D.h:142
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalDetId const &did, int x, double)
Definition: Container1D.h:85
hcaldqm::Container1D::fill
virtual void fill(uint32_t)
Definition: Container1D.cc:73
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, double x, int y, int)
Definition: Container1D.h:176
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, double x, int y, int)
Definition: Container1D.h:137
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalDetId const &did, double x, double)
Definition: Container1D.h:79
HcalDetId
Definition: HcalDetId.h:12
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
hcaldqm::quantity::Quantity
Definition: Quantity.h:27
HashFilter.h
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, int x, int y, int)
Definition: Container1D.h:96
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalTrigTowerDetId const &tid, int x, int)
Definition: Container1D.h:155
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, int x, double y, double)
Definition: Container1D.h:140
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, double x, double y, int)
Definition: Container1D.h:138
hcaldqm::Container1D::extendAxisRange
virtual void extendAxisRange(int)
Definition: Container1D.cc:754
HcalElectronicsMap
Definition: HcalElectronicsMap.h:31
TrigTowerQuantity.h
HashMapper.h
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, double x, int y, double)
Definition: Container1D.h:180
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, int x, int y, double)
Definition: Container1D.h:100
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalElectronicsId const &eid, double x, double)
Definition: Container1D.h:118
dqm::implementation::IGetter
Definition: DQMStore.h:484
hcaldqm::Container1D::customize
virtual void customize(MonitorElement *)
Definition: Container1D.cc:737
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalTrigTowerDetId const &tid, double x, double)
Definition: Container1D.h:157
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalTrigTowerDetId const &tid, int x, double)
Definition: Container1D.h:156
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, int x, double y, int)
Definition: Container1D.h:136
dqm::implementation::IBooker
Definition: DQMStore.h:43
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalElectronicsId const &eid, int x, int)
Definition: Container1D.h:116
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalTrigTowerDetId const &tid, int x, int)
Definition: Container1D.h:162
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, int x, double y, int)
Definition: Container1D.h:175
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, int x, int y, double)
Definition: Container1D.h:178
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
hcaldqm::Container1D::~Container1D
~Container1D() override
Definition: Container1D.cc:16
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, double x, int y, double)
Definition: Container1D.h:141
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalElectronicsId const &id, int x, int y, int)
Definition: Container1D.h:135
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalTrigTowerDetId const &tid, int x, double)
Definition: Container1D.h:163
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, int x, double y, int)
Definition: Container1D.h:97
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, double x, double y, double)
Definition: Container1D.h:103
hcaldqm::Container1D::getBinEntries
virtual double getBinEntries(HcalDetId const &did, int x, int)
Definition: Container1D.h:77
hcaldqm::Container1D::getBinContent
virtual double getBinContent(HcalTrigTowerDetId const &tid, double x, double)
Definition: Container1D.h:164
hcaldqm::Container1D::book
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container1D.cc:592
DetectorQuantity.h
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalDetId const &id, int x, double y, double)
Definition: Container1D.h:101
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14
hcaldqm::Container1D::setBinContent
virtual void setBinContent(HcalTrigTowerDetId const &id, double x, double y, int)
Definition: Container1D.h:177
hcaldqm::Container1D::showOverflowY
virtual void showOverflowY(bool showOverflow)
Definition: Container1D.cc:771