50 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"Started GetNewObjects!!!";
55 std::cout <<
"got offlineInfo = " << std::endl;
59 std::cout <<
" First object for this tag " << std::endl;
62 unsigned int max_since=0;
64 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"max_since : " << max_since;
65 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"retrieved last payload ";
68 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"Retrieving run list from ONLINE DB ... ";
70 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"Making connection...";
105 if(min_run<max_since) {
113 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
119 std::vector<RunIOV> run_vec= my_list.
getRuns();
120 size_t num_runs=run_vec.size();
122 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
127 for(
size_t kr=0; kr<run_vec.size(); kr++){
129 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
131 std::cout<<
" **************** "<<std::endl;
132 std::cout<<
" **************** "<<std::endl;
136 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
139 std::string the_config_tag=
"";
140 int the_config_version=0;
142 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
145 for( it=dataset.begin(); it!=dataset.end(); it++ )
158 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
164 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
171 std::cout <<
" before fetch config set" << std::endl;
172 econn-> fetchConfigSet(&fe_main_info);
173 std::cout <<
" after fetch config set" << std::endl;
182 fe_lut_info.
setId(lutId);
183 econn-> fetchConfigSet(&fe_lut_info);
184 std::map<EcalLogicID, FEConfigLUTGroupDat> dataset_TpgLut;
187 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"Got object!";
191 typedef std::map<EcalLogicID, FEConfigLUTGroupDat>::const_iterator CIfelut;
196 for (CIfelut
p = dataset_TpgLut.begin();
p != dataset_TpgLut.end();
p++)
203 unsigned int lutArray[1024] ;
204 for (
int ilut=0;ilut<1024;++ilut) {
224 writeFile(
"last_tpg_lutIdMap_settings.txt");
232 writeFile(
"last_tpg_lutIdMap_settings.txt");
234 std::cout<<
" even if the tag/version is not the same, the lutIdMap id is the same -> no transfer needed "<< std::endl;
241 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
242 <<
" version="<<the_config_version<< std::endl;
247 std::cout<<
" **************** "<<std::endl;
251 std::cout<<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed "<< std::endl;
252 std::cout<<
" **************** "<<std::endl;
257 std::cout<<
" the tag/version is the same -> no transfer needed "<< std::endl;
258 std::cout<<
" **************** "<<std::endl;
259 writeFile(
"last_tpg_lutIdMap_settings.txt");
267 edm::LogInfo(
"EcalTPGLutIdMapHandler") <<
"Ecal - > end of getNewObjects -----------";
std::vector< RunIOV > getRuns()
void setLocationDef(const LocationDef locDef)
std::string getConfigTag() const
int getLUTGroupId() const
void writeFile(const char *inputFile)
EcalCondDBInterface * econn
void setLut(const unsigned int *lut)
OldContainer m_to_transfer
cond::TagInfo const & tagInfo() const
RunList fetchGlobalRunListByLocation(RunTag tag, int min_run, int max_run, const LocationDef locDef)
unsigned int m_i_run_number
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
void setRunTypeDef(const RunTypeDef runTypeDef)
int getLUTValue(int i) const
void setValue(const uint32_t &id, const EcalTPGLut &value)
void setRunType(std::string runtype)
void readFromFile(const char *inputFile)
void setConfigTag(std::string x)
cond::ValidityInterval lastInterval
void setLocation(std::string loc)
void setGeneralTag(std::string tag)
tuple size
Write out results.