40 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Started GetNewObjects!!!";
45 std::cout <<
"got offlineInfo = " << std::endl;
49 std::cout <<
" First object for this tag " << std::endl;
52 unsigned int max_since = 0;
54 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"max_since : " << max_since;
57 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"retrieved last payload ";
59 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"WOW: we just retrieved the last valid record from DB ";
63 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
65 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Making connection...";
67 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Done.";
95 if (min_run < max_since) {
96 min_run = max_since + 1;
103 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
108 printf(
"after fetchRunList\n");
111 std::vector<RunIOV> run_vec = my_list.
getRuns();
112 size_t num_runs = run_vec.size();
114 std::cout <<
"number of runs is : " << num_runs << std::endl;
118 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
119 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
121 std::cout <<
" **************** " << std::endl;
122 std::cout <<
" **************** " << std::endl;
123 std::cout <<
" run= " << irun << std::endl;
126 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
130 int the_config_version = 0;
132 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
145 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
150 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB" 158 std::cout <<
" before fetch config set" << std::endl;
160 std::cout <<
" after fetch config set" << std::endl;
163 int fgrId = fe_main_info.
getFgrId();
166 fe_fgr_info.
setId(fgrId);
168 std::map<EcalLogicID, FEConfigFgrGroupDat> dataset_TpgFineGrainEB;
170 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Got object!";
172 typedef std::map<EcalLogicID, FEConfigFgrGroupDat>::const_iterator CIfefgr;
177 for (CIfefgr
p = dataset_TpgFineGrainEB.begin();
p != dataset_TpgFineGrainEB.end();
p++) {
190 f.setValues(RatioL, RatioH, ThrL, ThrH, LutConfId);
203 writeFile(
"last_tpg_fgrIdMap_settings.txt");
210 writeFile(
"last_tpg_fgrIdMap_settings.txt");
212 std::cout <<
" even if the tag/version is not the same, the fgrIdMap is the same -> no transfer needed " 219 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
224 std::cout <<
" **************** " << std::endl;
226 }
else if (
nr == 0) {
228 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
229 std::cout <<
" **************** " << std::endl;
234 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
235 std::cout <<
" **************** " << std::endl;
236 writeFile(
"last_tpg_fgrIdMap_settings.txt");
242 edm::LogInfo(
"EcalTPGFineGrainEBIdMapHandler") <<
"Ecal - > end of getNewObjects -----------";
void setRunTypeDef(const RunTypeDef &runTypeDef)
void setValue(const uint32_t &id, const EcalTPGFineGrainConstEB &value)
std::vector< RunIOV > getRuns()
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
std::string getName() const
int getFgrGroupId() const
float getRatioHigh() const
unsigned int m_i_run_number
void fetchConfigSet(ICONF *iconf) noexcept(false)
void writeFile(const char *inputFile)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
cond::TagInfo_t const & tagInfo() const
void readFromFile(const char *inputFile)
float getRatioLow() const
float getThreshHigh() const
std::vector< std::pair< EcalTPGFineGrainEBIdMap *, Time_t > > m_to_transfer
void setLocationDef(const LocationDef &locDef)
Log< level::Info, false > LogInfo
std::string getConfigTag() const
std::unique_ptr< EcalTPGFineGrainEBIdMap > Ref
void setConfigTag(std::string x)
float getThreshLow() const
void setGeneralTag(std::string tag)
EcalCondDBInterface * econn