49 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Started getNewObjects";
53 std::cout <<
"got offlineInfo = " << std::endl;
57 std::cout <<
" First object for this tag " << std::endl;
60 unsigned int max_since =0;
62 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"max_since = " << max_since;
63 edm::LogInfo(
"EcalTPGLinConstHandler")<<
"Retrieved last payload ";
66 edm::LogInfo(
"EcalTPGLinConstHandler")<<
"Retrieving run list from ONLINE DB ... " << std::endl;
68 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Making connection..." << std::flush;
70 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Done." << std::endl;
102 if(min_run<max_since) {
103 min_run= max_since+1;
109 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"min_run= " << min_run <<
"max_run = " << max_run;
115 std::vector<RunIOV> run_vec= my_list.
getRuns();
116 size_t num_runs=run_vec.size();
118 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
123 for(
size_t kr=0; kr<run_vec.size(); kr++){
125 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
126 std::cout<<
" **************** "<<std::endl;
127 std::cout<<
" **************** "<<std::endl;
131 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
134 std::string the_config_tag=
"";
135 int the_config_version=0;
137 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
140 for( it=dataset.begin(); it!=dataset.end(); it++ )
154 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
160 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
167 std::cout <<
" before fetch config set" << std::endl;
168 econn-> fetchConfigSet(&fe_main_info);
169 std::cout <<
" after fetch config set" << std::endl;
178 fe_lin_info.
setId(linId);
179 econn-> fetchConfigSet(&fe_lin_info);
180 std::map<EcalLogicID, FEConfigLinDat> dataset_TpgLin;
184 typedef std::map<EcalLogicID, FEConfigLinDat>::const_iterator CIfelin;
189 for (CIfelin
p = dataset_TpgLin.begin();
p != dataset_TpgLin.end();
p++) {
192 std::string ecid_name=ecid_xt.
getName();
195 if (ecid_name==
"EB_crystal_number") {
196 int sm_num=ecid_xt.
getID1();
197 int xt_num=ecid_xt.
getID2();
208 linC->
insert(std::make_pair(ebdetid.rawId(),item));
227 linC->
insert(std::make_pair(eedetid.rawId(),item));
250 std::cout<<
" even if the tag/version is not the same, the linearization constants id is the same -> no transfer needed "<< std::endl;
254 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
255 <<
" version="<<the_config_version<< std::endl;
260 std::cout<<
" **************** "<<std::endl;
264 std::cout<<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed "<< std::endl;
265 std::cout<<
" **************** "<<std::endl;
270 std::cout<<
" the tag/version is the same -> no transfer needed "<< std::endl;
271 std::cout<<
" **************** "<<std::endl;
280 edm::LogInfo(
"EcalTPGLinConstHandler") <<
"Ecal - > end of getNewObjects -----------";
std::vector< RunIOV > getRuns()
void setLocationDef(const LocationDef locDef)
std::string getConfigTag() const
OldContainer m_to_transfer
cond::TagInfo const & tagInfo() const
std::string getName() const
RunList fetchGlobalRunListByLocation(RunTag tag, int min_run, int max_run, const LocationDef locDef)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
void setRunTypeDef(const RunTypeDef runTypeDef)
void insert(std::pair< uint32_t, Item > const &a)
void readFromFile(const char *inputFile)
unsigned int m_i_run_number
void setRunType(std::string runtype)
void setConfigTag(std::string x)
void writeFile(const char *inputFile)
cond::ValidityInterval lastInterval
void setLocation(std::string loc)
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE
EcalCondDBInterface * econn
tuple size
Write out results.
EcalTPGLinearizationConstMap EcalTPGLinearizationConst