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;
196 std::map<std::string, int>
map;
199 for (CIfesli
p = dataset_TpgW.begin();
p != dataset_TpgW.end();
p++) {
201 weightGroup =
p->second.getWeightGroupId();
206 if (ecid_name ==
"EB_VFE") {
207 int sm = ecid_xt.
getID1();
216 unsigned int stripEBId = 303176 + (
tt - 1) * 64 + (
strip - 1) * 8 + (tcc - 37) * 8192;
218 weightG->
setValue(stripEBId, weightGroup);
220 }
else if (ecid_name ==
"ECAL_readout_strip") {
224 int id3 = ecid_xt.
getID3();
226 bool set_the_strip =
false;
228 for (
size_t istrip = 0; istrip < my_StripEcalLogicId_EE.size(); istrip++) {
229 if (!set_the_strip) {
230 if (my_StripEcalLogicId_EE[istrip].getID1() ==
id1 &&
231 my_StripEcalLogicId_EE[istrip].getID2() ==
id2 &&
232 my_StripEcalLogicId_EE[istrip].getID3() == id3) {
233 stripEEId = my_StripEcalLogicId_EE[istrip].getLogicID();
234 set_the_strip =
true;
241 weightG->
setValue(stripEEId, weightGroup);
260 writeFile(
"last_tpg_weightGroup_settings.txt");
267 writeFile(
"last_tpg_weightGroup_settings.txt");
270 " even if the tag/version is not the same, the weight group id is the same -> no transfer needed ");
277 << the_config_tag <<
" version=" << the_config_version;
283 }
else if (
nr == 0) {
285 edm::LogInfo(
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ");
291 edm::LogInfo(
" the tag/version is the same -> no transfer needed ");
293 writeFile(
"last_tpg_weightGroup_settings.txt");
300 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)
void setGeneralTag(std::string tag)
void writeFile(const char *inputFile)