12#ifndef ALICEO2_ITSMFT_GBTWORD_H
13#define ALICEO2_ITSMFT_GBTWORD_H
109 uint64_t calibUserField : 48;
110 uint64_t calibCounter : 24;
168 void printX(
bool padded =
true, std::string com =
"")
const;
169 void printB(
bool padded =
true)
const;
234 GBTDataTrailer(
int lanesStop,
int lanesTimeOut,
bool done,
bool transmTO,
bool overflow,
bool laneStViol,
bool laneTO)
345 calibUserField = userData & ((0x1UL << 48) - 1);
346 calibCounter =
counter & ((0x1 << 24) - 1);
constexpr uint8_t GBTFlagDiagnostic
GBT diagnostic status word flag.
constexpr int GBTPaddedWordLength
constexpr uint8_t GBTFlagDataIB
constexpr uint8_t GBTFlagDiagnosticIB
constexpr uint8_t GBTFlagStatus
constexpr uint8_t GBTFlagCalibration
GBT calibration status word flag.
constexpr uint8_t GBTFlagDataHeader
GBT payload header flag.
constexpr uint8_t GBTFlagDataTrailer
GBT payload trailer flag.
constexpr uint8_t GBTFlagTrigger
GBT trigger status word flag.
constexpr uint8_t GBTFlagRDH
constexpr uint8_t GBTFlagDataMFT
constexpr uint8_t GBTFlagDiagnosticOB
constexpr int GBTWordLength
constexpr uint64_t LANESMask
constexpr uint8_t GBTFlagDataOB
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ClassDefNV(GBTCableDiagnostic, 1)
GBTCableDiagnostic(bool ib=true, int lane=0)
GBTCableStatus(int lane=0)
ClassDefNV(GBTCableStatus, 1)
ClassDefNV(GBTCalibration, 1)
GBTCalibration(uint64_t userData, uint16_t counter=0)
void setByte(uint8_t v, int which)=delete
ClassDefNV(GBTDataTrailer, 1)
uint8_t getPacketState() const
GBTDataTrailer(int lanesStop, int lanesTimeOut, bool done, bool transmTO, bool overflow, bool laneStViol, bool laneTO)
static int getLaneIB(uint8_t v)
extract lane of the IB as lowest 5 bits (ATTENTION: no check if this is really an IB header)
int getLaneIB() const
extract lane of the IB as lowest 5 bits (ATTENTION: no check if this is really an IB header)
static int getCableID(uint8_t v)
static int getLaneOB(uint8_t v, int &connector)
int getLaneOB(int &connector) const
static int getLaneOB(uint8_t v)
int getConnectorOB() const
extract connector/lane of the OB as lowest 2/3 bits (ATTENTION: no check if this is really an OB head...
static int getConnectorOB(uint8_t v)
extract connector/lane of the OB as lowest 2/3 bits (ATTENTION: no check if this is really an OB head...
ClassDefNV(GBTDiagnostic, 1)
ClassDefNV(GBTTrigger, 1)
void setByte(uint8_t v, int which)=delete
uint64_t continuation
13 No data expected (too close to previous trigger or error)
uint64_t packetOverflow
65 = 1 if timeout while waiting for data on lanes
const uint8_t * getW8() const
uint64_t laneStartsViolation
66 = 1 if max number of packets reached
uint64_t na1tr
14 following data is continuation of the trigger from the previous CRU page
uint64_t laneErrorID
0:63 Error specific diagnostic data
uint64_t id
28:71 reserved
uint64_t na0hn
0:27 Bit map of lanes active and eligible for readout
uint64_t activeLanesL
0:15 Index of Data Packet within trigger
void printB(bool padded=true) const
uint64_t lanesTimeout
0:27 Bit map of “Valid Lane stops received”, 1 bit per lane, NOT USED
const uint64_t * getW64() const
bool isDataIB() const
check if the GBT Header corresponds to ITS IB data (header is combined with lanes info)
bool isDataOB() const
check if the GBT Header corresponds to ITS OB data (header is combined with lanes/connector info)
uint64_t noData
12 Used in Continuous Mode for internally generated trigger
uint64_t internal
0:11 12 lowest bits of trigger type received from CTP
uint64_t laneTimeouts
67 = 1 if at least 1 lane (eligible for readout) had a “start violation”
uint64_t orbit
28:31 reserved
uint64_t na1hn
28:71 reserved
bool isTriggerWord() const
check if the GBT Header corresponds to GBT trigger word
uint64_t na1h
44:64 reserved
bool isDataMFT() const
check if the GBT Header corresponds to MFT data (header is combined with cable number)
bool isCableDiagnosticOB() const
check if the GBT Header corresponds to ITS OB diagnostics data (header is combined with lanes info)
uint64_t na3tr
32:63 Last received HB Orbit or trigger orbit count/ Orbit as received from CTP
uint8_t getHeader() const
bool isCableDiagnosticIB() const
check if the GBT Header corresponds to ITS IB diagnostics data (header is combined with lanes info)
void printX(bool padded=true, std::string com="") const
bool isDataHeader() const
check if the GBT Header corresponds to GBT payload header
uint64_t na1t
28:55 Bit map of “Lane timeouts received”, 1 bit per lane, NOT USED
bool isDataTrailer() const
check if the GBT Header corresponds to GBT payload trailer
bool isDiagnosticWord() const
check if the GBT Header corresponds to Diagnostic data
bool isCalibrationWord() const
check if the GBT Header corresponds to Calibration word
uint64_t na0h
16:43 Bit map of lanes active and eligible for readout
uint64_t na2tr
16:27 HB or internal trigger BC count or trigger BC from CTP
bool isCableDiagnostic() const
uint64_t na2t
68 = 1 if at least 1 lane (eligible for readout) had a “start violation”
bool isData() const
check if the GBT Header corresponds to ITS IB or OB data (header is combined with lanes/connector inf...
uint64_t packetDone
56:63 reserved
uint64_t transmissionTimeout
64 = 1 when current trigger packets transmission done