43 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Started GetNewObjects!!!";
45 unsigned int max_since = 0;
47 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"max_since : " << max_since;
48 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"retrieved last payload ";
51 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Retrieving run list from ONLINE DB ... ";
53 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Making connection...";
82 if (min_run < max_since) {
83 min_run = max_since + 1;
90 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
96 std::vector<RunIOV> run_vec = my_list.
getRuns();
97 size_t num_runs = run_vec.size();
99 std::cout <<
"number of runs is : " << num_runs << std::endl;
103 unsigned int irun = 0;
107 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
115 "EE_offline_stripid",
118 std::cout <<
" GOT the logic ID for the EE trigger strips " << std::endl;
120 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
121 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
123 std::cout <<
" **************** " << std::endl;
124 std::cout <<
" **************** " << std::endl;
125 std::cout <<
" run= " << irun << std::endl;
128 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
132 int the_config_version = 0;
134 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator
it;
148 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
153 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
154 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB" 165 int badstripId = fe_main_info.
getBstId();
169 fe_badStrip_info.
setId(badstripId);
173 std::vector<FEConfigBadStripDat> dataset_TpgBadStrip;
178 typedef std::vector<FEConfigBadStripDat>::const_iterator CIfeped;
184 for (CIfeped
p = dataset_TpgBadStrip.begin();
p != dataset_TpgBadStrip.end();
p++) {
188 int tcc_num = rd_badStrip.
getTCCId();
189 int tt_num = rd_badStrip.
getTTId();
197 bool set_the_strip =
false;
198 for (
size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
199 if (!set_the_strip) {
200 if (my_StripEcalLogicId_EE[istrip].getID1() == tcc_num &&
201 my_StripEcalLogicId_EE[istrip].getID2() == tt_num &&
202 my_StripEcalLogicId_EE[istrip].getID3() == strip_num) {
203 stripid = my_StripEcalLogicId_EE[istrip].getLogicID();
205 set_the_strip =
true;
216 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Finished badStrip reading.";
227 writeFile(
"last_tpg_badStrip_settings.txt");
234 writeFile(
"last_tpg_badStrip_settings.txt");
242 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
248 }
else if (
nr == 0) {
256 writeFile(
"last_tpg_badStrip_settings.txt");
263 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"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)
unsigned int m_i_run_number
void writeFile(const char *inputFile)
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
cond::TagInfo_t const & tagInfo() const
EcalCondDBInterface * econn
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID) noexcept(false)
std::vector< std::pair< EcalTPGStripStatus *, Time_t > > m_to_transfer
void setLocationDef(const LocationDef &locDef)
Log< level::Info, false > LogInfo
void readFromFile(const char *inputFile)
std::string getConfigTag() const
void setConfigTag(std::string x)
void fetchConfigDataSet(std::vector< DATT > *fillMap, ICONF *iconf) noexcept(false)
void setGeneralTag(std::string tag)
void setValue(const uint32_t &id, const uint16_t &val)