Implements popcon::PopConSourceHandler< EcalTPGWeightIdMap >.
Definition at line 42 of file EcalTPGWeightIdMapHandler.cc.
48 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Started GetNewObjects!!!";
60 unsigned int max_since = 0;
61 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
62 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"max_since : " << max_since;
65 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"retrieved last payload ";
68 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
70 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Making connection...";
101 if (min_run < max_since) {
102 min_run = max_since + 1;
108 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
114 std::vector<RunIOV> run_vec = my_list.
getRuns();
115 size_t num_runs = run_vec.size();
116 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"number of Mon runs is : " << num_runs;
120 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
121 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
126 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
130 int the_config_version = 0;
132 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
145 edm::LogInfo(
" run= ") << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version;
150 edm::LogInfo(
"the tag is different from last transferred run ... retrieving last config set from DB");
160 int weightId = fe_main_info.
getWeiId();
164 fe_weight_info.
setId(weightId);
166 std::map<EcalLogicID, FEConfigWeightGroupDat> dataset_TpgWeight;
168 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Got object!";
170 typedef std::map<EcalLogicID, FEConfigWeightGroupDat>::const_iterator CIfeweight;
175 for (CIfeweight
p = dataset_TpgWeight.begin();
p != dataset_TpgWeight.end();
p++) {
179 unsigned int weight0 = static_cast<unsigned int>(rd_w.
getWeight4());
180 unsigned int weight1 = static_cast<unsigned int>(rd_w.
getWeight3());
181 unsigned int weight2 = static_cast<unsigned int>(rd_w.
getWeight2());
182 unsigned int weight3 = static_cast<unsigned int>(rd_w.
getWeight1() - 0x80);
183 unsigned int weight4 = static_cast<unsigned int>(rd_w.
getWeight0());
185 w.setValues(weight0, weight1, weight2, weight3, weight4);
191 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"found " << igroups <<
"Weight groups";
201 writeFile(
"last_tpg_weightIdMap_settings.txt");
208 writeFile(
"last_tpg_weightIdMap_settings.txt");
211 " even if the tag/version is not the same, the weightIdMap id is the same -> no transfer needed ");
216 << the_config_tag <<
" version=" << the_config_version;
221 }
else if (
nr == 0) {
223 edm::LogInfo(
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor, no transfer needed ");
228 edm::LogInfo(
" the tag/version is the same, no transfer needed ");
229 writeFile(
"last_tpg_weightIdMap_settings.txt");
236 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Ecal - > end of getNewObjects -----------";
References writedatasetfile::dataset, MillePedeFileConverter_cfg::e, test_db_connect::econn, cppFunctionSkipper::exception, Exception, RunTPGConfigDat::getConfigTag(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigWeightGroupDat::getWeight0(), FEConfigWeightGroupDat::getWeight1(), FEConfigWeightGroupDat::getWeight2(), FEConfigWeightGroupDat::getWeight3(), FEConfigWeightGroupDat::getWeight4(), FEConfigWeightGroupDat::getWeightGroupId(), FEConfigMainInfo::getWeiId(), test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGWeightIdMap::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, dumpRecoGeometry_cfg::tagInfo, and w.