53 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"Started GetNewObjects!!!";
58 std::cout <<
"got offlineInfo = " << std::endl;
62 std::cout <<
" First object for this tag " << std::endl;
65 unsigned int max_since=0;
67 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"max_since : " << max_since;
68 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"retrieved last payload ";
72 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"Retrieving run list from ONLINE DB ... ";
74 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"Making connection...";
76 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"Done.";
106 if(min_run<max_since) {
113 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
120 std::vector<RunIOV> run_vec= my_list.
getRuns();
121 size_t num_runs=run_vec.size();
123 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
129 std::vector<EcalLogicID> my_StripEcalLogicId_EE;
134 "EE_offline_stripid",123 );
135 std::cout <<
" GOT the logic ID for the EE trigger strips "<< std::endl;
138 for(
size_t kr=0; kr<run_vec.size(); kr++){
140 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
142 std::cout<<
" **************** "<<std::endl;
143 std::cout<<
" **************** "<<std::endl;
147 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
150 std::string the_config_tag=
"";
151 int the_config_version=0;
153 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
156 for( it=dataset.begin(); it!=dataset.end(); it++ )
168 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
174 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
181 std::cout <<
" before fetch config set" << std::endl;
182 econn-> fetchConfigSet(&fe_main_info);
183 std::cout <<
" after fetch config set" << std::endl;
192 fe_fgr_info.
setId(fgrId);
193 econn-> fetchConfigSet(&fe_fgr_info);
194 std::map<EcalLogicID, FEConfigFgrEEStripDat> dataset_TpgFineGrainStripEE;
198 typedef std::map<EcalLogicID, FEConfigFgrEEStripDat>::const_iterator CIfefgr;
204 for (CIfefgr
p = dataset_TpgFineGrainStripEE.begin();
p != dataset_TpgFineGrainStripEE.end();
p++) {
209 std::string ecid_name=ecid_xt.
getName();
212 if (ecid_name==
"EB_VFE") {
217 if(sm>18) tcc=sm+18 ;
221 unsigned int stripEBId = 303176+(tt-1)*64+(strip-1)*8+(tcc-37)*8192;
227 fgrStripEE->
setValue(stripEBId,item);
231 }
else if (ecid_name==
"ECAL_readout_strip"){
240 bool set_the_strip=
false;
242 for (
size_t istrip=0; istrip<my_StripEcalLogicId_EE.size(); istrip++) {
246 if(my_StripEcalLogicId_EE[istrip].getID1()==id1
247 && my_StripEcalLogicId_EE[istrip].getID2()==id2
248 && my_StripEcalLogicId_EE[istrip].getID3()==id3
250 stripEEId =my_StripEcalLogicId_EE[istrip].getLogicID();
263 fgrStripEE->
setValue(stripEEId,item);
265 std::cout <<
" these may be the additional towers TCC/TT "
266 << id1<<
"/"<<id2<<std::endl;
282 writeFile(
"last_tpg_fgrStripEE_settings.txt");
290 writeFile(
"last_tpg_fgrStripEE_settings.txt");
292 std::cout<<
" even if the tag/version is not the same, the fgrStripEEestals id is the same -> no transfer needed "<< std::endl;
299 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
300 <<
" version="<<the_config_version<< std::endl;
305 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_fgrStripEE_settings.txt");
325 edm::LogInfo(
"EcalTPGFineGrainStripEEHandler") <<
"Ecal - > end of getNewObjects -----------";
EcalCondDBInterface * econn
std::vector< RunIOV > getRuns()
void setLocationDef(const LocationDef locDef)
void writeFile(const char *inputFile)
std::string getConfigTag() const
unsigned int getThreshold() const
void readFromFile(const char *inputFile)
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)
void setValue(const uint32_t &id, const Item &value)
unsigned int getLUTFgr() 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 setRunType(std::string runtype)
void setConfigTag(std::string x)
cond::ValidityInterval lastInterval
unsigned int m_i_run_number
void setLocation(std::string loc)
void setGeneralTag(std::string tag)
tuple size
Write out results.