Implements popcon::PopConSourceHandler< EcalTPGFineGrainTowerEE >.
Definition at line 31 of file EcalTPGFineGrainTowerEEHandler.cc.
32 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Started GetNewObjects!!!";
37 std::cout <<
"got offlineInfo = " << std::endl;
41 std::cout <<
" First object for this tag " << std::endl;
44 unsigned int max_since = 0;
45 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
46 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"max_since : " << max_since;
49 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"retrieved last payload ";
52 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Retrieving run list from ONLINE DB ... ";
54 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Making connection...";
56 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Done.";
84 if (min_run < max_since) {
85 min_run = max_since + 1;
92 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
98 std::vector<RunIOV> run_vec = my_list.
getRuns();
99 size_t num_runs = run_vec.size();
101 std::cout <<
"number of runs is : " << num_runs << std::endl;
106 std::vector<EcalLogicID> my_TTEcalLogicId_EE;
109 std::cout <<
" GOT the logic ID for the EE trigger towers " << std::endl;
111 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
112 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
114 std::cout <<
" **************** " << std::endl;
115 std::cout <<
" **************** " << std::endl;
116 std::cout <<
" run= " << irun << std::endl;
119 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
123 int the_config_version = 0;
125 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
138 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
143 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
151 std::cout <<
" before fetch config set" << std::endl;
153 std::cout <<
" after fetch config set" << std::endl;
156 int fgrId = fe_main_info.
getFgrId();
160 fe_fgr_info.
setId(fgrId);
162 std::map<EcalLogicID, FEConfigFgrEETowerDat> dataset_TpgFineGrainEE;
166 typedef std::map<EcalLogicID, FEConfigFgrEETowerDat>::const_iterator CIfefgr;
171 for (CIfefgr
p = dataset_TpgFineGrainEE.begin();
p != dataset_TpgFineGrainEE.end();
p++) {
177 if (ecid_name ==
"EE_trigger_tower") {
178 int tccid = ecid_xt.
getID1();
180 int towerid = ecid_xt.
getID2();
182 bool set_the_tower =
false;
184 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
185 if (!set_the_tower) {
186 if (my_TTEcalLogicId_EE[itower].getID1() == tccid &&
187 my_TTEcalLogicId_EE[itower].getID2() == towerid) {
188 towid = my_TTEcalLogicId_EE[itower].getLogicID();
189 set_the_tower =
true;
199 std::cout <<
" these may be the additional towers TCC/TT " << tccid <<
"/" << towerid << std::endl;
215 writeFile(
"last_tpg_fgrTTEE_settings.txt");
222 writeFile(
"last_tpg_fgrTTEE_settings.txt");
224 std::cout <<
" even if the tag/version is not the same, the fgrTTEE id is the same -> no transfer needed "
229 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
234 std::cout <<
" **************** " << std::endl;
236 }
else if (
nr == 0) {
238 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
239 std::cout <<
" **************** " << std::endl;
244 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
245 std::cout <<
" **************** " << std::endl;
246 writeFile(
"last_tpg_fgrTTEE_settings.txt");
252 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Ecal - > end of getNewObjects -----------";
References gather_cfg::cout, writedatasetfile::dataset, MillePedeFileConverter_cfg::e, test_db_connect::econn, cppFunctionSkipper::exception, Exception, RunTPGConfigDat::getConfigTag(), FEConfigMainInfo::getFgrId(), EcalLogicID::getID1(), EcalLogicID::getID2(), FEConfigFgrEETowerDat::getLUTValue(), EcalLogicID::getName(), DeadROCCounter::getRunNumber(), RunList::getRuns(), RunTPGConfigDat::getVersion(), test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, EcalLogicID::NULLID, AlCaHLTBitMon_ParallelJobs::p, l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigFgrInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGFineGrainTowerEE::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and dumpRecoGeometry_cfg::tagInfo.