56 template <
typename DataType>
61 typedef std::map<EcalLogicID, DataType> DataSet;
62 typedef double (*DataExtractor)(DataType
const &);
63 typedef std::map<std::string, DataExtractor> ExtractorList;
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;
71 if (varMap.size() > 4)
72 throw cms::Exception(
"EcalDQM") << _formula <<
" has too many variables";
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++]);
81 TFormula tformula(
"formula", formula);
82 if (tformula.Compile() != 0)
83 throw cms::Exception(
"EcalDQM") << _formula <<
" could not be compiled";
90 for (
typename DataSet::const_iterator dItr(dataSet.begin()); dItr != dataSet.end(); ++dItr) {
93 for (
typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
94 vars[iV++] = vItr->second(dItr->second);
96 result[
toDetId(dItr->first)] = tformula.EvalPar(vars);
103 std::map<std::string, double (*)(MonCrystalConsistencyDat const &)> extList;
107 return double(
dat.getProblematicEvents());
111 return double(
dat.getProblemsGainZero());
114 return double(
dat.getProblemsGainSwitch());
121 std::map<std::string, double (*)(MonTTConsistencyDat const &)> extList;
134 std::map<std::string, double (*)(MonMemChConsistencyDat const &)> extList;
138 return double(
dat.getProblematicEvents());
143 return double(
dat.getProblemsGainSwitch());
150 std::map<std::string, double (*)(MonMemTTConsistencyDat const &)> extList;
154 return double(
dat.getProblematicEvents());
165 std::map<std::string, double (*)(MonLaserBlueDat const &)> extList;
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()); };
180 std::map<std::string, double (*)(MonPNBlueDat const &)> extList;
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()); };
195 std::map<std::string, double (*)(MonLaserGreenDat const &)> extList;
210 std::map<std::string, double (*)(MonPNGreenDat const &)> extList;
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()); };
225 std::map<std::string, double (*)(MonLaserIRedDat const &)> extList;
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()); };
240 std::map<std::string, double (*)(MonPNIRedDat const &)> extList;
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()); };
255 std::map<std::string, double (*)(MonLaserRedDat const &)> extList;
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()); };
270 std::map<std::string, double (*)(MonPNRedDat const &)> extList;
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()); };
285 std::map<std::string, double (*)(MonPedestalsDat const &)> extList;
298 std::map<std::string, double (*)(MonPNPedDat const &)> extList;
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()); };
309 std::map<std::string, double (*)(MonPedestalsOnlineDat const &)> extList;
318 std::map<std::string, double (*)(MonTestPulseDat const &)> extList;
331 std::map<std::string, double (*)(MonPulseShapeDat const &)> extList;
368 std::map<std::string, double (*)(MonPNMGPADat const &)> extList;
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()); };
385 std::map<std::string, double (*)(MonLed1Dat const &)> extList;
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()); };
400 std::map<std::string, double (*)(MonLed2Dat const &)> extList;
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()); };
415 std::map<std::string, double (*)(MonOccupancyDat const &)> extList;
418 return double(
dat.getEventsOverLowThreshold());
421 return double(
dat.getEventsOverHighThreshold());
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
if(conf_.getParameter< bool >("UseStripCablingDB"))
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
static std::vector< std::string > checklist dat
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