CMS 3D CMS Logo

DBReaderWorkers.cc
Go to the documentation of this file.
3 
5 
32 // #include "OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h"
33 // #include "OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h"
38 
46 
49 
50 #include "TFormula.h"
51 #include "TString.h"
52 
53 namespace ecaldqm {
54  typedef std::map<DetId, double> ReturnType;
55 
56  template <typename DataType>
57  ReturnType fetchAndFill(std::map<std::string, double (*)(DataType const &)> const &_extractors,
59  MonRunIOV &_iov,
60  std::string const &_formula) {
61  typedef std::map<EcalLogicID, DataType> DataSet;
62  typedef double (*DataExtractor)(DataType const &);
63  typedef std::map<std::string, DataExtractor> ExtractorList;
64 
65  ExtractorList varMap;
66 
67  for (typename ExtractorList::const_iterator eItr(_extractors.begin()); eItr != _extractors.end(); ++eItr)
68  if (_formula.find(eItr->first) != std::string::npos)
69  varMap[eItr->first] = eItr->second;
70 
71  if (varMap.size() > 4)
72  throw cms::Exception("EcalDQM") << _formula << " has too many variables";
73 
74  TString formula(_formula);
75 
76  unsigned iV(0);
77  char varChars[4][2] = {"x", "y", "z", "t"};
78  for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
79  formula.ReplaceAll(vItr->first, varChars[iV++]);
80 
81  TFormula tformula("formula", formula);
82  if (tformula.Compile() != 0)
83  throw cms::Exception("EcalDQM") << _formula << " could not be compiled";
84 
85  DataSet dataSet;
86  _db->fetchDataSet(&dataSet, &_iov);
87 
88  ReturnType result;
89 
90  for (typename DataSet::const_iterator dItr(dataSet.begin()); dItr != dataSet.end(); ++dItr) {
91  double vars[4];
92  iV = 0;
93  for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
94  vars[iV++] = vItr->second(dItr->second);
95 
96  result[toDetId(dItr->first)] = tformula.EvalPar(vars);
97  }
98 
99  return result;
100  }
101 
102  ReturnType CrystalConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
103  std::map<std::string, double (*)(MonCrystalConsistencyDat const &)> extList;
104 
105  extList["processed_events"] = [](MonCrystalConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
106  extList["problematic_events"] = [](MonCrystalConsistencyDat const &dat) {
107  return double(dat.getProblematicEvents());
108  };
109  extList["problems_id"] = [](MonCrystalConsistencyDat const &dat) { return double(dat.getProblemsID()); };
110  extList["problems_gain_zero"] = [](MonCrystalConsistencyDat const &dat) {
111  return double(dat.getProblemsGainZero());
112  };
113  extList["problems_gain_switch"] = [](MonCrystalConsistencyDat const &dat) {
114  return double(dat.getProblemsGainSwitch());
115  };
116 
117  return fetchAndFill(extList, _db, _iov, _formula);
118  }
119 
120  ReturnType TTConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
121  std::map<std::string, double (*)(MonTTConsistencyDat const &)> extList;
122 
123  extList["processed_events"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
124  extList["problematic_events"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblematicEvents()); };
125  extList["problems_id"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsID()); };
126  extList["problems_size"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsSize()); };
127  extList["problems_LV1"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsLV1()); };
128  extList["problems_bunch_X"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsBunchX()); };
129 
130  return fetchAndFill(extList, _db, _iov, _formula);
131  }
132 
133  ReturnType MemChConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
134  std::map<std::string, double (*)(MonMemChConsistencyDat const &)> extList;
135 
136  extList["processed_events"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
137  extList["problematic_events"] = [](MonMemChConsistencyDat const &dat) {
138  return double(dat.getProblematicEvents());
139  };
140  extList["problems_id"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProblemsID()); };
141  extList["problems_gain_zero"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProblemsGainZero()); };
142  extList["problems_gain_switch"] = [](MonMemChConsistencyDat const &dat) {
143  return double(dat.getProblemsGainSwitch());
144  };
145 
146  return fetchAndFill(extList, _db, _iov, _formula);
147  }
148 
149  ReturnType MemTTConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
150  std::map<std::string, double (*)(MonMemTTConsistencyDat const &)> extList;
151 
152  extList["processed_events"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
153  extList["problematic_events"] = [](MonMemTTConsistencyDat const &dat) {
154  return double(dat.getProblematicEvents());
155  };
156  extList["problems_id"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsID()); };
157  extList["problems_size"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsSize()); };
158  extList["problems_LV1"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsLV1()); };
159  extList["problems_bunch_X"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsBunchX()); };
160 
161  return fetchAndFill(extList, _db, _iov, _formula);
162  }
163 
164  ReturnType LaserBlueReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
165  std::map<std::string, double (*)(MonLaserBlueDat const &)> extList;
166 
167  extList["apd_mean"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDMean()); };
168  extList["apd_rms"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDRMS()); };
169  extList["apd_over_pn_mean"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDOverPNMean()); };
170  extList["apd_over_pn_rms"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDOverPNRMS()); };
171 
172  return fetchAndFill(extList, _db, _iov, _formula);
173  }
174 
176  return ReturnType();
177  }
178 
179  ReturnType PNBlueReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
180  std::map<std::string, double (*)(MonPNBlueDat const &)> extList;
181 
182  extList["adc_mean_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getADCMeanG1()); };
183  extList["adc_rms_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getADCRMSG1()); };
184  extList["ped_mean_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG1()); };
185  extList["ped_rms_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getPedRMSG1()); };
186  extList["adc_mean_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getADCMeanG16()); };
187  extList["adc_rms_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getADCRMSG16()); };
188  extList["ped_mean_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG16()); };
189  extList["ped_rms_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG16()); };
190 
191  return fetchAndFill(extList, _db, _iov, _formula);
192  }
193 
194  ReturnType LaserGreenReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
195  std::map<std::string, double (*)(MonLaserGreenDat const &)> extList;
196 
197  extList["apd_mean"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDMean()); };
198  extList["apd_rms"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDRMS()); };
199  extList["apd_over_pn_mean"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDOverPNMean()); };
200  extList["apd_over_pn_rms"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDOverPNRMS()); };
201 
202  return fetchAndFill(extList, _db, _iov, _formula);
203  }
204 
206  return ReturnType();
207  }
208 
209  ReturnType PNGreenReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
210  std::map<std::string, double (*)(MonPNGreenDat const &)> extList;
211 
212  extList["adc_mean_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getADCMeanG1()); };
213  extList["adc_rms_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getADCRMSG1()); };
214  extList["ped_mean_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG1()); };
215  extList["ped_rms_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getPedRMSG1()); };
216  extList["adc_mean_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getADCMeanG16()); };
217  extList["adc_rms_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getADCRMSG16()); };
218  extList["ped_mean_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG16()); };
219  extList["ped_rms_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG16()); };
220 
221  return fetchAndFill(extList, _db, _iov, _formula);
222  }
223 
224  ReturnType LaserIRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
225  std::map<std::string, double (*)(MonLaserIRedDat const &)> extList;
226 
227  extList["apd_mean"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDMean()); };
228  extList["apd_rms"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDRMS()); };
229  extList["apd_over_pn_mean"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDOverPNMean()); };
230  extList["apd_over_pn_rms"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDOverPNRMS()); };
231 
232  return fetchAndFill(extList, _db, _iov, _formula);
233  }
234 
236  return ReturnType();
237  }
238 
239  ReturnType PNIRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
240  std::map<std::string, double (*)(MonPNIRedDat const &)> extList;
241 
242  extList["adc_mean_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getADCMeanG1()); };
243  extList["adc_rms_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getADCRMSG1()); };
244  extList["ped_mean_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG1()); };
245  extList["ped_rms_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getPedRMSG1()); };
246  extList["adc_mean_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getADCMeanG16()); };
247  extList["adc_rms_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getADCRMSG16()); };
248  extList["ped_mean_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG16()); };
249  extList["ped_rms_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG16()); };
250 
251  return fetchAndFill(extList, _db, _iov, _formula);
252  }
253 
254  ReturnType LaserRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
255  std::map<std::string, double (*)(MonLaserRedDat const &)> extList;
256 
257  extList["apd_mean"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDMean()); };
258  extList["apd_rms"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDRMS()); };
259  extList["apd_over_pn_mean"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDOverPNMean()); };
260  extList["apd_over_pn_rms"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDOverPNRMS()); };
261 
262  return fetchAndFill(extList, _db, _iov, _formula);
263  }
264 
266  return ReturnType();
267  }
268 
269  ReturnType PNRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
270  std::map<std::string, double (*)(MonPNRedDat const &)> extList;
271 
272  extList["adc_mean_g1"] = [](MonPNRedDat const &dat) { return double(dat.getADCMeanG1()); };
273  extList["adc_rms_g1"] = [](MonPNRedDat const &dat) { return double(dat.getADCRMSG1()); };
274  extList["ped_mean_g1"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG1()); };
275  extList["ped_rms_g1"] = [](MonPNRedDat const &dat) { return double(dat.getPedRMSG1()); };
276  extList["adc_mean_g16"] = [](MonPNRedDat const &dat) { return double(dat.getADCMeanG16()); };
277  extList["adc_rms_g16"] = [](MonPNRedDat const &dat) { return double(dat.getADCRMSG16()); };
278  extList["ped_mean_g16"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG16()); };
279  extList["ped_rms_g16"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG16()); };
280 
281  return fetchAndFill(extList, _db, _iov, _formula);
282  }
283 
284  ReturnType PedestalsReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
285  std::map<std::string, double (*)(MonPedestalsDat const &)> extList;
286 
287  extList["ped_mean_g1"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG1()); };
288  extList["ped_rms_g1"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG1()); };
289  extList["ped_mean_g6"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG6()); };
290  extList["ped_rms_g6"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG6()); };
291  extList["ped_mean_g12"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG12()); };
292  extList["ped_rms_g12"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG12()); };
293 
294  return fetchAndFill(extList, _db, _iov, _formula);
295  }
296 
297  ReturnType PNPedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
298  std::map<std::string, double (*)(MonPNPedDat const &)> extList;
299 
300  extList["ped_mean_g1"] = [](MonPNPedDat const &dat) { return double(dat.getPedMeanG1()); };
301  extList["ped_rms_g1"] = [](MonPNPedDat const &dat) { return double(dat.getPedRMSG1()); };
302  extList["ped_mean_g16"] = [](MonPNPedDat const &dat) { return double(dat.getPedMeanG16()); };
303  extList["ped_rms_g16"] = [](MonPNPedDat const &dat) { return double(dat.getPedRMSG16()); };
304 
305  return fetchAndFill(extList, _db, _iov, _formula);
306  }
307 
308  ReturnType PedestalsOnlineReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
309  std::map<std::string, double (*)(MonPedestalsOnlineDat const &)> extList;
310 
311  extList["adc_mean_g12"] = [](MonPedestalsOnlineDat const &dat) { return double(dat.getADCMeanG12()); };
312  extList["adc_rms_g12"] = [](MonPedestalsOnlineDat const &dat) { return double(dat.getADCRMSG12()); };
313 
314  return fetchAndFill(extList, _db, _iov, _formula);
315  }
316 
317  ReturnType TestPulseReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
318  std::map<std::string, double (*)(MonTestPulseDat const &)> extList;
319 
320  extList["adc_mean_g1"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG1()); };
321  extList["adc_rms_g1"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG1()); };
322  extList["adc_mean_g6"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG6()); };
323  extList["adc_rms_g6"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG6()); };
324  extList["adc_mean_g12"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG12()); };
325  extList["adc_rms_g12"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG12()); };
326 
327  return fetchAndFill(extList, _db, _iov, _formula);
328  }
329 
330  ReturnType PulseShapeReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
331  std::map<std::string, double (*)(MonPulseShapeDat const &)> extList;
332 
333  extList["g1_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[0]); };
334  extList["g1_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[1]); };
335  extList["g1_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[2]); };
336  extList["g1_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[3]); };
337  extList["g1_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[4]); };
338  extList["g1_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[5]); };
339  extList["g1_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[6]); };
340  extList["g1_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[7]); };
341  extList["g1_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[8]); };
342  extList["g1_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[9]); };
343  extList["g6_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[0]); };
344  extList["g6_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[1]); };
345  extList["g6_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[2]); };
346  extList["g6_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[3]); };
347  extList["g6_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[4]); };
348  extList["g6_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[5]); };
349  extList["g6_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[6]); };
350  extList["g6_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[7]); };
351  extList["g6_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[8]); };
352  extList["g6_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[9]); };
353  extList["g12_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[0]); };
354  extList["g12_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[1]); };
355  extList["g12_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[2]); };
356  extList["g12_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[3]); };
357  extList["g12_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[4]); };
358  extList["g12_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[5]); };
359  extList["g12_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[6]); };
360  extList["g12_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[7]); };
361  extList["g12_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[8]); };
362  extList["g12_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[9]); };
363 
364  return fetchAndFill(extList, _db, _iov, _formula);
365  }
366 
367  ReturnType PNMGPAReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
368  std::map<std::string, double (*)(MonPNMGPADat const &)> extList;
369 
370  extList["adc_mean_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getADCMeanG1()); };
371  extList["adc_rms_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getADCRMSG1()); };
372  extList["ped_mean_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getPedMeanG1()); };
373  extList["ped_rms_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getPedRMSG1()); };
374  extList["adc_mean_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getADCMeanG16()); };
375  extList["adc_rms_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getADCRMSG16()); };
376  extList["ped_mean_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getPedMeanG16()); };
377  extList["ped_rms_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getPedRMSG16()); };
378 
379  return fetchAndFill(extList, _db, _iov, _formula);
380  }
381 
383 
384  ReturnType Led1Reader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
385  std::map<std::string, double (*)(MonLed1Dat const &)> extList;
386 
387  extList["vpt_mean"] = [](MonLed1Dat const &dat) { return double(dat.getVPTMean()); };
388  extList["vpt_rms"] = [](MonLed1Dat const &dat) { return double(dat.getVPTRMS()); };
389  extList["vpt_over_pn_mean"] = [](MonLed1Dat const &dat) { return double(dat.getVPTOverPNMean()); };
390  extList["vpt_over_pn_rms"] = [](MonLed1Dat const &dat) { return double(dat.getVPTOverPNRMS()); };
391 
392  return fetchAndFill(extList, _db, _iov, _formula);
393  }
394 
396  return ReturnType();
397  }
398 
399  ReturnType Led2Reader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
400  std::map<std::string, double (*)(MonLed2Dat const &)> extList;
401 
402  extList["vpt_mean"] = [](MonLed2Dat const &dat) { return double(dat.getVPTMean()); };
403  extList["vpt_rms"] = [](MonLed2Dat const &dat) { return double(dat.getVPTRMS()); };
404  extList["vpt_over_pn_mean"] = [](MonLed2Dat const &dat) { return double(dat.getVPTOverPNMean()); };
405  extList["vpt_over_pn_rms"] = [](MonLed2Dat const &dat) { return double(dat.getVPTOverPNRMS()); };
406 
407  return fetchAndFill(extList, _db, _iov, _formula);
408  }
409 
411  return ReturnType();
412  }
413 
414  ReturnType OccupancyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
415  std::map<std::string, double (*)(MonOccupancyDat const &)> extList;
416 
417  extList["events_over_low_threshold"] = [](MonOccupancyDat const &dat) {
418  return double(dat.getEventsOverLowThreshold());
419  };
420  extList["events_over_high_threshold"] = [](MonOccupancyDat const &dat) {
421  return double(dat.getEventsOverHighThreshold());
422  };
423  extList["avg_energy"] = [](MonOccupancyDat const &dat) { return double(dat.getAvgEnergy()); };
424 
425  return fetchAndFill(extList, _db, _iov, _formula);
426  }
427 } // namespace ecaldqm
ReturnType fetchAndFill(std::map< std::string, double(*)(DataType const &)> const &_extractors, EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula)
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > ReturnType
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
DetId toDetId(EcalLogicID const &)
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
std::map< DetId, double > run(EcalCondDBInterface *, MonRunIOV &, std::string const &) override
vars
Definition: DeepTauId.cc:158