Implements popcon::PopConSourceHandler< EcalTPGOddWeightGroup >.
Definition at line 50 of file EcalTPGOddWeightGroupHandler.cc.
56 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"Started GetNewObjects!!!";
61 std::cout <<
"got offlineInfo = " << std::endl;
65 std::cout <<
" First object for this tag " << std::endl;
68 unsigned int max_since = 0;
69 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
70 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"max_since : " << max_since;
72 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"retrieved last payload ";
76 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"Retrieving run list from ONLINE DB ... ";
78 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"Making connection...";
109 if (min_run < max_since) {
110 min_run = max_since + 1;
117 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
123 std::vector<RunIOV> run_vec = my_list.
getRuns();
124 size_t num_runs = run_vec.size();
126 std::cout <<
"number of runs is : " << num_runs << std::endl;
128 unsigned int irun = 0;
131 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
132 my_StripEcalLogicId_EE =
135 std::cout <<
" GOT the logic ID for the EE trigger strips " << std::endl;
137 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
138 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
140 std::cout <<
" **************** " << std::endl;
141 std::cout <<
" **************** " << std::endl;
142 std::cout <<
" run= " << irun << std::endl;
145 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
149 int the_config_version = 0;
151 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
165 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
170 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
178 std::cout <<
" before fetch config set" << std::endl;
180 std::cout <<
" after fetch config set" << std::endl;
187 fe_oddw_info.
setId(wId);
189 std::map<EcalLogicID, FEConfigOddWeightDat> dataset_TpgW;
193 typedef std::map<EcalLogicID, FEConfigOddWeightDat>::const_iterator CIfesli;
198 std::map<std::string, int>
map;
201 for (CIfesli
p = dataset_TpgW.begin();
p != dataset_TpgW.end();
p++) {
203 weightGroup =
p->second.getWeightGroupId();
208 if (ecid_name ==
"EB_VFE") {
209 int sm = ecid_xt.
getID1();
218 unsigned int stripEBId = 303176 + (
tt - 1) * 64 + (
strip - 1) * 8 + (tcc - 37) * 8192;
220 weightG->
setValue(stripEBId, weightGroup);
222 }
else if (ecid_name ==
"ECAL_readout_strip") {
226 int id3 = ecid_xt.
getID3();
228 bool set_the_strip =
false;
230 for (
size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
231 if (!set_the_strip) {
232 if (my_StripEcalLogicId_EE[istrip].getID1() ==
id1 &&
233 my_StripEcalLogicId_EE[istrip].getID2() ==
id2 &&
234 my_StripEcalLogicId_EE[istrip].getID3() == id3) {
235 stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
236 set_the_strip =
true;
243 weightG->
setValue(stripEEId, weightGroup);
246 std::cout <<
" these may be the additional towers TCC/TT " <<
id1 <<
"/" <<
id2 << std::endl;
262 writeFile(
"last_tpg_OddweightGroup_settings.txt");
269 writeFile(
"last_tpg_OddweightGroup_settings.txt");
272 <<
" even if the tag/version is not the same, the weight group id is the same -> no transfer needed "
279 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag
280 <<
" version=" << the_config_version << std::endl;
284 std::cout <<
" **************** " << std::endl;
286 }
else if (
nr == 0) {
288 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
289 std::cout <<
" **************** " << std::endl;
294 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
295 std::cout <<
" **************** " << std::endl;
296 writeFile(
"last_tpg_OddweightGroup_settings.txt");
303 edm::LogInfo(
"EcalTPGOddWeightGroupHandler") <<
"Ecal - > end of getNewObjects -----------";
References gather_cfg::cout, writedatasetfile::dataset, MillePedeFileConverter_cfg::e, test_db_connect::econn, cppFunctionSkipper::exception, Exception, RunTPGConfigDat::getConfigTag(), EcalLogicID::getID1(), EcalLogicID::getID2(), EcalLogicID::getID3(), EcalLogicID::getName(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), FEConfigMainInfo::getWei2Id(), globals_cff::id1, globals_cff::id2, genParticles_cff::map, 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(), EcalTPGGroups::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, str, AlCaHLTBitMon_QueryRunRegistry::string, digitizers_cfi::strip, dumpRecoGeometry_cfg::tagInfo, and groupFilesInBlocks::tt.