32 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Started GetNewObjects!!!";
37 std::cout <<
"got offlineInfo = " << std::endl;
41 std::cout <<
" First object for this tag " << std::endl;
44 unsigned int max_since = 0;
46 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"max_since : " << max_since;
49 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"retrieved last payload ";
52 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Retrieving run list from ONLINE DB ... ";
54 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Making connection...";
56 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"Done.";
84 if (min_run < max_since) {
85 min_run = max_since + 1;
92 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"min_run= " << min_run <<
" max_run= " << max_run;
98 std::vector<RunIOV> run_vec = my_list.
getRuns();
99 size_t num_runs = run_vec.size();
101 std::cout <<
"number of runs is : " << num_runs << std::endl;
106 std::vector<EcalLogicID> my_TTEcalLogicId_EE;
109 std::cout <<
" GOT the logic ID for the EE trigger towers " << std::endl;
111 for (
size_t kr = 0; kr < run_vec.size(); kr++) {
112 irun =
static_cast<unsigned int>(run_vec[kr].getRunNumber());
114 std::cout <<
" **************** " << std::endl;
115 std::cout <<
" **************** " << std::endl;
116 std::cout <<
" run= " << irun << std::endl;
119 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
123 int the_config_version = 0;
125 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator
it;
138 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
143 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB" 151 std::cout <<
" before fetch config set" << std::endl;
153 std::cout <<
" after fetch config set" << std::endl;
156 int fgrId = fe_main_info.
getFgrId();
160 fe_fgr_info.
setId(fgrId);
162 std::map<EcalLogicID, FEConfigFgrEETowerDat> dataset_TpgFineGrainEE;
166 typedef std::map<EcalLogicID, FEConfigFgrEETowerDat>::const_iterator CIfefgr;
170 for (CIfefgr
p = dataset_TpgFineGrainEE.begin();
p != dataset_TpgFineGrainEE.end();
p++) {
176 if (ecid_name ==
"EE_trigger_tower") {
177 int tccid = ecid_xt.
getID1();
179 int towerid = ecid_xt.
getID2();
181 bool set_the_tower =
false;
183 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
184 if (!set_the_tower) {
185 if (my_TTEcalLogicId_EE[itower].getID1() == tccid &&
186 my_TTEcalLogicId_EE[itower].getID2() == towerid) {
187 towid = my_TTEcalLogicId_EE[itower].getLogicID();
188 set_the_tower =
true;
198 std::cout <<
" these may be the additional towers TCC/TT " << tccid <<
"/" << towerid << std::endl;
212 writeFile(
"last_tpg_fgrTTEE_settings.txt");
219 writeFile(
"last_tpg_fgrTTEE_settings.txt");
221 std::cout <<
" even if the tag/version is not the same, the fgrTTEE id is the same -> no transfer needed " 226 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
231 std::cout <<
" **************** " << std::endl;
233 }
else if (
nr == 0) {
235 std::cout <<
" no tag saved to RUN_TPGCONFIG_DAT by EcalSupervisor -> no transfer needed " << std::endl;
236 std::cout <<
" **************** " << std::endl;
241 std::cout <<
" the tag/version is the same -> no transfer needed " << std::endl;
242 std::cout <<
" **************** " << std::endl;
243 writeFile(
"last_tpg_fgrTTEE_settings.txt");
249 edm::LogInfo(
"EcalTPGFineGrainTowerEEHandler") <<
"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)
void writeFile(const char *inputFile)
std::string getName() const
void readFromFile(const char *inputFile)
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
EcalCondDBInterface * econn
cond::TagInfo_t const & tagInfo() const
unsigned int m_i_run_number
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) noexcept(false)
std::vector< std::pair< EcalTPGFineGrainTowerEE *, Time_t > > m_to_transfer
void setValue(const uint32_t &id, const uint32_t &lut)
void setLocationDef(const LocationDef &locDef)
Log< level::Info, false > LogInfo
std::string getConfigTag() const
std::unique_ptr< EcalTPGFineGrainTowerEE > Ref
void setConfigTag(std::string x)
void setGeneralTag(std::string tag)