18 return StatusCode::SUCCESS;
22 const EventContext &ctx = Gaudi::Hive::currentContext();
29 return StatusCode::FAILURE;
30 }
else if (n > halfCard && !flatCable.
mapChannels(n, n - halfCard - 1, msgStream())) {
31 return StatusCode::FAILURE;
36 const unsigned forthCh = flatCable.
tdcChannel(n, msgStream()).value_or(0);
37 if (
const unsigned backCh = flatCable.
stripChannel(forthCh, msgStream()).value_or(0);
39 ATH_MSG_FATAL(
"Forward backward conversion of channel " << n <<
" failed. Ended up with " << backCh);
40 return StatusCode::FAILURE;
49 return StatusCode::FAILURE;
53 if (!cabling.isValid()) {
55 return StatusCode::FAILURE;
58 unsigned int n_elements{0}, n_success{0};
73 for (
bool measPhi : {
true,
false}) {
74 for (
int gap = 1; gap <= readEle->
numberOfLayers(measPhi); ++gap) {
80 gap, measPhi,
strip, is_valid);
89 if (!cabling->convert(chanId, cabl_data,
false)) {
91 return StatusCode::FAILURE;
94 if (!cabling->getOnlineId(cabl_data, msgStream())) {
95 return StatusCode::FAILURE;
97 ATH_MSG_DEBUG(
"Offline channel has an associated online channel " << cabl_data);
100 onl_data.RpcCablingOnlineID::operator=(cabl_data);
102 if (!cabling->getOfflineId(onl_data, msgStream())) {
103 return StatusCode::FAILURE;
105 if (onl_data != cabl_data) {
107 <<
" -- started with: " << cabl_data << std::endl
108 <<
" -- got back: " << onl_data);
112 if (!cabling->convert(onl_data, backChanId,
true)) {
113 ATH_MSG_FATAL(
"Failed to translate back the cabling object" << onl_data <<
" to an Identifier");
114 return StatusCode::FAILURE;
116 if (backChanId != chanId) {
121 n_success += (!failure);
123 return StatusCode::FAILURE;
128 ATH_MSG_INFO(n_success <<
" out of " << n_elements <<
" channels were successfully validated.");
129 return n_success == n_elements ? StatusCode::SUCCESS : StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
int getDoubletPhi() const
return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPh...
int getDoubletZ() const
return DoubletZ value for the given readout element
int Nstrips(bool measphi) const
returns the number of strips for the phi or eta plane
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
const_id_iterator detectorElement_begin() const
Iterators over full set of ids.
const_id_iterator detectorElement_end() const
virtual StatusCode execute() override
virtual StatusCode initialize() override
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Gaudi::Property< std::vector< std::string > > m_considStat
SG::ReadCondHandleKey< RpcCablingMap > m_cablingKey
std::set< int > m_cabStat
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
bool mapChannels(uint8_t strip, uint8_t tdc, MsgStream &log)
Connect the strip with a tdc channel.
std::optional< uint8_t > tdcChannel(uint8_t strip, MsgStream &log) const
Returns the connected tdc channel connected to a strip.
static constexpr uint8_t readStrips
Number of channels covered by one chip.
std::optional< uint8_t > stripChannel(uint8_t tdcChannel, MsgStream &log) const
Returns the strip channel connected to a strip.
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Identifier elementID(int stationName, int stationEta, int stationPhi, int doubletR) const
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Helper struct that is parsed to the cabling map to translate between the offline & online Identifiers...
uint8_t channelId
Online board channel number.