56 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Started GetNewObjects!!!";
68 unsigned int max_since = 0;
70 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"max_since : " << max_since;
72 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"retrieved last payload ";
76 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Retrieving run list from ONLINE DB ... ";
78 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"Making connection...";
101 unsigned int min_run;
109 if (min_run < max_since) {
110 min_run = max_since + 1;
116 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
122 std::vector<RunIOV> run_vec = my_list.
getRuns();
123 size_t num_runs = run_vec.size();
127 unsigned int irun = 0;
130 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
131 my_StripEcalLogicId_EE =
134 edm::LogInfo(
" GOT the logic ID for the EE trigger strips ");
136 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
137 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
144 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
148 int the_config_version = 0;
150 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator
it;
164 edm::LogInfo(
" run= ") << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version;
169 edm::LogInfo(
"the tag is different from last transferred run ... retrieving last config set from DB");
185 fe_w_info.
setId(wId);
187 std::map<EcalLogicID, FEConfigWeightDat> dataset_TpgW;
191 typedef std::map<EcalLogicID, FEConfigWeightDat>::const_iterator CIfesli;
195 std::map<std::string, int>
map;
198 for (CIfesli
p = dataset_TpgW.begin();
p != dataset_TpgW.end();
p++) {
200 weightGroup =
p->second.getWeightGroupId();
205 if (ecid_name ==
"EB_VFE") {
215 unsigned int stripEBId = 303176 + (
tt - 1) * 64 + (
strip - 1) * 8 + (tcc - 37) * 8192;
217 weightG->
setValue(stripEBId, weightGroup);
218 }
else if (ecid_name ==
"ECAL_readout_strip") {
222 int id3 = ecid_xt.
getID3();
224 bool set_the_strip =
false;
226 for (
size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
227 if (!set_the_strip) {
228 if (my_StripEcalLogicId_EE[istrip].getID1() ==
id1 &&
229 my_StripEcalLogicId_EE[istrip].getID2() ==
id2 &&
230 my_StripEcalLogicId_EE[istrip].getID3() == id3) {
231 stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
232 set_the_strip =
true;
239 weightG->
setValue(stripEEId, weightGroup);
256 writeFile(
"last_tpg_weightGroup_settings.txt");
263 writeFile(
"last_tpg_weightGroup_settings.txt");
266 " even if the tag/version is not the same, the weight group id is the same -> no transfer needed ");
273 << the_config_tag <<
" version=" << the_config_version;
279 }
else if (
nr == 0) {
281 edm::LogInfo(
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ");
287 edm::LogInfo(
" the tag/version is the same -> no transfer needed ");
289 writeFile(
"last_tpg_weightGroup_settings.txt");
296 edm::LogInfo(
"EcalTPGWeightGroupHandler") <<
"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
EcalCondDBInterface * econn
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void readFromFile(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< EcalTPGWeightGroup *, 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 getConfigTag() const
void setConfigTag(std::string x)
ALPAKA_FN_ACC int sm(int ieta, int iphi)
void setGeneralTag(std::string tag)
void writeFile(const char *inputFile)