48 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"Started GetNewObjects!!!";
58 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
" First object for this tag ";
61 unsigned int max_since = 0;
63 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"max_since : " << max_since;
65 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"retrieved last payload ";
68 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
101 if (min_run < max_since) {
102 min_run = max_since + 1;
108 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
113 std::vector<RunIOV> run_vec = my_list.
getRuns();
114 size_t num_runs = run_vec.size();
115 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"number of Mon runs is : " << num_runs;
119 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
120 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
127 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
131 int the_config_version = 0;
133 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
146 <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version;
152 <<
"the tag is different from last transferred run ... retrieving last config set from DB";
159 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
" before fetch config set";
161 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
" after fetch config set";
168 fe_odd_weight_info.
setId(weightId);
170 std::map<EcalLogicID, FEConfigOddWeightGroupDat> dataset_TpgWeight;
174 typedef std::map<EcalLogicID, FEConfigOddWeightGroupDat>::const_iterator CIfeweight;
179 for (CIfeweight
p = dataset_TpgWeight.begin();
p != dataset_TpgWeight.end();
p++) {
183 unsigned int weight0 =
static_cast<unsigned int>(rd_w.
getWeight4());
184 unsigned int weight1 =
static_cast<unsigned int>(rd_w.
getWeight3());
185 unsigned int weight2 =
static_cast<unsigned int>(rd_w.
getWeight2());
186 unsigned int weight3 =
static_cast<unsigned int>(rd_w.
getWeight1() - 0x80);
187 unsigned int weight4 =
static_cast<unsigned int>(rd_w.
getWeight0());
189 w.setValues(weight0, weight1, weight2, weight3, weight4);
195 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"found " << igroups <<
"Weight groups";
205 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
212 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
215 <<
" even if the tag/version is not the same, the weightIdMap id is the same -> no transfer needed ";
219 throw cms::Exception(
"FileReadError") <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag
220 <<
" version=" << the_config_version <<
"\n" 225 }
else if (
nr == 0) {
228 <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed ";
234 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
" the tag/version is the same -> no transfer needed ";
236 writeFile(
"last_tpg_OddweightIdMap_settings.txt");
242 edm::LogVerbatim(
"EcalTPGOddWeightIdMapHandler") <<
"Ecal - > end of getNewObjects -----------";
Log< level::Info, true > LogVerbatim
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)
EcalCondDBInterface * econn
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
cond::TagInfo_t const & tagInfo() const
unsigned int m_i_run_number
std::vector< std::pair< EcalTPGOddWeightIdMap *, Time_t > > m_to_transfer
void setLocationDef(const LocationDef &locDef)
void setValue(const uint32_t &id, const EcalTPGWeights &value)
void writeFile(const char *inputFile)
std::string getConfigTag() const
void setConfigTag(std::string x)
void setGeneralTag(std::string tag)
int getWeightGroupId() const