42 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"Started getNewObjects";
47 std::cout <<
"got offlineInfo = " << std::endl;
51 std::cout <<
" First object for this tag " << std::endl;
54 unsigned int max_since = 0;
56 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"max_since = " << max_since;
57 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"Retrieved last payload ";
60 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"Retrieving run list from ONLINE DB ... " << std::endl;
62 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"Making connection..." << std::flush;
64 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"Done." << std::endl;
91 if (min_run < max_since) {
92 min_run = max_since + 1;
99 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"min_run= " << min_run <<
" max_run = " << max_run;
104 std::vector<RunIOV> run_vec = my_list.
getRuns();
105 size_t num_runs = run_vec.size();
107 std::cout <<
"number of runs is : " << num_runs << std::endl;
109 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());
115 std::cout <<
" **************** " << std::endl;
116 std::cout <<
" **************** " << std::endl;
117 std::cout <<
" run= " << irun << std::endl;
120 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
124 int the_config_version = 0;
126 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
140 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
145 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB" 153 std::cout <<
" before fetch config set" << std::endl;
155 std::cout <<
" after fetch config set" << std::endl;
158 int pedId = fe_main_info.
getPedId();
162 fe_ped_info.
setId(pedId);
164 std::map<EcalLogicID, FEConfigPedDat> dataset_TpgPed;
169 typedef std::map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
173 for (CIfeped
p = dataset_TpgPed.begin();
p != dataset_TpgPed.end();
p++) {
180 if (ecid_name ==
"EB_crystal_number") {
183 <<
" icells = " << icells << std::endl;
184 int sm_num = ecid_xt.
getID1();
185 int xt_num = ecid_xt.
getID2();
193 peds->
insert(std::make_pair(ebdetid.rawId(),
item));
195 }
else if (ecid_name ==
"EE_crystal_number") {
206 peds->
insert(std::make_pair(eedetid.rawId(),
item));
228 std::cout <<
" even if the tag/version is not the same, the pedestals id is the same -> no transfer needed " 235 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
240 std::cout <<
" **************** " << std::endl;
242 }
else if (
nr == 0) {
244 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
245 std::cout <<
" **************** " << std::endl;
250 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
251 std::cout <<
" **************** " << std::endl;
259 edm::LogInfo(
"EcalTPGPedestalsHandler") <<
"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)
float getPedMeanG6() const
std::string getName() const
EcalCondDBInterface * econn
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
float getPedMeanG1() const
cond::TagInfo_t const & tagInfo() const
void writeFile(const char *inputFile)
unsigned int m_i_run_number
std::vector< std::pair< EcalTPGPedestals *, 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)
std::string getConfigTag() const
void setConfigTag(std::string x)
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE
EcalTPGPedestalsMap EcalTPGPedestals
float getPedMeanG12() const