ATLAS Offline Software
Loading...
Searching...
No Matches
RpcFlatCableTranslator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONCABLINGDATA_ROCCABLINGTRANSLATOR_H
5#define MUONCABLINGDATA_ROCCABLINGTRANSLATOR_H
6
8#include <array>
9#include <cstdint>
10#include <optional>
11#include <iosfwd>
12
13
17class MsgStream;
18namespace Muon{
20 public:
22 static constexpr uint8_t readStrips = 32;
24 static constexpr uint8_t notSet = 250;
26 static constexpr uint8_t firstStrip = 1;
28 static constexpr uint8_t firstTdc = 0;
30 using Storage_t = std::array<uint8_t, readStrips>;
32 RpcFlatCableTranslator(const uint8_t cardId);
34 uint8_t id() const;
39 std::optional<uint8_t> tdcChannel(uint8_t strip, MsgStream& log) const;
44 std::optional<uint8_t> stripChannel(uint8_t tdcChannel, MsgStream& log) const;
50 bool mapChannels(uint8_t strip, uint8_t tdc, MsgStream& log);
52 const Storage_t& stripMap() const;
54 const Storage_t& tdcMap() const;
56 uint8_t connectedChannels() const;
57 private:
60 uint8_t m_id{0};
62 uint8_t m_nCh{0};
63 };
64 std::ostream& operator<<(std::ostream& ostr, const RpcFlatCableTranslator& translator);
65}
66#endif
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10
std::array< uint8_t, readStrips > Storage_t
Internal storage array.
const Storage_t & stripMap() const
Returns underlying strip mapping storage.
static constexpr uint8_t firstStrip
Convention of the lowest strip number.
RpcFlatCableTranslator(const uint8_t cardId)
Standard constructor taking the card ID as input.
bool mapChannels(uint8_t strip, uint8_t tdc, MsgStream &log)
Connect the strip with a tdc channel.
uint8_t id() const
Identifier of the card layout.
std::optional< uint8_t > tdcChannel(uint8_t strip, MsgStream &log) const
Returns the connected tdc channel connected to a strip.
uint8_t connectedChannels() const
Number of connected channels.
uint8_t m_nCh
Number of channels that are connected to the cable.
static constexpr uint8_t readStrips
Number of channels covered by one chip.
static constexpr uint8_t firstTdc
Convention of the lowest tdc number.
const Storage_t & tdcMap() const
Returns the underlying tdc mapping storage.
static constexpr uint8_t notSet
Default value indicating that the channel is not set.
std::optional< uint8_t > stripChannel(uint8_t tdcChannel, MsgStream &log) const
Returns the strip channel connected to a strip.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
std::ostream & operator<<(std::ostream &ostr, const Muon::HedgehogBoard &board)