1 #ifndef DTDigi_DTDDUWords_h
2 #define DTDigi_DTDDUWords_h
10 #define WORDCONTROLMASK 0xE0000000
11 #define WORDCONTROLSHIFT 29
12 #define WORDTYPEMASK 0x1F000000
13 #define WORDTYPESHIFT 24
16 #define ERRORMASK 0x8000
19 #define DEBUG_TYPE_MASK 0xE00000
20 #define DEBUG_TYPE_SHIFT 21
21 #define DEBUG_MESSAGE_MASK 0x7FFF
22 #define CEROS_ID_CEROS_STATUS_MASK 0x1F0000
23 #define CEROS_ID_CEROS_STATUS_SHIFT 16
24 #define EV_ID_CEROS_STATUS_MASK 0xFC0
25 #define EV_ID_CEROS_STATUS_SHIFT 6
26 #define DONTREAD_CEROS_STATUS_MASK 0x3F
27 #define CEROS_ID_ROS_STATUS_MASK 0x1F
29 #define TTC_EVENT_COUNTER_MASK 0xFFFFFF
31 #define TFF_MASK 0x800000
33 #define TPX_MASK 0x400000
35 #define L1A_FIFO_OCC_MASK 0x3F0000
36 #define L1A_FIFO_OCC_SHIFT 16
37 #define EVENT_WORD_COUNT_MASK 0xFFFF
39 #define ERROR_TYPE_MASK 0xE00000
40 #define ERROR_TYPE_SHIFT 21
41 #define ERROR_ROB_ID_MASK 0x1F0000
42 #define ERROR_ROB_ID_SHIFT 16
43 #define ERROR_CEROS_ID_MASK 0x3F
45 #define ROB_ID_MASK 0x1F000000
46 #define EVENT_ID_MASK 0xFFF000
47 #define EVENT_ID_SHIFT 12
48 #define BUNCH_ID_MASK 0xFFF
49 #define WORD_COUNT_MASK 0xFFF
51 #define PC_MASK 0x8000000
53 #define PAF_MASK 0x4000000
55 #define TDC_ID_MASK 0x3000000
56 #define TDC_ID_SHIFT 24
58 #define TDC_CHANNEL_MASK 0xF80000
59 #define TDC_CHANNEL_SHIFT 19
60 #define TDC_TIME_MASK 0x7FFFC // First two bits are excluded
61 #define TDC_TIME_SHIFT 2
63 #define TDC_ERROR_MASK 0x7FFF
65 #define SCFO_MASK 0xFF
67 #define TRIGGER_WORD_COUNT_MASK 0xFFFF
69 #define TRIGGER_DATA_MASK 0xFFFF
71 #define SC_LAT_SHIFT 8
72 #define SC_LAT_MASK 0x7F
74 #define SC_NW_MASK 0xFF
76 #define SC_TRIGGERDLY_MASK 0x7
77 #define SC_TRIGGERDLY_SHIFT 12
78 #define SC_BXC_MASK 0xFFF
215 static void set(uint32_t&
word,
int ttc_event_counter) {
251 static void set(uint32_t&
word,
int tff,
int tpx,
int l1a_fifo_occ,
int event_word_count) {
282 static void set(uint32_t&
word,
int error_type,
int rob_id) {
325 static void set(uint32_t&
word,
int debug_type,
int ceros_id) {
357 static void set(uint32_t&
word,
int rob_id,
int event_id,
int bunch_id) {
389 static void set(uint32_t&
word,
int rob_id,
int event_id,
int word_count) {
424 static void set(uint32_t&
word,
int pc,
int paf,
int hu,
int tdc_id,
int event_id,
int bunch_id) {
459 static void set(uint32_t&
word,
int pc,
int paf,
int hu,
int tdc_id,
int event_id,
int word_count) {
494 static void set(uint32_t&
word,
int pc,
int paf,
int hu,
int tdc_id,
int tdc_channel,
int tdc_time) {
528 static void set(uint32_t&
word,
int pc,
int paf,
int hu,
int tdc_id,
int tdc_error) {
558 static void set(uint32_t&
word,
int event_id,
int scfo) {
587 static void set(uint32_t&
word,
int word_count) {
624 static void set(uint32_t&
word,
int sc_data) {
727 static void set(uint32_t&
word,
int lat,
int nw) {
758 static void set(uint32_t&
word,
int trigdly,
int bxcount) {
DTROSWordType(const uint32_t index)
Constructor.
int trackQuality(int first) const
int EventWordCount() const
DTLocalTriggerDataWord()
Constructor.
int opticalFiberSignalLost() const
virtual ~DTTDCErrorWord()
Destructor.
int tlkPropagationError() const
DTLocalTriggerDataWord(const uint32_t index)
#define EV_ID_CEROS_STATUS_SHIFT
virtual ~DTROSTrailerWord()
Destructor.
DTDDUFirstStatusWord(const DTDDUFirstStatusWord &obj)
DTLocalTriggerTrailerWord(const uint32_t index)
DTDDUSecondStatusWord()
Constructor.
DTDDUSecondStatusWord(const DTDDUSecondStatusWord &obj)
int outputFifoFull() const
int hasTrigger(int first) const
DTROSErrorWord(const uint32_t index)
#define SC_TRIGGERDLY_MASK
int l1AFifoOccupancy() const
#define L1A_FIFO_OCC_MASK
DTROSDebugWord(const uint32_t index)
static const uint32_t trailerControlWord
DTTDCErrorWord()
Constructor.
int eventTrailerLost() const
int getBits(int first) const
static void set(uint32_t &word, int rob_id, int event_id, int word_count)
#define ERROR_CEROS_ID_MASK
DTROBTrailerWord()
Constructor.
virtual ~DTROBTrailerWord()
Destructor.
DTTDCTrailerWord(const DTTDCTrailerWord &obj)
static void set(uint32_t &word, int word_count)
static const uint32_t tdcHeaderControlWord
#define TRIGGER_DATA_MASK
#define SC_TRIGGERDLY_SHIFT
DTDDUFirstStatusWord(const unsigned char index)
#define TTC_EVENT_COUNTER_MASK
int cerosIdRosStatus() const
DTTDCMeasurementWord()
Constructor.
virtual ~DTLocalTriggerDataWord()
Destructor.
static void set(uint32_t &word, int pc, int paf, int hu, int tdc_id, int event_id, int word_count)
int warningROSPAF() const
static const uint32_t errorControlWord
DTTDCMeasurementWord(const DTTDCMeasurementWord &obj)
DTROBTrailerWord(const uint32_t index)
static void set(uint32_t &word, int debug_type, int ceros_id)
virtual ~DTTDCTrailerWord()
Destructor.
#define TRIGGER_WORD_COUNT_MASK
#define CEROS_ID_ROS_STATUS_MASK
static const uint32_t tdcTrailerControlWord
static void set(uint32_t &word, int pc, int paf, int hu, int tdc_id, int tdc_error)
static const uint32_t scTypeWord
DTLocalTriggerDataWord(const DTLocalTriggerDataWord &obj)
DTROSWordType(const DTROSWordType &obj)
DTROBTrailerWord(const DTROBTrailerWord &obj)
virtual ~DTTDCMeasurementWord()
Destructor.
virtual ~DTDDUFirstStatusWord()
Destructor.
static void set(uint32_t &word, int error_type, int rob_id)
DTTDCTrailerWord()
Constructor.
#define DEBUG_MESSAGE_MASK
#define CEROS_ID_CEROS_STATUS_SHIFT
DTROSDebugWord(const DTROSDebugWord &obj)
#define ERROR_ROB_ID_MASK
int tdcID() const
<== OBSOLETE!!
DTTDCErrorWord(const uint32_t index)
DTROSTrailerWord(const uint32_t index)
int inputFifoAlmostFull() const
int inputFifoFull() const
#define EVENT_WORD_COUNT_MASK
DTROSDebugWord()
Constructor.
int tlkSignalLost() const
enum wordTypes type()
DDU word type getter.
virtual ~DTDDUSecondStatusWord()
Destructor.
#define DONTREAD_CEROS_STATUS_MASK
DTROSTrailerWord(const DTROSTrailerWord &obj)
static const uint32_t tdcDataControlWord
wordTypes
List of DT DDU Word Types.
static const uint32_t rosTypeWord
Word Type bits definitions.
int tdcID() const
<== OBSOLETE!!
DTTDCTrailerWord(const uint32_t index)
static void set(uint32_t &word, int pc, int paf, int hu, int tdc_id, int tdc_channel, int tdc_time)
static void set(uint32_t &word, int sc_data)
#define CEROS_ID_CEROS_STATUS_MASK
static const uint32_t debugControlWord
DTTDCErrorWord(const DTTDCErrorWord &obj)
#define EV_ID_CEROS_STATUS_MASK
int tlkPatternError() const
int outputFifoAlmostFull() const
DTROSErrorWord()
Constructor.
static void set(uint32_t &word, int tff, int tpx, int l1a_fifo_occ, int event_word_count)
int tdcID() const
<== OBSOLETE!!
#define TDC_CHANNEL_SHIFT
static const uint32_t headerControlWord
Control bits definitions.
DTLocalTriggerTrailerWord(const DTLocalTriggerTrailerWord &obj)
static void set(uint32_t &word, int debug_type)
virtual ~DTROSWordType()
Destructor.
virtual ~DTROSErrorWord()
Destructor.
int fifoAlmostFull() const
DTROSTrailerWord()
Constructor.
int channelEnabled() const
int outOfSynchROSError() const
DTROSErrorWord(const DTROSErrorWord &obj)
DTTDCMeasurementWord(const uint32_t index)
DTLocalTriggerTrailerWord()
Constructor.
DTDDUSecondStatusWord(const uint32_t index)
int cerosIdCerosStatus() const
#define ERROR_ROB_ID_SHIFT
virtual ~DTLocalTriggerTrailerWord()
Destructor.
DTDDUFirstStatusWord()
Constructor.
virtual ~DTROSDebugWord()
Destructor.
#define L1A_FIFO_OCC_SHIFT