41 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"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(
"EcalTPGLinConstHandler") <<
"max_since = " << max_since;
55 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Retrieved last payload ";
58 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Retrieving run list from ONLINE DB ... " << std::endl;
60 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Making connection..." << std::flush;
62 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Done." << std::endl;
91 if (min_run < max_since) {
92 min_run = max_since + 1;
99 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"min_run= " << min_run <<
"max_run = " << max_run;
105 std::vector<RunIOV> run_vec = my_list.
getRuns();
106 size_t num_runs = run_vec.size();
108 std::cout <<
"number of runs is : " << num_runs << std::endl;
110 unsigned int irun = 0;
112 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
113 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
114 std::cout <<
" **************** " << std::endl;
115 std::cout <<
" **************** " << std::endl;
116 std::cout <<
" run= " << irun << std::endl;
119 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
123 int the_config_version = 0;
125 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
139 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
144 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB" 152 std::cout <<
" before fetch config set" << std::endl;
154 std::cout <<
" after fetch config set" << std::endl;
157 int linId = fe_main_info.
getLinId();
161 fe_lin_info.
setId(linId);
163 std::map<EcalLogicID, FEConfigLinDat> dataset_TpgLin;
167 typedef std::map<EcalLogicID, FEConfigLinDat>::const_iterator CIfelin;
172 for (CIfelin
p = dataset_TpgLin.begin();
p != dataset_TpgLin.end();
p++) {
178 if (ecid_name ==
"EB_crystal_number") {
179 int sm_num = ecid_xt.
getID1();
180 int xt_num = ecid_xt.
getID2();
191 linC->
insert(std::make_pair(ebdetid.rawId(),
item));
209 linC->
insert(std::make_pair(eedetid.rawId(),
item));
231 std::cout <<
" even if the tag/version is not the same, the linearization constants id is the same -> no " 236 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
241 std::cout <<
" **************** " << std::endl;
243 }
else if (
nr == 0) {
245 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
246 std::cout <<
" **************** " << std::endl;
251 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
252 std::cout <<
" **************** " << std::endl;
260 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"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
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< EcalTPGLinearizationConst *, Time_t > > m_to_transfer
void setLocationDef(const LocationDef &locDef)
void insert(std::pair< uint32_t, Item > const &a)
Log< level::Info, false > LogInfo
void readFromFile(const char *inputFile)
unsigned int m_i_run_number
std::string getConfigTag() const
void setConfigTag(std::string x)
void writeFile(const char *inputFile)
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE
EcalCondDBInterface * econn
EcalTPGLinearizationConstMap EcalTPGLinearizationConst