Implements popcon::PopConSourceHandler< EcalTPGOddWeightIdMap >.
Definition at line 42 of file EcalTPGOddWeightIdMapHandler.cc.
48 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"Started GetNewObjects!!!";
53 std::cout <<
"got offlineInfo = " << std::endl;
57 std::cout <<
" First object for this tag " << std::endl;
60 unsigned int max_since = 0;
61 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
62 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"max_since : " << max_since;
65 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"retrieved last payload ";
68 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
70 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"Making connection...";
101 if (min_run < max_since) {
102 min_run = max_since + 1;
109 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
115 std::vector<RunIOV> run_vec = my_list.
getRuns();
116 size_t num_runs = run_vec.size();
117 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"number of Mon runs is : " << num_runs;
121 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
122 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
124 std::cout <<
" **************** " << std::endl;
125 std::cout <<
" **************** " << std::endl;
126 std::cout <<
" run= " << irun << std::endl;
129 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
133 int the_config_version = 0;
135 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
148 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
153 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
161 std::cout <<
" before fetch config set" << std::endl;
163 std::cout <<
" after fetch config set" << std::endl;
170 fe_odd_weight_info.
setId(weightId);
172 std::map<EcalLogicID, FEConfigOddWeightGroupDat> dataset_TpgWeight;
174 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"Got object!";
176 typedef std::map<EcalLogicID, FEConfigOddWeightGroupDat>::const_iterator CIfeweight;
181 for (CIfeweight
p = dataset_TpgWeight.begin();
p != dataset_TpgWeight.end();
p++) {
185 unsigned int weight0 = static_cast<unsigned int>(rd_w.
getWeight4());
186 unsigned int weight1 = static_cast<unsigned int>(rd_w.
getWeight3());
187 unsigned int weight2 = static_cast<unsigned int>(rd_w.
getWeight2());
188 unsigned int weight3 = static_cast<unsigned int>(rd_w.
getWeight1() - 0x80);
189 unsigned int weight4 = static_cast<unsigned int>(rd_w.
getWeight0());
191 w.setValues(weight0, weight1, weight2, weight3, weight4);
197 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"found " << igroups <<
"Weight groups";
207 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
214 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
217 <<
" even if the tag/version is not the same, the weightIdMap id is the same -> no transfer needed "
222 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag
223 <<
" version=" << the_config_version << std::endl;
227 std::cout <<
" **************** " << std::endl;
229 }
else if (
nr == 0) {
231 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
232 std::cout <<
" **************** " << std::endl;
237 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
238 std::cout <<
" **************** " << std::endl;
239 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
246 edm::LogInfo(
"EcalTPGOddWeightIdMapHandler") <<
"Ecal - > end of getNewObjects -----------";
References gather_cfg::cout, writedatasetfile::dataset, MillePedeFileConverter_cfg::e, test_db_connect::econn, cppFunctionSkipper::exception, Exception, RunTPGConfigDat::getConfigTag(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigMainInfo::getWei2Id(), FEConfigOddWeightGroupDat::getWeight0(), FEConfigOddWeightGroupDat::getWeight1(), FEConfigOddWeightGroupDat::getWeight2(), FEConfigOddWeightGroupDat::getWeight3(), FEConfigOddWeightGroupDat::getWeight4(), FEConfigOddWeightGroupDat::getWeightGroupId(), test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigOddWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGOddWeightIdMap::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, dumpRecoGeometry_cfg::tagInfo, and w.