![]() |
Project
|
#include <ChannelCode.h>
Public Member Functions | |
ChannelCode ()=default | |
ChannelCode (uint16_t deId, uint16_t dePadIndex) | |
ChannelCode (uint16_t solarId, uint8_t elinkIndex, uint8_t channel) | |
uint16_t | getDeId () const |
uint16_t | getDePadIndex () const |
uint16_t | getDsId () const |
uint16_t | getDsIndex () const |
uint16_t | getSolarId () const |
uint16_t | getSolarIndex () const |
uint8_t | getChannel () const |
uint8_t | getDeIndex () const |
uint8_t | getElinkId () const |
uint8_t | getElinkIndex () const |
bool | isValid () const |
uint64_t | value () const |
64-bits identifier of a MCH channel.
The ChannelCode class encodes in a 64 bits integer the following information about a MCH channel :
This class serves the same purposes as DsChannelId, but using two different "coordinate systems" to reference the elements within the spectrometer, while DsChannelId uses only one. DsChannelId is readout/online oriented, while ChannelCode is both reconstruction/offline and readout/online oriented. But at a cost of twice the size.
Note that while this class is internal storing indices-, it also offer getters for _identifiers (Ids).
Definition at line 46 of file ChannelCode.h.
|
default |
o2::mch::ChannelCode::ChannelCode | ( | uint16_t | deId, |
uint16_t | dePadIndex | ||
) |
Ctor using "detector oriented" numbering.
deId | detection element identifier (e.g. 100, 502, 1025) |
dePadIndex | pad index within the detection element [0..(npads in DE)-1] |
runtime_error | if (deId,dePadIndex) is not a valid combination |
Definition at line 22 of file ChannelCode.cxx.
o2::mch::ChannelCode::ChannelCode | ( | uint16_t | solarId, |
uint8_t | elinkIndex, | ||
uint8_t | channel | ||
) |
Ctor using "electronics oriented" numbering.
solarId | solar identifier |
elinkIndex | elink index 0..39 |
channel | channel number 0..63 |
runtime_error | if (solarId,elinkIndex,channel) is not a valid combination |
Note that elinkIndex is also called elinkId equivalently in some other parts of the code, as for elink the id is the index.
Definition at line 56 of file ChannelCode.cxx.
uint8_t o2::mch::ChannelCode::getChannel | ( | ) | const |
return the dual sampa channel (0..63)
Definition at line 137 of file ChannelCode.cxx.
uint16_t o2::mch::ChannelCode::getDeId | ( | ) | const |
return the detection element identifier
Definition at line 142 of file ChannelCode.cxx.
uint8_t o2::mch::ChannelCode::getDeIndex | ( | ) | const |
return the detection element index (0..155)
Definition at line 112 of file ChannelCode.cxx.
uint16_t o2::mch::ChannelCode::getDePadIndex | ( | ) | const |
return the pad index within the detection element. It's in the range 0..(npads in DE)-1)
Definition at line 117 of file ChannelCode.cxx.
uint16_t o2::mch::ChannelCode::getDsId | ( | ) | const |
return the dual sampa identifier
Definition at line 148 of file ChannelCode.cxx.
uint16_t o2::mch::ChannelCode::getDsIndex | ( | ) | const |
return the dual sampa index (0..16819)
Definition at line 122 of file ChannelCode.cxx.
uint8_t o2::mch::ChannelCode::getElinkId | ( | ) | const |
return the elink identifier = index (0..39)
Definition at line 132 of file ChannelCode.cxx.
|
inline |
return the elink index = identifier (0..39)
Definition at line 91 of file ChannelCode.h.
uint16_t o2::mch::ChannelCode::getSolarId | ( | ) | const |
return the solar identifier
Definition at line 155 of file ChannelCode.cxx.
uint16_t o2::mch::ChannelCode::getSolarIndex | ( | ) | const |
return the solar index (0..623)
Definition at line 127 of file ChannelCode.cxx.
|
inline |
Definition at line 99 of file ChannelCode.h.
|
inline |
Definition at line 102 of file ChannelCode.h.