71 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Started GetNewObjects!!!";
76 std::cout <<
"got offlineInfo = " << std::endl;
80 std::cout <<
" First object for this tag " << std::endl;
83 unsigned int max_since=0;
85 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"max_since : " << max_since;
86 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"retrieved last payload ";
89 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Retrieving run list from ONLINE DB ... ";
91 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Making connection...";
127 if(min_run<max_since) {
128 min_run= max_since+1;
134 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
140 std::vector<RunIOV> run_vec= my_list.
getRuns();
141 size_t num_runs=run_vec.size();
143 std::cout <<
"number of runs is : "<< num_runs<< std::endl;
150 for(
size_t kr=0; kr<run_vec.size(); kr++){
152 irun=
static_cast<unsigned int>(run_vec[kr].getRunNumber());
154 std::cout<<
" **************** "<<std::endl;
158 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
162 int the_config_version=0;
164 std::map< EcalLogicID, RunTPGConfigDat>::const_iterator it;
167 for( it=dataset.begin(); it!=dataset.end(); it++ )
181 std::cout<<
" run= "<<irun<<
" tag "<<the_config_tag<<
" version="<<the_config_version <<std::endl;
187 std::cout<<
"the tag is different from last transferred run ... retrieving last config set from DB"<<std::endl;
194 std::cout <<
" before fetch config set" << std::endl;
195 econn-> fetchConfigSet(&fe_main_info);
196 std::cout <<
" after fetch config set" << std::endl;
200 int spikeId=fe_main_info.
getSpiId();
205 fe_spike_info.
setId(spikeId);
206 econn-> fetchConfigSet(&fe_spike_info);
207 std::map<EcalLogicID, FEConfigSpikeDat> dataset_TpgSpike;
211 typedef std::map<EcalLogicID, FEConfigSpikeDat>::const_iterator CIfelut;
216 for (CIfelut
p = dataset_TpgSpike.begin();
p != dataset_TpgSpike.end();
p++)
219 rd_spike =
p->second;
223 if(ecid_name==
"EB_trigger_tower") {
225 int smid=ecid_xt.
getID1();
227 int towerid=ecid_xt.
getID2();
230 int tow_eta=(towerid-1)/4;
231 int tow_phi=((towerid-1)-tow_eta*4);
233 int axt=(tow_eta*5)*20 + tow_phi*5 +1 ;
246 std::cout <<
" The number of towers is = " << itowers << std::endl;
257 writeFile(
"last_tpg_spikeThreshold_settings.txt");
265 writeFile(
"last_tpg_spikeThreshold_settings.txt");
267 std::cout<<
" even if the tag/version is not the same, the lutGroup id is the same -> no transfer needed "<< std::endl;
274 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" <<the_config_tag
275 <<
" version="<<the_config_version<< std::endl;
280 std::cout<<
" **************** "<<std::endl;
284 std::cout<<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed "<< std::endl;
285 std::cout<<
" **************** "<<std::endl;
290 std::cout<<
" the tag/version is the same -> no transfer needed "<< std::endl;
291 std::cout<<
" **************** "<<std::endl;
292 writeFile(
"last_tpg_spikeThreshold_settings.txt");
299 edm::LogInfo(
"EcalTPGSpikeThresholdHandler") <<
"Ecal - > end of getNewObjects -----------";
void setRunTypeDef(const RunTypeDef &runTypeDef)
std::vector< RunIOV > getRuns()
RunList fetchGlobalRunListByLocation(const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
std::string getConfigTag() const
void readFromFile(const char *inputFile)
constexpr uint32_t rawId() const
get the raw id
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setValue(const uint32_t &id, const uint16_t &val)
OldContainer m_to_transfer
cond::ValidityInterval lastInterval
std::string getName() const
EcalCondDBInterface * econn
void setLocationDef(const LocationDef &locDef)
std::string id() const override
void setRunType(std::string runtype)
void writeFile(const char *inputFile)
unsigned int m_i_run_number
void setConfigTag(std::string x)
void setLocation(std::string loc)
int getSpikeThreshold() const
void setGeneralTag(std::string tag)
static const int SMCRYSTALMODE
cond::TagInfo_t const & tagInfo() const