Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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 <string.h>
// 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
(
unsigned
short
* buf);
50
/*
51
CSCDMBHeader2013(const CSCDMBStatusDigi & digi)
52
{
53
memcpy(this, digi.header(), sizeInWords()*2);
54
}
55
*/
56
virtual
bool
cfebAvailable
(
unsigned
icfeb);
57
58
virtual
void
addCFEB
(
int
icfeb);
59
virtual
void
addNCLCT
();
60
virtual
void
addNALCT
();
61
virtual
void
setBXN
(
int
bxn
);
62
virtual
void
setL1A
(
int
l1a
);
63
virtual
void
setL1A24
(
int
l1a);
64
virtual
void
setCrateAddress
(
int
crate,
int
dmbId);
65
virtual
void
setdmbID
(
int
newDMBID) {
bits
.dmb_id = newDMBID; }
66
virtual
void
setdmbVersion
(
unsigned
int
version
) {
bits
.fmt_version = (version<4) ? version: 0;}
67
68
virtual
unsigned
cfebActive
()
const
{
return
bits
.cfeb_clct_sent; }
69
virtual
unsigned
crateID
()
const
;
70
virtual
unsigned
dmbID
()
const
;
71
virtual
unsigned
bxn
()
const
;
72
virtual
unsigned
bxn12
()
const
;
73
virtual
unsigned
l1a
()
const
;
74
virtual
unsigned
l1a24
()
const
;
75
virtual
unsigned
cfebAvailable
()
const
;
76
virtual
unsigned
nalct
()
const
;
77
virtual
unsigned
nclct
()
const
;
78
virtual
unsigned
cfebMovlp
()
const
;
79
virtual
unsigned
dmbCfebSync
()
const
;
80
virtual
unsigned
activeDavMismatch
()
const
;
81
virtual
unsigned
format_version
()
const
;
82
83
unsigned
sizeInWords
()
const
;
84
85
bool
check
()
const
;
86
87
virtual
unsigned
short
*
data
() {
return
(
unsigned
short
*)(&
bits
);}
88
virtual
unsigned
short
*
data
()
const
{
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
Definition:
CSCDMBHeader2013.h:44
CSCDMBHeader2013::setL1A
virtual void setL1A(int l1a)
Definition:
CSCDMBHeader2013.cc:86
CSCDMBHeader2013::check
bool check() const
Definition:
CSCDMBHeader2013.cc:141
CSCDMBHeader2013::fmt_version
unsigned fmt_version
CLCT-DAV-Mismatch(1)
Definition:
CSCDMBHeader2013.h:107
CSCDMBHeader2013::setdmbID
virtual void setdmbID(int newDMBID)
Definition:
CSCDMBHeader2013.h:65
CSCDMBHeader2013::CSCDMBHeader2013
CSCDMBHeader2013()
Definition:
CSCDMBHeader2013.cc:5
CSCDMBHeader2013::dmb_cfeb_sync
unsigned dmb_cfeb_sync
Fmt_Vers(1:0)
Definition:
CSCDMBHeader2013.h:143
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::l1a
virtual unsigned l1a() const
Definition:
CSCDMBHeader2013.cc:76
relval_steps.version
string version
Definition:
relval_steps.py:1372
CSCDMBHeader2013::newddu_code_4
unsigned newddu_code_4
DMB_BXN[11:0].
Definition:
CSCDMBHeader2013.h:114
CSCDMBHeader2013::l1a24
virtual unsigned l1a24() const
Definition:
CSCDMBHeader2013.cc:81
CSCDMBHeader2013::setBXN
virtual void setBXN(int bxn)
Definition:
CSCDMBHeader2013.cc:98
CSCDMBHeader2013::format_version
virtual unsigned format_version() const
Definition:
CSCDMBHeader2013.cc:34
CSCDMBHeader2013::cfebActive
virtual unsigned cfebActive() const
Definition:
CSCDMBHeader2013.h:68
CSCDMBHeader2013::addNCLCT
virtual void addNCLCT()
Definition:
CSCDMBHeader2013.cc:130
CSCDMBHeader2013::fmt_version_copy2
unsigned fmt_version_copy2
CLCT-DAV-Mismatch(1)
Definition:
CSCDMBHeader2013.h:142
CSCDMBHeader2013::nclct
virtual unsigned nclct() const
Definition:
CSCDMBHeader2013.cc:51
CSCDMBHeader2013::setCrateAddress
virtual void setCrateAddress(int crate, int dmbId)
Definition:
CSCDMBHeader2013.cc:105
CSCDMBHeader2013::crateID
virtual unsigned crateID() const
Definition:
CSCDMBHeader2013.cc:56
CSCDMBHeader2013::clct_dav_mismatch_copy
unsigned clct_dav_mismatch_copy
CFEB_DAV(7:1)
Definition:
CSCDMBHeader2013.h:118
CSCDMBHeader2013::bits
struct CSCDMBHeader2013::@301 bits
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::bxn
virtual unsigned bxn() const
Definition:
CSCDMBHeader2013.cc:66
CSCDMBHeader2013::bxn12
virtual unsigned bxn12() const
Definition:
CSCDMBHeader2013.cc:71
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::addNALCT
virtual void addNALCT()
Definition:
CSCDMBHeader2013.cc:135
CSCDMBHeader2013::addCFEB
virtual void addCFEB(int icfeb)
Definition:
CSCDMBHeader2013.cc:123
CSCDMBHeader2013::newddu_code_2
unsigned newddu_code_2
DMB_L1A[23:12].
Definition:
CSCDMBHeader2013.h:102
CSCDMBStatusDigi.h
CSCDMBHeader2013::cfebAvailable
virtual unsigned cfebAvailable() const
Definition:
CSCDMBHeader2013.cc:40
CSCDMBHeader2013::dmb_crate
unsigned dmb_crate
DMB_ID(4)
Definition:
CSCDMBHeader2013.h:126
CSCDMBHeader2013::dmbCfebSync
virtual unsigned dmbCfebSync() const
Definition:
CSCDMBHeader2013.cc:24
CSCDMBHeader2013::data
virtual unsigned short * data()
Definition:
CSCDMBHeader2013.h:87
CSCDMBHeader2013::nalct
virtual unsigned nalct() const
Definition:
CSCDMBHeader2013.cc:46
CSCDMBHeader2013::activeDavMismatch
virtual unsigned activeDavMismatch() const
Definition:
CSCDMBHeader2013.cc:29
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::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::data
virtual unsigned short * data() const
Definition:
CSCDMBHeader2013.h:88
CSCDMBHeader2013::cfeb_movlp
unsigned cfeb_movlp
Definition:
CSCDMBHeader2013.h:134
CSCVDMBHeaderFormat
Definition:
CSCVDMBHeaderFormat.h:8
CSCDMBHeader2013::dmb_l1a
unsigned dmb_l1a
constant, should be '1010'
Definition:
CSCDMBHeader2013.h:140
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::cfebMovlp
virtual unsigned cfebMovlp() const
Definition:
CSCDMBHeader2013.cc:18
CSCDMBHeader2013::tmb_dav_copy2
unsigned tmb_dav_copy2
CFEB_MOVLP(5:1)
Definition:
CSCDMBHeader2013.h:135
CSCDMBHeader2013::setL1A24
virtual void setL1A24(int l1a)
Definition:
CSCDMBHeader2013.cc:91
CSCDMBHeader2013::dmbID
virtual unsigned dmbID() const
Definition:
CSCDMBHeader2013.cc:61
CSCDMBHeader2013::alct_dav
unsigned alct_dav
TMB_DAV(1)
Definition:
CSCDMBHeader2013.h:109
CSCDMBHeader2013::clct_dav_mismatch_copy2
unsigned clct_dav_mismatch_copy2
DMB_L1A[4:0].
Definition:
CSCDMBHeader2013.h:141
CSCDMBHeader2013::newddu_code_1
unsigned newddu_code_1
DMB_L1A[11:0].
Definition:
CSCDMBHeader2013.h:98
CSCDMBHeader2013::setdmbVersion
virtual void setdmbVersion(unsigned int version)
Definition:
CSCDMBHeader2013.h:66
CSCDMBHeader2013::dmb_bxn
unsigned dmb_bxn
constant, should be '1010'
Definition:
CSCDMBHeader2013.h:131
CSCDMBHeader2013::sizeInWords
unsigned sizeInWords() const
Definition:
CSCDMBHeader2013.cc:111
CSCDMBHeader2013::ddu_code_2
unsigned ddu_code_2
DMB_CRATE(8)
Definition:
CSCDMBHeader2013.h:127
Generated for CMSSW Reference Manual by
1.8.5