71 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Started GetNewObjects!!!";
99 std::cout <<
"got offlineInfo = " << std::endl;
103 std::cout <<
" First object for this tag " << std::endl;
106 unsigned int max_since=0;
108 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"max_since : " << max_since;
109 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"retrieved last payload ";
112 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Retrieving run list from ONLINE DB ... ";
114 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Making connection...";
134 my_runtag.setRunTypeDef( my_rundef );
150 if(min_run<max_since) {
151 min_run= max_since+1;
157 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
163 std::vector<RunIOV> run_vec= my_list.
getRuns();
164 size_t num_runs=run_vec.size();
166 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
175 std::vector<EcalLogicID> my_TTEcalLogicId_EE;
180 "EE_offline_towerid",12 );
181 std::cout <<
" GOT the logic ID for the EE trigger towers "<< std::endl;
183 for(
size_t kr=0; kr<run_vec.size(); kr++){
185 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
187 std::cout<<
" **************** "<<std::endl;
191 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
195 int the_config_version=0;
197 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
200 for( it=dataset.begin(); it!=dataset.end(); it++ )
214 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
220 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
227 std::cout <<
" before fetch config set" << std::endl;
228 econn-> fetchConfigSet(&fe_main_info);
229 std::cout <<
" after fetch config set" << std::endl;
238 fe_lut_info.
setId(lutId);
239 econn-> fetchConfigSet(&fe_lut_info);
240 std::map<EcalLogicID, FEConfigLUTDat> dataset_TpgLut;
244 typedef std::map<EcalLogicID, FEConfigLUTDat>::const_iterator CIfelut;
249 for (CIfelut
p = dataset_TpgLut.begin();
p != dataset_TpgLut.end();
p++)
256 if(ecid_name==
"EB_trigger_tower") {
258 int smid=ecid_xt.
getID1();
260 int towerid=ecid_xt.
getID2();
263 int tow_eta=(towerid-1)/4;
264 int tow_phi=((towerid-1)-tow_eta*4);
266 int axt=(tow_eta*5)*20 + tow_phi*5 +1 ;
285 else if (ecid_name==
"EE_trigger_tower") {
288 int tccid=ecid_xt.
getID1();
290 int towerid=ecid_xt.
getID2();
292 bool set_the_tower=
false;
294 for (
size_t itower=0; itower<my_TTEcalLogicId_EE.size(); itower++) {
298 if(my_TTEcalLogicId_EE[itower].getID1()==tccid && my_TTEcalLogicId_EE[itower].getID2()==towerid){
299 towid =my_TTEcalLogicId_EE[itower].getLogicID();
310 std::cout <<
" these may be the additional towers TCC/TT "
311 << tccid<<
"/"<<towerid<<std::endl;
328 writeFile(
"last_tpg_lutGroup_settings.txt");
336 writeFile(
"last_tpg_lutGroup_settings.txt");
338 std::cout<<
" even if the tag/version is not the same, the lutGroup id is the same -> no transfer needed "<< std::endl;
345 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
346 <<
" version="<<the_config_version<< std::endl;
351 std::cout<<
" **************** "<<std::endl;
355 std::cout<<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed "<< std::endl;
356 std::cout<<
" **************** "<<std::endl;
361 std::cout<<
" the tag/version is the same -> no transfer needed "<< std::endl;
362 std::cout<<
" **************** "<<std::endl;
363 writeFile(
"last_tpg_lutGroup_settings.txt");
370 edm::LogInfo(
"EcalTPGLutGroupHandler") <<
"Ecal - > end of getNewObjects -----------";
std::vector< RunIOV > getRuns()
void readFromFile(const char *inputFile)
std::string getConfigTag() const
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 writeFile(const char *inputFile)
uint32_t rawId() const
get the raw id
cond::ValidityInterval lastInterval
std::string getName() const
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef)
void setValue(const uint32_t &rawId, const uint32_t &ObjectId)
unsigned int m_i_run_number
void setLocationDef(const LocationDef &locDef)
void setRunType(std::string runtype)
void setConfigTag(std::string x)
int getLUTGroupId() const
void setLocation(std::string loc)
EcalCondDBInterface * econn
static const int SMCRYSTALMODE
tuple size
Write out results.
cond::TagInfo_t const & tagInfo() const