48 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Started GetNewObjects!!!";
60 unsigned int max_since = 0;
62 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"max_since : " << max_since;
65 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"retrieved last payload ";
68 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
70 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Making connection...";
101 if (min_run < max_since) {
102 min_run = max_since + 1;
108 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
114 std::vector<RunIOV> run_vec = my_list.
getRuns();
115 size_t num_runs = run_vec.size();
116 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"number of Mon runs is : " << num_runs;
120 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
121 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
126 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
130 int the_config_version = 0;
132 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
145 edm::LogInfo(
" run= ") << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version;
150 edm::LogInfo(
"the tag is different from last transferred run ... retrieving last config set from DB");
160 int weightId = fe_main_info.
getWeiId();
164 fe_weight_info.
setId(weightId);
166 std::map<EcalLogicID, FEConfigWeightGroupDat> dataset_TpgWeight;
168 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"Got object!";
170 typedef std::map<EcalLogicID, FEConfigWeightGroupDat>::const_iterator CIfeweight;
175 for (CIfeweight
p = dataset_TpgWeight.begin();
p != dataset_TpgWeight.end();
p++) {
179 unsigned int weight0 =
static_cast<unsigned int>(rd_w.
getWeight4());
180 unsigned int weight1 =
static_cast<unsigned int>(rd_w.
getWeight3());
181 unsigned int weight2 =
static_cast<unsigned int>(rd_w.
getWeight2());
182 unsigned int weight3 =
static_cast<unsigned int>(rd_w.
getWeight1() - 0x80);
183 unsigned int weight4 =
static_cast<unsigned int>(rd_w.
getWeight0());
185 w.setValues(weight0, weight1, weight2, weight3, weight4);
191 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"found " << igroups <<
"Weight groups";
201 writeFile(
"last_tpg_weightIdMap_settings.txt");
208 writeFile(
"last_tpg_weightIdMap_settings.txt");
211 " even if the tag/version is not the same, the weightIdMap id is the same -> no transfer needed ");
216 << the_config_tag <<
" version=" << the_config_version;
221 }
else if (
nr == 0) {
223 edm::LogInfo(
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor, no transfer needed ");
228 edm::LogInfo(
" the tag/version is the same, no transfer needed ");
229 writeFile(
"last_tpg_weightIdMap_settings.txt");
236 edm::LogInfo(
"EcalTPGWeightIdMapHandler") <<
"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)
void readFromFile(const char *inputFile)
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
std::vector< std::pair< EcalTPGWeightIdMap *, Time_t > > m_to_transfer
void setLocationDef(const LocationDef &locDef)
EcalCondDBInterface * econn
Log< level::Info, false > LogInfo
void setValue(const uint32_t &id, const EcalTPGWeights &value)
unsigned int m_i_run_number
std::string getConfigTag() const
std::unique_ptr< EcalTPGWeightIdMap > Ref
void setConfigTag(std::string x)
void setGeneralTag(std::string tag)
int getWeightGroupId() const