Main Page
Namespaces
Classes
Package Documentation
EventFilter
CSCRawToDigi
interface
CSCDMBHeader2013.h
Go to the documentation of this file.
1
#ifndef CSCDMBHeader2013_h
2
#define CSCDMBHeader2013_h
3
4
/*
5
DMB-DDU 2013 Header/Trailer bit definitions (some bits get repeated for bit error mitigation)
6
7
DMB_L1A: L1A Event Number, count from DMB
8
DMB_BXN: Bunch Crossing Number, count from DMB
9
TMB_DAV: non-zero indicates TMB data exists for this event
10
ALCT_DAV: non-zero indicates ALCT data exists for this event
11
CFEB_CLCT_SENT: indicates which CFEBs should have sent data to DMB
12
CFEB_DAV: indicates which CFEBs have sent data to DMB
13
CLCT-DAV-Mismatch: the CFEB_DAVs do not match the CLCTs sent
14
DMB_CRATE: peripheral crate ID from DMB
15
DMB_ID: board number of DMB
16
CFEB_MOVLP: the time sample for this event has multiple overlaps with samples from previous events
17
DMB-CFEB-Sync: bits used for DMB-CFEB synchronization check
18
ALCT_HALF: zero indicates that the ALCT FIFO on the DMB is half-full
19
TMB_HALF: zero indicates that the TMB FIFO on the DMB is half-full
20
CFEB_HALF: zero indicates that the CFEB FIFO on the DMB is half-full
21
DMB_L1PIPE: number of L1A Events backed-up in the DMB
22
ALCT_EMPTY: one indicates that the ALCT FIFO on the DMB is empty
23
TMB_EMPTY: one indicates that the TMB FIFO on the DMB is empty
24
CFEB_EMPTY: one indicates that the CFEB FIFO on the DMB is empty
25
ALCT_Start_Timeout: indicates that the start of ALCT data was not detected within the time-out period
26
TMB_Start_Timeout: indicates that the start of TMB data was not detected within the time-out period
27
CFEB_Start_Timeout: indicates that the start of CFEB data was not detected within the time-out period.
28
CFEB_End_Timeout: indicates that the end of CFEB data was not detected within the time-out period
29
ALCT_End_Timeout: indicates that the end of ALCT data was not detected within the time-out period
30
TMB_End_Timeout: indicates that the end of TMB data was not detected within the time-out period
31
ALCT_FULL: one indicates that the ALCT FIFO on the DMB is full
32
TMB_FULL: one indicates that the TMB FIFO on the DMB is full
33
CFEB_FULL: one indicates that the CFEB FIFO on the DMB is full
34
DMB_CRC: each DMB generates a 22-bit CRC that encompasses all CSC data from the first 9-code to the last F-code in the event
35
*/
36
37
38
#include <cassert>
39
#include <iosfwd>
40
#include <cstring>
// bzero
41
#include "
DataFormats/CSCDigi/interface/CSCDMBStatusDigi.h
"
42
#include "
EventFilter/CSCRawToDigi/interface/CSCVDMBHeaderFormat.h
"
43
44
struct
CSCDMBHeader2013
:
public
CSCVDMBHeaderFormat
{
45
// public:
46
47
CSCDMBHeader2013
();
48
49
CSCDMBHeader2013
(
const
uint16_t * buf);
50
/*
51
CSCDMBHeader2013(const CSCDMBStatusDigi & digi)
52
{
53
memcpy(this, digi.header(), sizeInWords()*2);
54
}
55
*/
56
bool
cfebAvailable
(
unsigned
icfeb)
override
;
57
58
void
addCFEB
(
int
icfeb)
override
;
59
void
addNCLCT
()
override
;
60
void
addNALCT
()
override
;
61
void
setBXN
(
int
bxn
)
override
;
62
void
setL1A
(
int
l1a
)
override
;
63
void
setL1A24
(
int
l1a)
override
;
64
void
setCrateAddress
(
int
crate,
int
dmbId)
override
;
65
void
setdmbID
(
int
newDMBID)
override
{
bits
.dmb_id = newDMBID; }
66
void
setdmbVersion
(
unsigned
int
version
)
override
{
bits
.fmt_version = (version<4) ? version: 0;}
67
68
unsigned
cfebActive
()
const override
{
return
bits
.cfeb_clct_sent; }
69
unsigned
crateID
()
const override
;
70
unsigned
dmbID
()
const override
;
71
unsigned
bxn
()
const override
;
72
unsigned
bxn12
()
const override
;
73
unsigned
l1a
()
const override
;
74
unsigned
l1a24
()
const override
;
75
unsigned
cfebAvailable
()
const override
;
76
unsigned
nalct
()
const override
;
77
unsigned
nclct
()
const override
;
78
unsigned
cfebMovlp
()
const override
;
79
unsigned
dmbCfebSync
()
const override
;
80
unsigned
activeDavMismatch
()
const override
;
81
unsigned
format_version
()
const override
;
82
83
unsigned
sizeInWords
()
const override
;
84
85
bool
check
()
const override
;
86
87
unsigned
short
*
data
()
override
{
return
(
unsigned
short
*)(&
bits
);}
88
unsigned
short
*
data
()
const override
{
return
(
unsigned
short
*)(&
bits
);}
89
90
91
//ostream & operator<<(ostream &, const CSCDMBHeader &);
92
93
// private:
94
95
struct
{
97
unsigned
dmb_l1a_lowo
: 12;
98
unsigned
newddu_code_1
: 4;
99
101
unsigned
dmb_l1a_hiwo
: 12;
102
unsigned
newddu_code_2
: 4;
103
105
unsigned
cfeb_clct_sent
: 7;
106
unsigned
clct_dav_mismatch
: 1;
107
unsigned
fmt_version
: 2;
108
unsigned
tmb_dav
: 1;
109
unsigned
alct_dav
: 1;
110
unsigned
newddu_code_3
: 4;
111
113
unsigned
dmb_bxn1
: 12;
114
unsigned
newddu_code_4
: 4;
115
117
unsigned
cfeb_dav
: 7;
118
unsigned
clct_dav_mismatch_copy
: 1;
119
unsigned
fmt_version_copy
: 2;
120
unsigned
tmb_dav_copy
: 1;
121
unsigned
alct_dav_copy
: 1;
122
unsigned
ddu_code_1
: 4;
123
125
unsigned
dmb_id
: 4;
126
unsigned
dmb_crate
: 8;
127
unsigned
ddu_code_2
: 4;
128
129
131
unsigned
dmb_bxn
: 5;
132
unsigned
cfeb_movlp
: 5;
135
unsigned
tmb_dav_copy2
: 1;
136
unsigned
alct_dav_copy2
: 1;
137
unsigned
ddu_code_3
: 4;
138
140
unsigned
dmb_l1a
: 5;
141
unsigned
clct_dav_mismatch_copy2
: 1;
142
unsigned
fmt_version_copy2
: 2;
143
unsigned
dmb_cfeb_sync
: 4;
144
unsigned
ddu_code_4
: 4;
145
}
bits
;
146
147
148
};
149
150
#endif
151
CSCDMBHeader2013::bits
struct CSCDMBHeader2013::@424 bits
CSCDMBHeader2013
Definition:
CSCDMBHeader2013.h:44
CSCDMBHeader2013::dmbID
unsigned dmbID() const override
Definition:
CSCDMBHeader2013.cc:61
CSCDMBHeader2013::fmt_version
unsigned fmt_version
CLCT-DAV-Mismatch(1)
Definition:
CSCDMBHeader2013.h:107
CSCDMBHeader2013::CSCDMBHeader2013
CSCDMBHeader2013()
Definition:
CSCDMBHeader2013.cc:5
CSCDMBHeader2013::setdmbID
void setdmbID(int newDMBID) override
Definition:
CSCDMBHeader2013.h:65
CSCDMBHeader2013::dmb_cfeb_sync
unsigned dmb_cfeb_sync
Fmt_Vers(1:0)
Definition:
CSCDMBHeader2013.h:143
CSCDMBHeader2013::cfebAvailable
unsigned cfebAvailable() const override
Definition:
CSCDMBHeader2013.cc:40
CSCVDMBHeaderFormat.h
CSCDMBHeader2013::dmb_l1a_lowo
unsigned dmb_l1a_lowo
1st Header word
Definition:
CSCDMBHeader2013.h:97
CSCDMBHeader2013::fmt_version_copy
unsigned fmt_version_copy
CLCT-DAV-Mismatch(1)
Definition:
CSCDMBHeader2013.h:119
CSCDMBHeader2013::newddu_code_4
unsigned newddu_code_4
DMB_BXN[11:0].
Definition:
CSCDMBHeader2013.h:114
CSCDMBHeader2013::sizeInWords
unsigned sizeInWords() const override
Definition:
CSCDMBHeader2013.cc:111
CSCDMBHeader2013::fmt_version_copy2
unsigned fmt_version_copy2
CLCT-DAV-Mismatch(1)
Definition:
CSCDMBHeader2013.h:142
CSCDMBHeader2013::cfebMovlp
unsigned cfebMovlp() const override
Definition:
CSCDMBHeader2013.cc:18
CSCDMBHeader2013::clct_dav_mismatch_copy
unsigned clct_dav_mismatch_copy
CFEB_DAV(7:1)
Definition:
CSCDMBHeader2013.h:118
CSCDMBHeader2013::check
bool check() const override
Definition:
CSCDMBHeader2013.cc:141
CSCDMBHeader2013::ddu_code_4
unsigned ddu_code_4
DMB-CFEB-Sync[3:0].
Definition:
CSCDMBHeader2013.h:144
CSCDMBHeader2013::tmb_dav_copy
unsigned tmb_dav_copy
Fmt_Vers(1:0)
Definition:
CSCDMBHeader2013.h:120
CSCDMBHeader2013::cfebActive
unsigned cfebActive() const override
Definition:
CSCDMBHeader2013.h:68
CSCDMBHeader2013::data
unsigned short * data() const override
Definition:
CSCDMBHeader2013.h:88
jets_cff.version
version
Definition:
jets_cff.py:20
CSCDMBHeader2013::setL1A
void setL1A(int l1a) override
Definition:
CSCDMBHeader2013.cc:86
CSCDMBHeader2013::ddu_code_1
unsigned ddu_code_1
ALCT_DAV(1)
Definition:
CSCDMBHeader2013.h:122
CSCDMBHeader2013::tmb_dav
unsigned tmb_dav
Fmt_Vers(1:0)
Definition:
CSCDMBHeader2013.h:108
CSCDMBHeader2013::dmb_bxn1
unsigned dmb_bxn1
constant, should be 1001
Definition:
CSCDMBHeader2013.h:113
CSCDMBHeader2013::alct_dav_copy2
unsigned alct_dav_copy2
TMB_DAV(1)
Definition:
CSCDMBHeader2013.h:136
CSCDMBHeader2013::format_version
unsigned format_version() const override
Definition:
CSCDMBHeader2013.cc:34
CSCDMBHeader2013::newddu_code_2
unsigned newddu_code_2
DMB_L1A[23:12].
Definition:
CSCDMBHeader2013.h:102
CSCDMBStatusDigi.h
CSCDMBHeader2013::dmb_crate
unsigned dmb_crate
DMB_ID(4)
Definition:
CSCDMBHeader2013.h:126
CSCDMBHeader2013::addNALCT
void addNALCT() override
Definition:
CSCDMBHeader2013.cc:135
CSCDMBHeader2013::cfeb_dav
unsigned cfeb_dav
constant, should be 1001
Definition:
CSCDMBHeader2013.h:117
CSCDMBHeader2013::ddu_code_3
unsigned ddu_code_3
ALCT_DAV(1)
Definition:
CSCDMBHeader2013.h:137
CSCDMBHeader2013::l1a
unsigned l1a() const override
Definition:
CSCDMBHeader2013.cc:76
CSCDMBHeader2013::newddu_code_3
unsigned newddu_code_3
ALCT_DAV(1)
Definition:
CSCDMBHeader2013.h:110
CSCDMBHeader2013::dmb_l1a_hiwo
unsigned dmb_l1a_hiwo
constant, should be 1001
Definition:
CSCDMBHeader2013.h:101
CSCDMBHeader2013::alct_dav_copy
unsigned alct_dav_copy
TMB_DAV(1)
Definition:
CSCDMBHeader2013.h:121
CSCDMBHeader2013::setL1A24
void setL1A24(int l1a) override
Definition:
CSCDMBHeader2013.cc:91
CSCDMBHeader2013::activeDavMismatch
unsigned activeDavMismatch() const override
Definition:
CSCDMBHeader2013.cc:29
CSCDMBHeader2013::addCFEB
void addCFEB(int icfeb) override
Definition:
CSCDMBHeader2013.cc:123
CSCDMBHeader2013::cfeb_movlp
unsigned cfeb_movlp
Definition:
CSCDMBHeader2013.h:134
CSCVDMBHeaderFormat
Definition:
CSCVDMBHeaderFormat.h:8
CSCDMBHeader2013::setdmbVersion
void setdmbVersion(unsigned int version) override
Definition:
CSCDMBHeader2013.h:66
CSCDMBHeader2013::dmb_l1a
unsigned dmb_l1a
constant, should be '1010'
Definition:
CSCDMBHeader2013.h:140
CSCDMBHeader2013::nclct
unsigned nclct() const override
Definition:
CSCDMBHeader2013.cc:51
CSCDMBHeader2013::clct_dav_mismatch
unsigned clct_dav_mismatch
CFEB_CLCT_SENT(7:1)
Definition:
CSCDMBHeader2013.h:106
CSCDMBHeader2013::dmb_id
unsigned dmb_id
constant, should be '1010'
Definition:
CSCDMBHeader2013.h:125
CSCDMBHeader2013::cfeb_clct_sent
unsigned cfeb_clct_sent
constant, should be 1001
Definition:
CSCDMBHeader2013.h:105
CSCDMBHeader2013::dmbCfebSync
unsigned dmbCfebSync() const override
Definition:
CSCDMBHeader2013.cc:24
CSCDMBHeader2013::bxn
unsigned bxn() const override
Definition:
CSCDMBHeader2013.cc:66
CSCDMBHeader2013::tmb_dav_copy2
unsigned tmb_dav_copy2
CFEB_MOVLP(5:1)
Definition:
CSCDMBHeader2013.h:135
CSCDMBHeader2013::nalct
unsigned nalct() const override
Definition:
CSCDMBHeader2013.cc:46
CSCDMBHeader2013::l1a24
unsigned l1a24() const override
Definition:
CSCDMBHeader2013.cc:81
CSCDMBHeader2013::alct_dav
unsigned alct_dav
TMB_DAV(1)
Definition:
CSCDMBHeader2013.h:109
CSCDMBHeader2013::data
unsigned short * data() override
Definition:
CSCDMBHeader2013.h:87
CSCDMBHeader2013::bxn12
unsigned bxn12() const override
Definition:
CSCDMBHeader2013.cc:71
CSCDMBHeader2013::clct_dav_mismatch_copy2
unsigned clct_dav_mismatch_copy2
DMB_L1A[4:0].
Definition:
CSCDMBHeader2013.h:141
CSCDMBHeader2013::setBXN
void setBXN(int bxn) override
Definition:
CSCDMBHeader2013.cc:98
CSCDMBHeader2013::newddu_code_1
unsigned newddu_code_1
DMB_L1A[11:0].
Definition:
CSCDMBHeader2013.h:98
CSCDMBHeader2013::addNCLCT
void addNCLCT() override
Definition:
CSCDMBHeader2013.cc:130
CSCDMBHeader2013::crateID
unsigned crateID() const override
Definition:
CSCDMBHeader2013.cc:56
CSCDMBHeader2013::setCrateAddress
void setCrateAddress(int crate, int dmbId) override
Definition:
CSCDMBHeader2013.cc:105
CSCDMBHeader2013::dmb_bxn
unsigned dmb_bxn
constant, should be '1010'
Definition:
CSCDMBHeader2013.h:131
CSCDMBHeader2013::ddu_code_2
unsigned ddu_code_2
DMB_CRATE(8)
Definition:
CSCDMBHeader2013.h:127
Generated for CMSSW Reference Manual by
1.8.11