File indexing completed on 2024-04-06 12:07:18
0001 #include "DQM/EcalMonitorDbModule/interface/DBReaderWorkers.h"
0002 #include "DQM/EcalMonitorDbModule/interface/LogicIDTranslation.h"
0003
0004 #include "DQM/EcalCommon/interface/EcalDQMCommonUtils.h"
0005
0006 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0007 #include "OnlineDB/EcalCondDB/interface/MonCrystalConsistencyDat.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h"
0009 #include "OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h"
0010 #include "OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h"
0011 #include "OnlineDB/EcalCondDB/interface/MonLaserRedDat.h"
0012 #include "OnlineDB/EcalCondDB/interface/MonLed1Dat.h"
0013 #include "OnlineDB/EcalCondDB/interface/MonLed2Dat.h"
0014 #include "OnlineDB/EcalCondDB/interface/MonMemChConsistencyDat.h"
0015 #include "OnlineDB/EcalCondDB/interface/MonMemTTConsistencyDat.h"
0016 #include "OnlineDB/EcalCondDB/interface/MonPNBlueDat.h"
0017 #include "OnlineDB/EcalCondDB/interface/MonPNGreenDat.h"
0018 #include "OnlineDB/EcalCondDB/interface/MonPNIRedDat.h"
0019 #include "OnlineDB/EcalCondDB/interface/MonPNMGPADat.h"
0020 #include "OnlineDB/EcalCondDB/interface/MonPNPedDat.h"
0021 #include "OnlineDB/EcalCondDB/interface/MonPNRedDat.h"
0022 #include "OnlineDB/EcalCondDB/interface/MonPedestalsDat.h"
0023 #include "OnlineDB/EcalCondDB/interface/MonPedestalsOnlineDat.h"
0024 #include "OnlineDB/EcalCondDB/interface/MonPulseShapeDat.h"
0025 #include "OnlineDB/EcalCondDB/interface/MonTTConsistencyDat.h"
0026 #include "OnlineDB/EcalCondDB/interface/MonTestPulseDat.h"
0027 #include "OnlineDB/EcalCondDB/interface/MonTimingCrystalDat.h"
0028 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h"
0029 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h"
0030 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h"
0031 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h"
0032
0033
0034 #include "OnlineDB/EcalCondDB/interface/MonOccupancyDat.h"
0035 #include "OnlineDB/EcalCondDB/interface/MonRunDat.h"
0036 #include "OnlineDB/EcalCondDB/interface/MonTimingLed1CrystalDat.h"
0037 #include "OnlineDB/EcalCondDB/interface/MonTimingLed2CrystalDat.h"
0038
0039 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0040 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0041 #include "DataFormats/EcalDetId/interface/EcalElectronicsId.h"
0042 #include "DataFormats/EcalDetId/interface/EcalPnDiodeDetId.h"
0043 #include "DataFormats/EcalDetId/interface/EcalScDetId.h"
0044 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0045 #include "DataFormats/EcalDetId/interface/EcalTrigTowerDetId.h"
0046
0047 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0048 #include "FWCore/Utilities/interface/Exception.h"
0049
0050 #include "TFormula.h"
0051 #include "TString.h"
0052
0053 namespace ecaldqm {
0054 typedef std::map<DetId, double> ReturnType;
0055
0056 template <typename DataType>
0057 ReturnType fetchAndFill(std::map<std::string, double (*)(DataType const &)> const &_extractors,
0058 EcalCondDBInterface *_db,
0059 MonRunIOV &_iov,
0060 std::string const &_formula) {
0061 typedef std::map<EcalLogicID, DataType> DataSet;
0062 typedef double (*DataExtractor)(DataType const &);
0063 typedef std::map<std::string, DataExtractor> ExtractorList;
0064
0065 ExtractorList varMap;
0066
0067 for (typename ExtractorList::const_iterator eItr(_extractors.begin()); eItr != _extractors.end(); ++eItr)
0068 if (_formula.find(eItr->first) != std::string::npos)
0069 varMap[eItr->first] = eItr->second;
0070
0071 if (varMap.size() > 4)
0072 throw cms::Exception("EcalDQM") << _formula << " has too many variables";
0073
0074 TString formula(_formula);
0075
0076 unsigned iV(0);
0077 char varChars[4][2] = {"x", "y", "z", "t"};
0078 for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
0079 formula.ReplaceAll(vItr->first, varChars[iV++]);
0080
0081 TFormula tformula("formula", formula);
0082 if (tformula.Compile() != 0)
0083 throw cms::Exception("EcalDQM") << _formula << " could not be compiled";
0084
0085 DataSet dataSet;
0086 _db->fetchDataSet(&dataSet, &_iov);
0087
0088 ReturnType result;
0089
0090 for (typename DataSet::const_iterator dItr(dataSet.begin()); dItr != dataSet.end(); ++dItr) {
0091 double vars[4];
0092 iV = 0;
0093 for (typename ExtractorList::iterator vItr(varMap.begin()); vItr != varMap.end(); ++vItr)
0094 vars[iV++] = vItr->second(dItr->second);
0095
0096 result[toDetId(dItr->first)] = tformula.EvalPar(vars);
0097 }
0098
0099 return result;
0100 }
0101
0102 ReturnType CrystalConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0103 std::map<std::string, double (*)(MonCrystalConsistencyDat const &)> extList;
0104
0105 extList["processed_events"] = [](MonCrystalConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
0106 extList["problematic_events"] = [](MonCrystalConsistencyDat const &dat) {
0107 return double(dat.getProblematicEvents());
0108 };
0109 extList["problems_id"] = [](MonCrystalConsistencyDat const &dat) { return double(dat.getProblemsID()); };
0110 extList["problems_gain_zero"] = [](MonCrystalConsistencyDat const &dat) {
0111 return double(dat.getProblemsGainZero());
0112 };
0113 extList["problems_gain_switch"] = [](MonCrystalConsistencyDat const &dat) {
0114 return double(dat.getProblemsGainSwitch());
0115 };
0116
0117 return fetchAndFill(extList, _db, _iov, _formula);
0118 }
0119
0120 ReturnType TTConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0121 std::map<std::string, double (*)(MonTTConsistencyDat const &)> extList;
0122
0123 extList["processed_events"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
0124 extList["problematic_events"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblematicEvents()); };
0125 extList["problems_id"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsID()); };
0126 extList["problems_size"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsSize()); };
0127 extList["problems_LV1"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsLV1()); };
0128 extList["problems_bunch_X"] = [](MonTTConsistencyDat const &dat) { return double(dat.getProblemsBunchX()); };
0129
0130 return fetchAndFill(extList, _db, _iov, _formula);
0131 }
0132
0133 ReturnType MemChConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0134 std::map<std::string, double (*)(MonMemChConsistencyDat const &)> extList;
0135
0136 extList["processed_events"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
0137 extList["problematic_events"] = [](MonMemChConsistencyDat const &dat) {
0138 return double(dat.getProblematicEvents());
0139 };
0140 extList["problems_id"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProblemsID()); };
0141 extList["problems_gain_zero"] = [](MonMemChConsistencyDat const &dat) { return double(dat.getProblemsGainZero()); };
0142 extList["problems_gain_switch"] = [](MonMemChConsistencyDat const &dat) {
0143 return double(dat.getProblemsGainSwitch());
0144 };
0145
0146 return fetchAndFill(extList, _db, _iov, _formula);
0147 }
0148
0149 ReturnType MemTTConsistencyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0150 std::map<std::string, double (*)(MonMemTTConsistencyDat const &)> extList;
0151
0152 extList["processed_events"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProcessedEvents()); };
0153 extList["problematic_events"] = [](MonMemTTConsistencyDat const &dat) {
0154 return double(dat.getProblematicEvents());
0155 };
0156 extList["problems_id"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsID()); };
0157 extList["problems_size"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsSize()); };
0158 extList["problems_LV1"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsLV1()); };
0159 extList["problems_bunch_X"] = [](MonMemTTConsistencyDat const &dat) { return double(dat.getProblemsBunchX()); };
0160
0161 return fetchAndFill(extList, _db, _iov, _formula);
0162 }
0163
0164 ReturnType LaserBlueReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0165 std::map<std::string, double (*)(MonLaserBlueDat const &)> extList;
0166
0167 extList["apd_mean"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDMean()); };
0168 extList["apd_rms"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDRMS()); };
0169 extList["apd_over_pn_mean"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDOverPNMean()); };
0170 extList["apd_over_pn_rms"] = [](MonLaserBlueDat const &dat) { return double(dat.getAPDOverPNRMS()); };
0171
0172 return fetchAndFill(extList, _db, _iov, _formula);
0173 }
0174
0175 ReturnType TimingLaserBlueCrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0176 return ReturnType();
0177 }
0178
0179 ReturnType PNBlueReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0180 std::map<std::string, double (*)(MonPNBlueDat const &)> extList;
0181
0182 extList["adc_mean_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getADCMeanG1()); };
0183 extList["adc_rms_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getADCRMSG1()); };
0184 extList["ped_mean_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG1()); };
0185 extList["ped_rms_g1"] = [](MonPNBlueDat const &dat) { return double(dat.getPedRMSG1()); };
0186 extList["adc_mean_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getADCMeanG16()); };
0187 extList["adc_rms_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getADCRMSG16()); };
0188 extList["ped_mean_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG16()); };
0189 extList["ped_rms_g16"] = [](MonPNBlueDat const &dat) { return double(dat.getPedMeanG16()); };
0190
0191 return fetchAndFill(extList, _db, _iov, _formula);
0192 }
0193
0194 ReturnType LaserGreenReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0195 std::map<std::string, double (*)(MonLaserGreenDat const &)> extList;
0196
0197 extList["apd_mean"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDMean()); };
0198 extList["apd_rms"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDRMS()); };
0199 extList["apd_over_pn_mean"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDOverPNMean()); };
0200 extList["apd_over_pn_rms"] = [](MonLaserGreenDat const &dat) { return double(dat.getAPDOverPNRMS()); };
0201
0202 return fetchAndFill(extList, _db, _iov, _formula);
0203 }
0204
0205 ReturnType TimingLaserGreenCrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0206 return ReturnType();
0207 }
0208
0209 ReturnType PNGreenReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0210 std::map<std::string, double (*)(MonPNGreenDat const &)> extList;
0211
0212 extList["adc_mean_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getADCMeanG1()); };
0213 extList["adc_rms_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getADCRMSG1()); };
0214 extList["ped_mean_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG1()); };
0215 extList["ped_rms_g1"] = [](MonPNGreenDat const &dat) { return double(dat.getPedRMSG1()); };
0216 extList["adc_mean_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getADCMeanG16()); };
0217 extList["adc_rms_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getADCRMSG16()); };
0218 extList["ped_mean_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG16()); };
0219 extList["ped_rms_g16"] = [](MonPNGreenDat const &dat) { return double(dat.getPedMeanG16()); };
0220
0221 return fetchAndFill(extList, _db, _iov, _formula);
0222 }
0223
0224 ReturnType LaserIRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0225 std::map<std::string, double (*)(MonLaserIRedDat const &)> extList;
0226
0227 extList["apd_mean"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDMean()); };
0228 extList["apd_rms"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDRMS()); };
0229 extList["apd_over_pn_mean"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDOverPNMean()); };
0230 extList["apd_over_pn_rms"] = [](MonLaserIRedDat const &dat) { return double(dat.getAPDOverPNRMS()); };
0231
0232 return fetchAndFill(extList, _db, _iov, _formula);
0233 }
0234
0235 ReturnType TimingLaserIRedCrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0236 return ReturnType();
0237 }
0238
0239 ReturnType PNIRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0240 std::map<std::string, double (*)(MonPNIRedDat const &)> extList;
0241
0242 extList["adc_mean_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getADCMeanG1()); };
0243 extList["adc_rms_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getADCRMSG1()); };
0244 extList["ped_mean_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG1()); };
0245 extList["ped_rms_g1"] = [](MonPNIRedDat const &dat) { return double(dat.getPedRMSG1()); };
0246 extList["adc_mean_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getADCMeanG16()); };
0247 extList["adc_rms_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getADCRMSG16()); };
0248 extList["ped_mean_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG16()); };
0249 extList["ped_rms_g16"] = [](MonPNIRedDat const &dat) { return double(dat.getPedMeanG16()); };
0250
0251 return fetchAndFill(extList, _db, _iov, _formula);
0252 }
0253
0254 ReturnType LaserRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0255 std::map<std::string, double (*)(MonLaserRedDat const &)> extList;
0256
0257 extList["apd_mean"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDMean()); };
0258 extList["apd_rms"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDRMS()); };
0259 extList["apd_over_pn_mean"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDOverPNMean()); };
0260 extList["apd_over_pn_rms"] = [](MonLaserRedDat const &dat) { return double(dat.getAPDOverPNRMS()); };
0261
0262 return fetchAndFill(extList, _db, _iov, _formula);
0263 }
0264
0265 ReturnType TimingLaserRedCrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0266 return ReturnType();
0267 }
0268
0269 ReturnType PNRedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0270 std::map<std::string, double (*)(MonPNRedDat const &)> extList;
0271
0272 extList["adc_mean_g1"] = [](MonPNRedDat const &dat) { return double(dat.getADCMeanG1()); };
0273 extList["adc_rms_g1"] = [](MonPNRedDat const &dat) { return double(dat.getADCRMSG1()); };
0274 extList["ped_mean_g1"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG1()); };
0275 extList["ped_rms_g1"] = [](MonPNRedDat const &dat) { return double(dat.getPedRMSG1()); };
0276 extList["adc_mean_g16"] = [](MonPNRedDat const &dat) { return double(dat.getADCMeanG16()); };
0277 extList["adc_rms_g16"] = [](MonPNRedDat const &dat) { return double(dat.getADCRMSG16()); };
0278 extList["ped_mean_g16"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG16()); };
0279 extList["ped_rms_g16"] = [](MonPNRedDat const &dat) { return double(dat.getPedMeanG16()); };
0280
0281 return fetchAndFill(extList, _db, _iov, _formula);
0282 }
0283
0284 ReturnType PedestalsReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0285 std::map<std::string, double (*)(MonPedestalsDat const &)> extList;
0286
0287 extList["ped_mean_g1"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG1()); };
0288 extList["ped_rms_g1"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG1()); };
0289 extList["ped_mean_g6"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG6()); };
0290 extList["ped_rms_g6"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG6()); };
0291 extList["ped_mean_g12"] = [](MonPedestalsDat const &dat) { return double(dat.getPedMeanG12()); };
0292 extList["ped_rms_g12"] = [](MonPedestalsDat const &dat) { return double(dat.getPedRMSG12()); };
0293
0294 return fetchAndFill(extList, _db, _iov, _formula);
0295 }
0296
0297 ReturnType PNPedReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0298 std::map<std::string, double (*)(MonPNPedDat const &)> extList;
0299
0300 extList["ped_mean_g1"] = [](MonPNPedDat const &dat) { return double(dat.getPedMeanG1()); };
0301 extList["ped_rms_g1"] = [](MonPNPedDat const &dat) { return double(dat.getPedRMSG1()); };
0302 extList["ped_mean_g16"] = [](MonPNPedDat const &dat) { return double(dat.getPedMeanG16()); };
0303 extList["ped_rms_g16"] = [](MonPNPedDat const &dat) { return double(dat.getPedRMSG16()); };
0304
0305 return fetchAndFill(extList, _db, _iov, _formula);
0306 }
0307
0308 ReturnType PedestalsOnlineReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0309 std::map<std::string, double (*)(MonPedestalsOnlineDat const &)> extList;
0310
0311 extList["adc_mean_g12"] = [](MonPedestalsOnlineDat const &dat) { return double(dat.getADCMeanG12()); };
0312 extList["adc_rms_g12"] = [](MonPedestalsOnlineDat const &dat) { return double(dat.getADCRMSG12()); };
0313
0314 return fetchAndFill(extList, _db, _iov, _formula);
0315 }
0316
0317 ReturnType TestPulseReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0318 std::map<std::string, double (*)(MonTestPulseDat const &)> extList;
0319
0320 extList["adc_mean_g1"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG1()); };
0321 extList["adc_rms_g1"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG1()); };
0322 extList["adc_mean_g6"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG6()); };
0323 extList["adc_rms_g6"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG6()); };
0324 extList["adc_mean_g12"] = [](MonTestPulseDat const &dat) { return double(dat.getADCMeanG12()); };
0325 extList["adc_rms_g12"] = [](MonTestPulseDat const &dat) { return double(dat.getADCRMSG12()); };
0326
0327 return fetchAndFill(extList, _db, _iov, _formula);
0328 }
0329
0330 ReturnType PulseShapeReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0331 std::map<std::string, double (*)(MonPulseShapeDat const &)> extList;
0332
0333 extList["g1_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[0]); };
0334 extList["g1_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[1]); };
0335 extList["g1_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[2]); };
0336 extList["g1_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[3]); };
0337 extList["g1_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[4]); };
0338 extList["g1_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[5]); };
0339 extList["g1_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[6]); };
0340 extList["g1_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[7]); };
0341 extList["g1_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[8]); };
0342 extList["g1_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(1)[9]); };
0343 extList["g6_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[0]); };
0344 extList["g6_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[1]); };
0345 extList["g6_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[2]); };
0346 extList["g6_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[3]); };
0347 extList["g6_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[4]); };
0348 extList["g6_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[5]); };
0349 extList["g6_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[6]); };
0350 extList["g6_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[7]); };
0351 extList["g6_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[8]); };
0352 extList["g6_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(6)[9]); };
0353 extList["g12_avg_sample_01"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[0]); };
0354 extList["g12_avg_sample_02"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[1]); };
0355 extList["g12_avg_sample_03"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[2]); };
0356 extList["g12_avg_sample_04"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[3]); };
0357 extList["g12_avg_sample_05"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[4]); };
0358 extList["g12_avg_sample_06"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[5]); };
0359 extList["g12_avg_sample_07"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[6]); };
0360 extList["g12_avg_sample_08"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[7]); };
0361 extList["g12_avg_sample_09"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[8]); };
0362 extList["g12_avg_sample_10"] = [](MonPulseShapeDat const &dat) { return double(dat.getSamples(12)[9]); };
0363
0364 return fetchAndFill(extList, _db, _iov, _formula);
0365 }
0366
0367 ReturnType PNMGPAReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0368 std::map<std::string, double (*)(MonPNMGPADat const &)> extList;
0369
0370 extList["adc_mean_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getADCMeanG1()); };
0371 extList["adc_rms_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getADCRMSG1()); };
0372 extList["ped_mean_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getPedMeanG1()); };
0373 extList["ped_rms_g1"] = [](MonPNMGPADat const &dat) { return double(dat.getPedRMSG1()); };
0374 extList["adc_mean_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getADCMeanG16()); };
0375 extList["adc_rms_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getADCRMSG16()); };
0376 extList["ped_mean_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getPedMeanG16()); };
0377 extList["ped_rms_g16"] = [](MonPNMGPADat const &dat) { return double(dat.getPedRMSG16()); };
0378
0379 return fetchAndFill(extList, _db, _iov, _formula);
0380 }
0381
0382 ReturnType TimingCrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) { return ReturnType(); }
0383
0384 ReturnType Led1Reader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0385 std::map<std::string, double (*)(MonLed1Dat const &)> extList;
0386
0387 extList["vpt_mean"] = [](MonLed1Dat const &dat) { return double(dat.getVPTMean()); };
0388 extList["vpt_rms"] = [](MonLed1Dat const &dat) { return double(dat.getVPTRMS()); };
0389 extList["vpt_over_pn_mean"] = [](MonLed1Dat const &dat) { return double(dat.getVPTOverPNMean()); };
0390 extList["vpt_over_pn_rms"] = [](MonLed1Dat const &dat) { return double(dat.getVPTOverPNRMS()); };
0391
0392 return fetchAndFill(extList, _db, _iov, _formula);
0393 }
0394
0395 ReturnType TimingLed1CrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0396 return ReturnType();
0397 }
0398
0399 ReturnType Led2Reader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0400 std::map<std::string, double (*)(MonLed2Dat const &)> extList;
0401
0402 extList["vpt_mean"] = [](MonLed2Dat const &dat) { return double(dat.getVPTMean()); };
0403 extList["vpt_rms"] = [](MonLed2Dat const &dat) { return double(dat.getVPTRMS()); };
0404 extList["vpt_over_pn_mean"] = [](MonLed2Dat const &dat) { return double(dat.getVPTOverPNMean()); };
0405 extList["vpt_over_pn_rms"] = [](MonLed2Dat const &dat) { return double(dat.getVPTOverPNRMS()); };
0406
0407 return fetchAndFill(extList, _db, _iov, _formula);
0408 }
0409
0410 ReturnType TimingLed2CrystalReader::run(EcalCondDBInterface *, MonRunIOV &, std::string const &) {
0411 return ReturnType();
0412 }
0413
0414 ReturnType OccupancyReader::run(EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula) {
0415 std::map<std::string, double (*)(MonOccupancyDat const &)> extList;
0416
0417 extList["events_over_low_threshold"] = [](MonOccupancyDat const &dat) {
0418 return double(dat.getEventsOverLowThreshold());
0419 };
0420 extList["events_over_high_threshold"] = [](MonOccupancyDat const &dat) {
0421 return double(dat.getEventsOverHighThreshold());
0422 };
0423 extList["avg_energy"] = [](MonOccupancyDat const &dat) { return double(dat.getAvgEnergy()); };
0424
0425 return fetchAndFill(extList, _db, _iov, _formula);
0426 }
0427 }