Implements popcon::PopConSourceHandler< EcalTPGWeightGroup >.
Definition at line 50 of file EcalTPGWeightGroupHandler.cc.
56 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Started GetNewObjects!!!";
68 unsigned int max_since = 0;
69 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
70 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"max_since : " << max_since;
72 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"retrieved last payload ";
76 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Retrieving run list from ONLINE DB ... ";
78 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Making connection...";
109 if (min_run < max_since) {
110 min_run = max_since + 1;
116 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
122 std::vector<RunIOV> run_vec = my_list.
getRuns();
123 size_t num_runs = run_vec.size();
127 unsigned int irun = 0;
130 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
131 my_StripEcalLogicId_EE =
134 edm::LogInfo(
" GOT the logic ID for the EE trigger strips ");
136 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
137 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
144 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
148 int the_config_version = 0;
150 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
164 edm::LogInfo(
" run= ") << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version;
169 edm::LogInfo(
"the tag is different from last transferred run ... retrieving last config set from DB");
185 fe_w_info.
setId(wId);
187 std::map<EcalLogicID, FEConfigWeightDat> dataset_TpgW;
191 typedef std::map<EcalLogicID, FEConfigWeightDat>::const_iterator CIfesli;
196 std::map<std::string, int>
map;
199 for (CIfesli
p = dataset_TpgW.begin();
p != dataset_TpgW.end();
p++) {
201 weightGroup =
p->second.getWeightGroupId();
206 if (ecid_name ==
"EB_VFE") {
207 int sm = ecid_xt.
getID1();
216 unsigned int stripEBId = 303176 + (
tt - 1) * 64 + (
strip - 1) * 8 + (tcc - 37) * 8192;
218 weightG->
setValue(stripEBId, weightGroup);
220 }
else if (ecid_name ==
"ECAL_readout_strip") {
224 int id3 = ecid_xt.
getID3();
226 bool set_the_strip =
false;
228 for (
size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
229 if (!set_the_strip) {
230 if (my_StripEcalLogicId_EE[istrip].getID1() ==
id1 &&
231 my_StripEcalLogicId_EE[istrip].getID2() ==
id2 &&
232 my_StripEcalLogicId_EE[istrip].getID3() == id3) {
233 stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
234 set_the_strip =
true;
241 weightG->
setValue(stripEEId, weightGroup);
260 writeFile(
"last_tpg_weightGroup_settings.txt");
267 writeFile(
"last_tpg_weightGroup_settings.txt");
270 " even if the tag/version is not the same, the weight group id is the same -> no transfer needed ");
277 << the_config_tag <<
" version=" << the_config_version;
283 }
else if (
nr == 0) {
285 edm::LogInfo(
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ");
291 edm::LogInfo(
" the tag/version is the same -> no transfer needed ");
293 writeFile(
"last_tpg_weightGroup_settings.txt");
300 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Ecal - > end of getNewObjects -----------";
References 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::getWeiId(), 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(), FEConfigWeightInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGGroups::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, str, AlCaHLTBitMon_QueryRunRegistry::string, digitizers_cfi::strip, dumpRecoGeometry_cfg::tagInfo, and groupFilesInBlocks::tt.