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;
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...";
102 unsigned int min_run;
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 -----------";
void setRunTypeDef(const RunTypeDef &runTypeDef)
std::vector< RunIOV > getRuns()
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
std::string getName() const
void readFromFile(const char *inputFile)
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setValue(const uint32_t &id, const uint16_t &val)
cond::TagInfo_t const & tagInfo() const
std::vector< std::pair< EcalTPGSpike *, Time_t > > m_to_transfer
int getSpikeThreshold() const
EcalCondDBInterface * econn
void setLocationDef(const LocationDef &locDef)
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
void writeFile(const char *inputFile)
std::string getConfigTag() const
unsigned int m_i_run_number
void setConfigTag(std::string x)
std::string id() const override
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE