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;
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...";
122 unsigned int min_run;
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;
218 for (CIfelut
p = dataset_TpgLut.begin();
p != dataset_TpgLut.end();
p++) {
224 if (ecid_name ==
"EB_trigger_tower") {
226 int smid = ecid_xt.
getID1();
228 int towerid = ecid_xt.
getID2();
230 int tow_eta = (towerid - 1) / 4;
231 int tow_phi = ((towerid - 1) - tow_eta * 4);
233 int axt = (tow_eta * 5) * 20 + tow_phi * 5 + 1;
249 }
else if (ecid_name ==
"EE_trigger_tower") {
252 int tccid = ecid_xt.
getID1();
254 int towerid = ecid_xt.
getID2();
256 bool set_the_tower =
false;
258 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
259 if (!set_the_tower) {
260 if (my_TTEcalLogicId_EE[itower].getID1() == tccid &&
261 my_TTEcalLogicId_EE[itower].getID2() == towerid) {
262 towid = my_TTEcalLogicId_EE[itower].getLogicID();
263 set_the_tower =
true;
272 std::cout <<
" these may be the additional towers TCC/TT " << tccid <<
"/" << towerid << std::endl;
286 writeFile(
"last_tpg_lutGroup_settings.txt");
293 writeFile(
"last_tpg_lutGroup_settings.txt");
295 std::cout <<
" even if the tag/version is not the same, the lutGroup id is the same -> no transfer needed " 302 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
307 std::cout <<
" **************** " << std::endl;
309 }
else if (
nr == 0) {
311 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
312 std::cout <<
" **************** " << std::endl;
317 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
318 std::cout <<
" **************** " << std::endl;
319 writeFile(
"last_tpg_lutGroup_settings.txt");
326 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Ecal - > end of getNewObjects -----------";
void setRunTypeDef(const RunTypeDef &runTypeDef)
std::vector< RunIOV > getRuns()
int getLUTGroupId() const
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
void readFromFile(const char *inputFile)
std::string getName() const
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void writeFile(const char *inputFile)
cond::TagInfo_t const & tagInfo() const
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< EcalTPGLutGroup *, Time_t > > m_to_transfer
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
unsigned int m_i_run_number
void setLocationDef(const LocationDef &locDef)
Log< level::Info, false > LogInfo
std::string id() const override
constexpr uint32_t rawId() const
get the raw id
std::string getConfigTag() const
void setConfigTag(std::string x)
EcalCondDBInterface * econn
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE