Implements popcon::PopConSourceHandler< EcalTPGLutGroup >.
Definition at line 55 of file EcalTPGLutGroupHandler.cc.
59 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Started GetNewObjects!!!";
84 std::cout <<
"got offlineInfo = " << std::endl;
88 std::cout <<
" First object for this tag " << std::endl;
91 unsigned int max_since = 0;
92 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
93 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"max_since : " << max_since;
94 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"retrieved last payload ";
97 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Retrieving run list from ONLINE DB ... ";
99 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Making connection...";
130 if (min_run < max_since) {
131 min_run = max_since + 1;
138 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
144 std::vector<RunIOV> run_vec = my_list.
getRuns();
145 size_t num_runs = run_vec.size();
147 std::cout <<
"number of runs is : " << num_runs << std::endl;
154 std::vector<EcalLogicID> my_TTEcalLogicId_EE;
157 std::cout <<
" GOT the logic ID for the EE trigger towers " << std::endl;
159 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
160 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
162 std::cout <<
" **************** " << std::endl;
163 std::cout <<
" run= " << irun << std::endl;
166 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
170 int the_config_version = 0;
172 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
186 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
191 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
199 std::cout <<
" before fetch config set" << std::endl;
201 std::cout <<
" after fetch config set" << std::endl;
204 int lutId = fe_main_info.
getLUTId();
208 fe_lut_info.
setId(lutId);
210 std::map<EcalLogicID, FEConfigLUTDat> dataset_TpgLut;
214 typedef std::map<EcalLogicID, FEConfigLUTDat>::const_iterator CIfelut;
219 for (CIfelut
p = dataset_TpgLut.begin();
p != dataset_TpgLut.end();
p++) {
225 if (ecid_name ==
"EB_trigger_tower") {
227 int smid = ecid_xt.
getID1();
229 int towerid = ecid_xt.
getID2();
231 int tow_eta = (towerid - 1) / 4;
232 int tow_phi = ((towerid - 1) - tow_eta * 4);
234 int axt = (tow_eta * 5) * 20 + tow_phi * 5 + 1;
251 }
else if (ecid_name ==
"EE_trigger_tower") {
254 int tccid = ecid_xt.
getID1();
256 int towerid = ecid_xt.
getID2();
258 bool set_the_tower =
false;
260 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
261 if (!set_the_tower) {
262 if (my_TTEcalLogicId_EE[itower].getID1() == tccid &&
263 my_TTEcalLogicId_EE[itower].getID2() == towerid) {
264 towid = my_TTEcalLogicId_EE[itower].getLogicID();
265 set_the_tower =
true;
274 std::cout <<
" these may be the additional towers TCC/TT " << tccid <<
"/" << towerid << std::endl;
290 writeFile(
"last_tpg_lutGroup_settings.txt");
297 writeFile(
"last_tpg_lutGroup_settings.txt");
299 std::cout <<
" even if the tag/version is not the same, the lutGroup id is the same -> no transfer needed "
306 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
311 std::cout <<
" **************** " << std::endl;
313 }
else if (
nr == 0) {
315 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
316 std::cout <<
" **************** " << std::endl;
321 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
322 std::cout <<
" **************** " << std::endl;
323 writeFile(
"last_tpg_lutGroup_settings.txt");
330 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"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(), FEConfigLUTDat::getLUTGroupId(), FEConfigMainInfo::getLUTId(), EcalLogicID::getName(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), triggerObjects_cff::id, test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, EcalLogicID::NULLID, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigLUTInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGGroups::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, EBDetId::SMCRYSTALMODE, str, AlCaHLTBitMon_QueryRunRegistry::string, and dumpRecoGeometry_cfg::tagInfo.