ATLAS Offline Software
|
MdtMezzanineCard - Helper struct to represent the structure of a mezzanine card in a consistent way Each mezzanine card reads out in total 24 tubes of a chamber covering all tube layers of a chamber. More...
#include <MdtMezzanineCard.h>
Classes | |
struct | OfflineCh |
Helper struct to pipe the result from the tdc -> offline channel translation. More... | |
Public Types | |
using | MezzCardPtr = std::shared_ptr< const MdtMezzanineCard > |
using | Mapping = std::array< uint8_t, 24 > |
Public Member Functions | |
MdtMezzanineCard (const Mapping &tdcToTubeMap, uint8_t num_layers, uint8_t mezz_id) | |
Standard constructor of the mezzanine card. More... | |
uint8_t | tdcChannel (uint8_t tubeLay, uint8_t tube, MsgStream &msg) const |
returns the tdc channel number More... | |
uint8_t | tubeNumber (uint8_t tubeLay, uint8_t tube) const |
returns the tube number More... | |
bool | checkConsistency (MsgStream &msg) const |
checks whether the tdc mapping is complete. More... | |
uint8_t | id () const |
returns mezzanine database identifier More... | |
uint8_t | numTubeLayers () const |
returns the number of layers More... | |
uint8_t | numTubesPerLayer () const |
returns the number of tubes per layer; More... | |
OfflineCh | offlineTube (uint8_t tdc, MsgStream &msg) const |
const Mapping & | tdcToTubeMap () const |
Returns the underlying TDC -> Tube conversion map. More... | |
const Mapping & | tubeToTdcMap () const |
Returns the underlying Tube -> Tdc conversion map. More... | |
Static Public Attributes | |
static constexpr uint8_t | NOTSET = 250 |
Private Attributes | |
Mapping | m_tdcToTubes {make_array<uint8_t, 24>(NOTSET)} |
Mapping of the tdc channels to the mezzanine tube number. More... | |
Mapping | m_tubesToTdc {make_array<uint8_t, 24>(NOTSET)} |
Mapping of the mezzanine tube number to the tdc channel. More... | |
uint8_t | m_nlay {0} |
Number of tube layers. More... | |
uint8_t | m_nTubes {0} |
Number of tubes per layer. More... | |
uint8_t | m_mezzId {0} |
Mezzanine database identifier. More... | |
MdtMezzanineCard - Helper struct to represent the structure of a mezzanine card in a consistent way Each mezzanine card reads out in total 24 tubes of a chamber covering all tube layers of a chamber.
Given that a chamber has either 3 or 4 layers, 8 or 6 tubes per layer are read out by the cards. The assignment of the tdc channels to the tubes does not follow a distinct pattern:
Layer 2: (01) (03) (05) (07) (06) (04) (02) (00) Layer 1: (09) (11) (13) (15) (14) (12) (10) (08) Layer 0: (17) (19) (21) (23) (22) (20) (18) (16)
To preserve a continuous memory layout and to ease the translation of online -> offline numbering scheme, the tubes are numbered sequentially Layer 2: (16) (17) (18) (19) (20) (21) (22) (23) Layer 1: (08) (09) (10) (11) (12) (13) (14) (15) Layer 0: (00) (01) (02) (03) (04) (05) (06) (07) The mapping between the two schemes is represented by a 24 long array, where the index is the channel number, tdc in the case of online -> offline, and tube number in the case of online to online.
Definition at line 34 of file MdtMezzanineCard.h.
using MdtMezzanineCard::Mapping = std::array<uint8_t, 24> |
Definition at line 39 of file MdtMezzanineCard.h.
using MdtMezzanineCard::MezzCardPtr = std::shared_ptr<const MdtMezzanineCard> |
Definition at line 38 of file MdtMezzanineCard.h.
MdtMezzanineCard::MdtMezzanineCard | ( | const Mapping & | tdcToTubeMap, |
uint8_t | num_layers, | ||
uint8_t | mezz_id | ||
) |
Standard constructor of the mezzanine card.
tdcToTubeMap | array mapping the tdc channels to the tube numbers covered by the card |
num_layers | number of tube layers (3 or 4) |
mezz_id | Global identifier number to map the card in the online <-> offline conversion |
Should be 6 or 8 tubes per layer
Fill the map from tdc -> tube number
Definition at line 39 of file MdtMezzanineCard.cxx.
bool MdtMezzanineCard::checkConsistency | ( | MsgStream & | msg | ) | const |
checks whether the tdc mapping is complete.
I.e. – all channels are uniquely defined – number of layers is 4 or 3
Check that all channels are actually set
Definition at line 52 of file MdtMezzanineCard.cxx.
|
inline |
|
inline |
|
inline |
OfflineCh MdtMezzanineCard::offlineTube | ( | uint8_t | tdc, |
MsgStream & | msg | ||
) | const |
Do not offset the tube as the tube number needs to be shifted by the first tube of the card
Definition at line 126 of file MdtMezzanineCard.cxx.
uint8_t MdtMezzanineCard::tdcChannel | ( | uint8_t | tubeLay, |
uint8_t | tube, | ||
MsgStream & | msg | ||
) | const |
returns the tdc channel number
tubeLay | tube layer (1-4) |
tube | global number of the tube in a layer (1-120) |
Definition at line 106 of file MdtMezzanineCard.cxx.
Returns the underlying TDC -> Tube conversion map.
Definition at line 80 of file MdtMezzanineCard.h.
uint8_t MdtMezzanineCard::tubeNumber | ( | uint8_t | tubeLay, |
uint8_t | tube | ||
) | const |
returns the tube number
tubeLay | tube layer (1-4) |
tube | global number of the tube in a layer (1-120) |
Definition at line 122 of file MdtMezzanineCard.cxx.
Returns the underlying Tube -> Tdc conversion map.
Definition at line 82 of file MdtMezzanineCard.h.
|
private |
Mezzanine database identifier.
Definition at line 94 of file MdtMezzanineCard.h.
|
private |
Number of tube layers.
Definition at line 90 of file MdtMezzanineCard.h.
|
private |
Number of tubes per layer.
Definition at line 92 of file MdtMezzanineCard.h.
|
private |
Mapping of the tdc channels to the mezzanine tube number.
Definition at line 86 of file MdtMezzanineCard.h.
|
private |
Mapping of the mezzanine tube number to the tdc channel.
Definition at line 88 of file MdtMezzanineCard.h.
|
staticconstexpr |
Definition at line 36 of file MdtMezzanineCard.h.