43 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"Started GetNewObjects!!!";
45 unsigned int max_since = 0;
46 max_since = static_cast<unsigned int>(
tagInfo().lastInterval.since);
47 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"max_since : " << max_since;
48 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"retrieved last payload ";
51 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"Retrieving run list from ONLINE DB ... ";
53 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"Making connection...";
82 if (min_run < max_since) {
83 min_run = max_since + 1;
90 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"min_run= " << min_run <<
"max_run= " << max_run;
96 std::vector<RunIOV> run_vec = my_list.
getRuns();
97 size_t num_runs = run_vec.size();
99 std::cout <<
"number of runs is : " << num_runs << std::endl;
103 unsigned int irun = 0;
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());
115 std::map<EcalLogicID, RunTPGConfigDat>
dataset;
119 int the_config_version = 0;
121 std::map<EcalLogicID, RunTPGConfigDat>::const_iterator it;
138 std::cout <<
" run= " << irun <<
" tag " << the_config_tag <<
" version=" << the_config_version << std::endl;
139 std::cout <<
"the tag is different from last transferred run ... retrieving last config set from DB"
150 int badttId = fe_main_info.
getBttId();
154 fe_badTT_info.
setId(badttId);
158 std::vector<FEConfigBadTTDat> dataset_TpgBadTT;
163 typedef std::vector<FEConfigBadTTDat>::const_iterator CIfeped;
170 for (
int ito = 1; ito <= 68; ito++) {
171 int tow_eta = (ito - 1) / 4;
172 int tow_phi = ((ito - 1) - tow_eta * 4);
173 int axt = (tow_eta * 5) * 20 + tow_phi * 5 + 1;
176 int tower_status = 0;
181 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
182 int towid = my_TTEcalLogicId_EE[itower].getLogicID();
183 int tower_status = 0;
184 towerStatus->
setValue(towid, tower_status);
189 for (CIfeped
p = dataset_TpgBadTT.begin();
p != dataset_TpgBadTT.end();
p++) {
193 int tt_num = rd_badTT.
getTTId();
195 std::cout <<
" tcc/tt" << tcc_num <<
"/" << tt_num << std::endl;
197 if (tcc_num > 36 && tcc_num <= 72) {
199 int smid = tcc_num - 54;
203 int towerid = tt_num;
205 int tow_eta = (towerid - 1) / 4;
206 int tow_phi = ((towerid - 1) - tow_eta * 4);
207 int axt = (tow_eta * 5) * 20 + tow_phi * 5 + 1;
220 int towerid = tt_num;
222 bool set_the_tower =
false;
224 for (
size_t itower = 0; itower < my_TTEcalLogicId_EE.size(); itower++) {
225 if (!set_the_tower) {
226 if (my_TTEcalLogicId_EE[itower].getID1() == tccid &&
227 my_TTEcalLogicId_EE[itower].getID2() == towerid) {
228 towid = my_TTEcalLogicId_EE[itower].getLogicID();
229 set_the_tower =
true;
239 std::cout <<
" these may be the additional towers TCC/TT " << tccid <<
"/" << towerid << std::endl;
246 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"Finished badTT reading.";
257 writeFile(
"last_tpg_badTT_settings.txt");
264 writeFile(
"last_tpg_badTT_settings.txt");
272 std::cout <<
"ERROR: THIS CONFIG DOES NOT EXIST: tag=" << the_config_tag <<
" version=" << the_config_version
278 }
else if (
nr == 0) {
286 writeFile(
"last_tpg_badTT_settings.txt");
293 edm::LogInfo(
"EcalTPGBadTTHandler") <<
"Ecal - > end of getNewObjects -----------";