Implements popcon::PopConSourceHandler< EcalTPGSpike >.
Definition at line 55 of file EcalTPGSpikeThresholdHandler.cc.
59 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Started GetNewObjects!!!";
64 std::cout <<
"got offlineInfo = " << std::endl;
68 std::cout <<
" First object for this tag " << std::endl;
71 unsigned int max_since = 0;
72 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
73 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"max_since : " << max_since;
74 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"retrieved last payload ";
77 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Retrieving run list from ONLINE DB ... ";
79 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Making connection...";
110 if (min_run < max_since) {
111 min_run = max_since + 1;
118 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
124 std::vector<RunIOV> run_vec = my_list.
getRuns();
125 size_t num_runs = run_vec.size();
127 std::cout <<
"number of runs is : " << num_runs << std::endl;
133 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
134 irun = static_cast<unsigned int>(run_vec[kr].
getRunNumber());
136 std::cout <<
" **************** " << std::endl;
137 std::cout <<
" run= " << irun << std::endl;
140 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
144 int the_config_version = 0;
146 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
160 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
165 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
173 std::cout <<
" before fetch config set" << std::endl;
175 std::cout <<
" after fetch config set" << std::endl;
178 int spikeId = fe_main_info.
getSpiId();
182 fe_spike_info.
setId(spikeId);
184 std::map<EcalLogicID, FEConfigSpikeDat> dataset_TpgSpike;
188 typedef std::map<EcalLogicID, FEConfigSpikeDat>::const_iterator CIfelut;
193 for (CIfelut
p = dataset_TpgSpike.begin();
p != dataset_TpgSpike.end();
p++) {
195 rd_spike =
p->second;
199 if (ecid_name ==
"EB_trigger_tower") {
201 int smid = ecid_xt.
getID1();
203 int towerid = ecid_xt.
getID2();
205 int tow_eta = (towerid - 1) / 4;
206 int tow_phi = ((towerid - 1) - tow_eta * 4);
208 int axt = (tow_eta * 5) * 20 + tow_phi * 5 + 1;
221 std::cout <<
" The number of towers is = " << itowers << std::endl;
232 writeFile(
"last_tpg_spikeThreshold_settings.txt");
239 writeFile(
"last_tpg_spikeThreshold_settings.txt");
241 std::cout <<
" even if the tag/version is not the same, the lutGroup id is the same -> no transfer needed "
248 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
253 std::cout <<
" **************** " << std::endl;
255 }
else if (
nr == 0) {
257 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
258 std::cout <<
" **************** " << std::endl;
263 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
264 std::cout <<
" **************** " << std::endl;
265 writeFile(
"last_tpg_spikeThreshold_settings.txt");
272 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"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::getName(), DeadROCCounter::getRunNumber(), RunList::getRuns(), FEConfigMainInfo::getSpiId(), FEConfigSpikeDat::getSpikeThreshold(), RunTPGConfigDat::getVersion(), triggerObjects_cff::id, test_db_connect::my_locdef, test_db_connect::my_rundef, EgHLTOffHistBins_cfi::nr, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), l1tpf_impl::readFromFile(), IODConfig::setConfigTag(), RunTag::setGeneralTag(), FEConfigSpikeInfo::setId(), RunTag::setLocationDef(), RunTag::setRunTypeDef(), EcalTPGSpike::setValue(), FEConfigMainInfo::setVersion(), findQualityFiles::size, EBDetId::SMCRYSTALMODE, str, AlCaHLTBitMon_QueryRunRegistry::string, and dumpRecoGeometry_cfg::tagInfo.