12 for (uint8_t globTube :
m_mezzCard->tdcToTubeMap()) {
13 if (globTube == NOTSET)
15 int8_t tube = globTube % m_mezzCard->numTubesPerLayer();
16 m_minTube = std::min(m_minTube, tube);
17 m_maxTube = std::max(m_maxTube, tube);
26 if (log.level() <= MSG::VERBOSE) {
27 log << MSG::VERBOSE << cabling_map
36 cabling_map.
layer = tubeLayer.layer;
37 return tubeLayer.isValid;
40 if (
offId() != cabling_data) {
41 log << MSG::WARNING <<
"The cabling data " << cabling_data
42 <<
" does not share the same offline id as the Tdc " <<
offId()
46 const bool debug =
true || log.level() <= MSG::VERBOSE;
47 const uint8_t tubeOffSet =
50 log << MSG::VERBOSE <<
"Try to match " << cabling_data <<
endmsg;
52 if (cabling_data.tube <
minTube() || cabling_data.tube >
maxTube()) {
54 log << MSG::VERBOSE <<
"The requested tube "
55 <<
static_cast<int>(cabling_data.tube) <<
" is out of range "
56 <<
static_cast<int>(
minTube()) <<
" -- "
61 cabling_data.channelId =
m_mezzCard->tdcChannel(
62 cabling_data.layer, cabling_data.tube - tubeOffSet, log);
66 log << MSG::VERBOSE <<
"Mapped to " <<
m_statId <<
", channel "
67 <<
static_cast<int>(cabling_data.channelId) <<
endmsg;
69 return cabling_data.channelId !=
NOTSET;
bool offlineId(MdtCablingData &cabling_data, MsgStream &log) const
retrieve the full information
uint8_t moduleId() const
return the tdc id
const MdtCablingOffData & offId() const
get the offline identifier
MdtCablingData m_statId
tube corresponding to each tdc channel
MdtMezzanineCard::MezzCardPtr MezzCardPtr
MdtTdcMap(const MezzCardPtr mezType, const MdtCablingData &cabling_data)
constructor
static constexpr uint8_t NOTSET
const MdtCablingOnData & onlineId() const
get the online identiifer
int tube
Layer inside the multilayer.
uint8_t channelId
Identifier of the corresponding tdc.
Split the offline part of the cabling apart to use it later for sorting.
Helper struct to pipe the result from the tdc -> offline channel translation.