12#ifndef O2_MCH_RAW_ELECMAP_DS_ELEC_ID_H
13#define O2_MCH_RAW_ELECMAP_DS_ELEC_ID_H
32 return mElinkIndexInGroup;
46 return mElinkGroupId * 5 + mElinkIndexInGroup;
57 if (mSolarId < rhs.mSolarId) {
59 }
else if (mElinkIndexInGroup < rhs.mElinkIndexInGroup) {
61 }
else if (mElinkGroupId < rhs.mElinkGroupId) {
69 return mSolarId == rhs.mSolarId &&
70 mElinkIndexInGroup == rhs.mElinkIndexInGroup &&
71 mElinkGroupId == rhs.mElinkGroupId;
75 return !(*
this == rhs);
80 uint8_t mElinkGroupId;
81 uint8_t mElinkIndexInGroup;
84uint32_t
encode(
const DsElecId&
id);
101std::ostream&
operator<<(std::ostream& os,
const DsElecId&
id);
constexpr uint8_t elinkId() const
bool operator<(const DsElecId &rhs) const
constexpr uint16_t solarId() const
solarId is an identifier that uniquely identify a solar board
bool operator==(const DsElecId &rhs) const
bool operator!=(const DsElecId &rhs) const
constexpr uint8_t elinkIndexInGroup() const
constexpr uint8_t elinkGroupId() const
std::optional< uint8_t > indexFromElinkId(uint8_t elinkId)
Extracts the index from the elinkId.
std::optional< uint8_t > decodeChannelId(std::string rep)
std::optional< uint8_t > groupFromElinkId(uint8_t elinkId)
Extracts the group from the elinkId.
std::string asString(const SampaCluster &sc)
std::optional< DsElecId > decodeDsElecId(uint32_t code)
uint32_t encode(const DsDetId &id)
Create an integer code for the given id.
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)