50 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Started GetNewObjects!!!";
52 unsigned int max_since=0;
54 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"max_since : " << max_since;
55 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"retrieved last payload ";
58 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Retrieving run list from ONLINE DB ... ";
60 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Making connection...";
91 if(min_run<max_since) {
98 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"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;
117 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
122 "EE_offline_stripid",123 );
124 std::cout <<
" GOT the logic ID for the EE trigger strips "<< 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;
140 int the_config_version=0;
142 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
145 for( it=dataset.begin(); it!=dataset.end(); it++ )
157 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
162 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
163 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
171 econn-> fetchConfigSet(&fe_main_info);
174 int badstripId=fe_main_info.
getBstId();
179 fe_badStrip_info.
setId(badstripId);
181 econn-> fetchConfigSet(&fe_badStrip_info);
183 std::vector< FEConfigBadStripDat > dataset_TpgBadStrip;
188 typedef std::vector<FEConfigBadStripDat>::const_iterator CIfeped;
197 for (CIfeped
p = dataset_TpgBadStrip.begin();
p != dataset_TpgBadStrip.end();
p++) {
203 int tt_num=rd_badStrip.
getTTId();
211 bool set_the_strip=
false;
212 for (
size_t istrip=0; istrip<my_StripEcalLogicId_EE.size(); istrip++) {
216 if(my_StripEcalLogicId_EE[istrip].getID1()==tcc_num
217 && my_StripEcalLogicId_EE[istrip].getID2()==tt_num
218 && my_StripEcalLogicId_EE[istrip].getID3()==strip_num
220 stripid =my_StripEcalLogicId_EE[istrip].getLogicID();
240 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Finished badStrip reading.";
251 writeFile(
"last_tpg_badStrip_settings.txt");
259 writeFile(
"last_tpg_badStrip_settings.txt");
268 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
269 <<
" version="<<the_config_version<< std::endl;
284 writeFile(
"last_tpg_badStrip_settings.txt");
291 edm::LogInfo(
"EcalTPGBadStripHandler") <<
"Ecal - > end of getNewObjects -----------";
void setRunTypeDef(const RunTypeDef &runTypeDef)
std::vector< RunIOV > getRuns()
unsigned int m_i_run_number
std::string getConfigTag() const
void writeFile(const char *inputFile)
OldContainer m_to_transfer
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID)
void fetchConfigDataSet(std::vector< DATT > *fillMap, ICONF *iconf)
cond::ValidityInterval lastInterval
EcalCondDBInterface * econn
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef)
void setLocationDef(const LocationDef &locDef)
void readFromFile(const char *inputFile)
void setRunType(std::string runtype)
void setConfigTag(std::string x)
void setLocation(std::string loc)
void setGeneralTag(std::string tag)
void setValue(const uint32_t &id, const uint16_t &val)
cond::TagInfo_t const & tagInfo() const