5 #include "GaudiKernel/MsgStream.h"
33 m_pivot_RPCs (cma.pivot_RPCs()),
34 m_lowPt_RPCs (cma.lowPt_RPCs()),
35 m_highPt_RPCs (cma.highPt_RPCs()),
36 m_inversion (cma.inversion())
70 int st_effective = strip_number - 1;
71 if (!
i &&
side ==
Negative) st_effective = abs(st_effective - final_strip) - 1;
82 }
while (++strip_number <= final_strip);
102 int st_effective = strip_number - 1;
103 if (!
i &&
side ==
Negative) st_effective = abs(st_effective - final_strip) - 1;
114 }
while (++strip_number <= final_strip);
134 int st_effective = strip_number - 1;
135 if (!
i &&
side ==
Negative) st_effective = abs(st_effective - final_strip) - 1;
146 }
while (++strip_number <= final_strip);
220 "to a specific side when RPC chamber is in between eta 0";
229 "to a specific side when RPC chamber is in between eta 0";
236 <<
" don't give input to CMA confirm planes!";
271 std::string LVL1_configuration_repository;
272 LVL1_configuration_repository =
"ATLAS.data";
276 SectorLogicSetup::SECTORlist::const_iterator
it = sectors.begin();
279 sprintf(s_tag,
"s%02d", *
it);
282 sprintf(t_tag,
"t%1d",
id().PAD_index());
284 char c_tag[4] = {
'_',
'c',
'2',
'\0'};
285 if (
id().Ixx_index() == 1) c_tag[2] =
'3';
287 std::ifstream CMAprogLow;
288 std::istringstream CMAprogLow_COOL;
292 const std::map<std::string, std::string>* p_trigroads =
setup.GetPtoTrigRoads();
296 if (p_trigroads ==
nullptr) {
297 while (!CMAprogLow.is_open() &&
it != sectors.end()) {
298 std::ostringstream namestr;
302 namestr <<
dir <<
"/" << s_tag <<
"_" << t_tag <<
"_pl" << c_tag <<
".txt" << std::ends;
304 namestr.str().copy(
name, namestr.str().length(), 0);
305 name[namestr.str().length()] = 0;
310 CMAprogLow.open(
name);
317 while (CMAprogLow_COOL.str().empty() &&
it != sectors.end()) {
318 std::ostringstream namestr;
319 namestr << s_tag <<
"_" << t_tag <<
"_pl" << c_tag <<
".txt" << std::ends;
320 namestr.str().copy(
name, namestr.str().length(), 0);
321 name[namestr.str().length()] = 0;
322 std::map<std::string, std::string>::const_iterator itc;
323 itc = p_trigroads->find(
name);
324 if (itc != p_trigroads->end()) {
325 CMAprogLow_COOL.str(itc->second.c_str());
328 log <<
MSG::VERBOSE <<
"EtaCMA low: key " <<
name <<
"found in the Trigger Road Map --> OK"
329 <<
", EtaCMA low: key " << itc->second.c_str()
330 <<
", Etacma:CMAPROGLOW " << CMAprogLow_COOL.str()
338 if (CMAprogLow.is_open()) {
339 std::unique_ptr<CMAprogram> program = std::make_unique<CMAprogram>(CMAprogLow,
true);
340 if (program->
check()) {
342 if (
setup.cosmic()) {
346 for (
unsigned int i = 0;
i < 3; ++
i) {
349 log <<
MSG::DEBUG << s_tag <<
": " <<
id() <<
": low-pt: has threshold " <<
i
350 <<
" not programmed." <<
endmsg;
359 }
else if (!CMAprogLow_COOL.str().empty()) {
360 std::unique_ptr<CMAprogram> program = std::make_unique<CMAprogram>(CMAprogLow_COOL,
true);
361 if (program->
check()) {
363 if (
setup.cosmic()) {
367 for (
unsigned int i = 0;
i < 3; ++
i) {
370 log <<
MSG::DEBUG << s_tag <<
": " <<
id() <<
": low-pt: has threshold " <<
i
371 <<
" not programmed." <<
endmsg;
376 CMAprogLow_COOL.str(
"");
385 it = sectors.begin();
386 std::ifstream CMAprogHigh;
387 std::istringstream CMAprogHigh_COOL;
389 if (p_trigroads ==
nullptr) {
390 while (!CMAprogHigh.is_open() &&
it != sectors.end()) {
391 std::ostringstream namestr;
394 namestr <<
dir <<
"/" << s_tag <<
"_" << t_tag <<
"_ph" << c_tag <<
".txt" << std::ends;
396 namestr.str().copy(
name, namestr.str().length(), 0);
397 name[namestr.str().length()] = 0;
401 CMAprogHigh.open(
name);
408 while (CMAprogHigh_COOL.str().empty() &&
it != sectors.end()) {
409 std::ostringstream namestr;
410 namestr << s_tag <<
"_" << t_tag <<
"_ph" << c_tag <<
".txt" << std::ends;
411 namestr.str().copy(
name, namestr.str().length(), 0);
412 name[namestr.str().length()] = 0;
413 std::map<std::string, std::string>::const_iterator itc;
414 itc = p_trigroads->find(
name);
415 if (itc != p_trigroads->end()) {
417 log <<
MSG::VERBOSE <<
"EtaCMA high: key " <<
name <<
"found in the Trigger Road Map --> OK"
418 <<
", EtaCMA high: key " << itc->second.c_str() <<
endmsg;
420 CMAprogHigh_COOL.str(itc->second.c_str());
430 if (CMAprogHigh.is_open()) {
431 std::unique_ptr<CMAprogram> program = std::make_unique<CMAprogram>(CMAprogHigh,
true);
432 if (program->
check()) {
434 if (
setup.cosmic()) {
438 for (
unsigned int i = 0;
i < 3; ++
i) {
441 log <<
MSG::DEBUG << s_tag <<
": " <<
id() <<
": high-pt: has threshold " <<
i
442 <<
" not programmed." <<
endmsg;
451 }
else if (!CMAprogHigh_COOL.str().empty()) {
452 std::unique_ptr<CMAprogram> program = std::make_unique<CMAprogram>(CMAprogHigh_COOL,
true);
453 if (program->
check()) {
455 if (
setup.cosmic()) {
459 for (
unsigned int i = 0;
i < 3; ++
i) {
462 log <<
MSG::DEBUG << s_tag <<
": " <<
id() <<
": high-pt: has threshold " <<
i
463 <<
" not programmed." <<
endmsg;
468 CMAprogHigh_COOL.str(
"");
482 SectorLogicSetup::SECTORlist::const_iterator
it = Sectors.begin();
485 RPClink::const_iterator rpc;
488 if ((*rpc).second->inversion(sector)) {
500 if ((*rpc).second->inversion(sector)) {
512 if ((*rpc).second->inversion(sector)) {