58 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"Started GetNewObjects!!!";
63 std::cout <<
"got offlineInfo = " << std::endl;
67 std::cout <<
" First object for this tag " << std::endl;
70 unsigned int max_since=0;
72 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"max_since : " << max_since;
73 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"retrieved last payload ";
77 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"Retrieving run list from ONLINE DB ... ";
79 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"Making connection...";
111 if(min_run<max_since) {
120 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
126 std::vector<RunIOV> run_vec= my_list.
getRuns();
127 size_t num_runs=run_vec.size();
129 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
135 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
140 "EE_offline_stripid",123 );
141 std::cout <<
" GOT the logic ID for the EE trigger strips "<< std::endl;
144 for(
size_t kr=0; kr<run_vec.size(); kr++){
146 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
148 std::cout<<
" **************** "<<std::endl;
149 std::cout<<
" **************** "<<std::endl;
153 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
156 std::string the_config_tag=
"";
157 int the_config_version=0;
159 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
164 for( it=dataset.begin(); it!=dataset.end(); it++ )
177 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
182 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
189 std::cout <<
" before fetch config set" << std::endl;
190 econn-> fetchConfigSet(&fe_main_info);
191 std::cout <<
" after fetch config set" << std::endl;
195 int slidingId=fe_main_info.
getSliId();
200 fe_sli_info.
setId(slidingId);
201 econn-> fetchConfigSet(&fe_sli_info);
202 std::map<EcalLogicID, FEConfigSlidingDat> dataset_TpgSli;
206 typedef std::map<EcalLogicID, FEConfigSlidingDat>::const_iterator CIfesli;
212 for (CIfesli
p = dataset_TpgSli.begin();
p != dataset_TpgSli.end();
p++) {
216 std::string ecid_name=ecid_xt.
getName();
219 if (ecid_name==
"EB_VFE") {
224 if(sm>18) tcc=sm+18 ;
228 unsigned int stripEBId = 303176+(tt-1)*64+(strip-1)*8+(tcc-37)*8192;
234 else if (ecid_name==
"ECAL_readout_strip"){
241 bool set_the_strip=
false;
243 for (
size_t istrip=0; istrip<my_StripEcalLogicId_EE.size(); istrip++) {
247 if(my_StripEcalLogicId_EE[istrip].getID1()==id1
248 && my_StripEcalLogicId_EE[istrip].getID2()==id2
249 && my_StripEcalLogicId_EE[istrip].getID3()==id3
251 stripid =my_StripEcalLogicId_EE[istrip].getLogicID();
264 std::cout <<
" these may be the additional towers TCC/TT "
265 << id1<<
"/"<<id2<<std::endl;
282 writeFile(
"last_tpg_sliding_settings.txt");
290 writeFile(
"last_tpg_sliding_settings.txt");
292 std::cout<<
" even if the tag/version is not the same, the sliding windows id is the same -> no transfer needed "<< std::endl;
296 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
297 <<
" version="<<the_config_version<< std::endl;
304 std::cout<<
" **************** "<<std::endl;
309 std::cout<<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed "<< std::endl;
310 std::cout<<
" **************** "<<std::endl;
315 std::cout<<
" the tag/version is the same -> no transfer needed "<< std::endl;
316 std::cout<<
" **************** "<<std::endl;
317 writeFile(
"last_tpg_sliding_settings.txt");
325 edm::LogInfo(
"EcalTPGSlidingWindowHandler") <<
"Ecal - > end of getNewObjects -----------";
std::vector< RunIOV > getRuns()
void readFromFile(const char *inputFile)
void setLocationDef(const LocationDef locDef)
std::string getConfigTag() const
OldContainer m_to_transfer
cond::TagInfo const & tagInfo() const
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)
unsigned int m_i_run_number
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 writeFile(const char *inputFile)
void setValue(const uint32_t &id, const uint32_t &value)
void setRunType(std::string runtype)
EcalCondDBInterface * econn
void setConfigTag(std::string x)
cond::ValidityInterval lastInterval
void setLocation(std::string loc)
void setGeneralTag(std::string tag)
tuple size
Write out results.