Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
EventFilter
CSCRawToDigi
src
CSCDMBHeader.cc
Go to the documentation of this file.
1
#include "
EventFilter/CSCRawToDigi/interface/CSCDMBHeader.h
"
2
#include <iostream>
3
4
5
CSCDMBHeader::CSCDMBHeader
()
6
{
7
bzero(
this
,
sizeInWords
()*2);
8
ddu_code_1
=
ddu_code_2
=
ddu_code_3
=
ddu_code_4
= 0xA;
9
newddu_code_1
=
newddu_code_2
=
newddu_code_3
=
newddu_code_4
= 0x9;
10
}
11
12
CSCDMBHeader::CSCDMBHeader
(
unsigned
short
* buf)
13
{
14
memcpy(
this
, buf,
sizeInWords
()*2);
15
}
16
17
18
unsigned
CSCDMBHeader::cfebMovlp
()
const
19
{
20
return
cfeb_movlp
;
21
}
22
23
24
unsigned
CSCDMBHeader::dmbCfebSync
()
const
25
{
26
return
dmb_cfeb_sync
;
27
}
28
29
unsigned
CSCDMBHeader::activeDavMismatch
()
const
30
{
31
return
active_dav_mismatch
;
32
}
33
34
35
unsigned
CSCDMBHeader::cfebAvailable
()
const
36
{
37
return
cfeb_dav
;
38
}
39
40
41
unsigned
CSCDMBHeader::nalct
()
const
42
{
43
return
alct_dav_1
;
44
}
45
46
unsigned
CSCDMBHeader::nclct
()
const
47
{
48
return
tmb_dav_1
;
49
}
50
51
unsigned
CSCDMBHeader::crateID
()
const
52
{
53
return
dmb_crate
;
54
}
55
56
unsigned
CSCDMBHeader::dmbID
()
const
57
{
58
return
dmb_id
;
59
}
60
61
unsigned
CSCDMBHeader::bxn
()
const
62
{
63
return
dmb_bxn
;
64
}
65
66
unsigned
CSCDMBHeader::bxn12
()
const
67
{
68
return
dmb_bxn1
;
69
}
70
71
72
73
74
unsigned
CSCDMBHeader::l1a
()
const
75
{
76
return
dmb_l1a
;
77
}
78
79
80
void
CSCDMBHeader::setL1A
(
int
l1a)
81
{
82
dmb_l1a
=
l1a
;
83
}
84
85
void
CSCDMBHeader::setBXN
(
int
bxn)
86
{
87
dmb_bxn
=
bxn
;
88
}
89
90
91
void
CSCDMBHeader::setCrateAddress
(
int
crate,
int
dmbId)
92
{
93
this->
dmb_crate
= crate;
94
this->
dmb_id
= dmbId;
95
}
96
97
unsigned
CSCDMBHeader::sizeInWords
()
const
98
{
99
return
8;
100
}
101
103
bool
CSCDMBHeader::cfebAvailable
(
unsigned
icfeb)
104
{
105
assert (icfeb < 5);
106
return
(
cfebAvailable
() >> icfeb) & 1;
107
}
108
109
void
CSCDMBHeader::addCFEB
(
int
icfeb)
110
{
111
assert(icfeb < 5);
112
cfeb_dav
|= (1 << icfeb);
113
}
114
115
void
CSCDMBHeader::addNCLCT
()
116
{
117
tmb_dav_1
=
tmb_dav_2
=
tmb_dav_4
= 1;
118
}
119
120
void
CSCDMBHeader::addNALCT
()
121
{
122
alct_dav_1
=
alct_dav_2
=
alct_dav_4
= 1;
123
}
124
125
126
bool
CSCDMBHeader::check
()
const
127
{
128
return
(
ddu_code_1
==0xA &&
ddu_code_2
==0xA &&
129
ddu_code_3
==0xA &&
ddu_code_4
==0xA &&
130
newddu_code_1
==0x9 &&
newddu_code_2
==0x9 &&
131
newddu_code_3
==0x9 &&
newddu_code_4
==0x9);
132
}
133
CSCDMBHeader::active_dav_mismatch
unsigned active_dav_mismatch
Definition:
CSCDMBHeader.h:78
CSCDMBHeader::tmb_dav_1
unsigned tmb_dav_1
Definition:
CSCDMBHeader.h:79
CSCDMBHeader::check
bool check() const
Definition:
CSCDMBHeader.cc:126
CSCDMBHeader::l1a
unsigned l1a() const
Definition:
CSCDMBHeader.cc:74
CSCDMBHeader::nclct
unsigned nclct() const
Definition:
CSCDMBHeader.cc:46
CSCDMBHeader::newddu_code_3
unsigned newddu_code_3
constant, should be 1001
Definition:
CSCDMBHeader.h:69
CSCDMBHeader::addNCLCT
void addNCLCT()
Definition:
CSCDMBHeader.cc:115
CSCDMBHeader::dmb_crate
unsigned dmb_crate
Definition:
CSCDMBHeader.h:88
CSCDMBHeader::nalct
unsigned nalct() const
Definition:
CSCDMBHeader.cc:41
CSCDMBHeader::setL1A
void setL1A(int l1a)
Definition:
CSCDMBHeader.cc:80
CSCDMBHeader::cfebMovlp
unsigned cfebMovlp() const
Definition:
CSCDMBHeader.cc:18
CSCDMBHeader::tmb_dav_2
unsigned tmb_dav_2
Definition:
CSCDMBHeader.h:83
CSCDMBHeader::setBXN
void setBXN(int bxn)
Definition:
CSCDMBHeader.cc:85
CSCDMBHeader::dmb_l1a
unsigned dmb_l1a
Definition:
CSCDMBHeader.h:102
CSCDMBHeader::alct_dav_1
unsigned alct_dav_1
Definition:
CSCDMBHeader.h:77
CSCDMBHeader::alct_dav_4
unsigned alct_dav_4
Definition:
CSCDMBHeader.h:66
CSCDMBHeader::newddu_code_2
unsigned newddu_code_2
constant, should be 1001
Definition:
CSCDMBHeader.h:62
CSCDMBHeader::cfeb_movlp
unsigned cfeb_movlp
Definition:
CSCDMBHeader.h:98
CSCDMBHeader::ddu_code_1
unsigned ddu_code_1
constant, should be '1010'
Definition:
CSCDMBHeader.h:85
CSCDMBHeader::sizeInWords
unsigned sizeInWords() const
Definition:
CSCDMBHeader.cc:97
CSCDMBHeader.h
CSCDMBHeader::addCFEB
void addCFEB(int icfeb)
Definition:
CSCDMBHeader.cc:109
CSCDMBHeader::bxn12
unsigned bxn12() const
Definition:
CSCDMBHeader.cc:66
CSCDMBHeader::newddu_code_4
unsigned newddu_code_4
constant, should be 1001
Definition:
CSCDMBHeader.h:74
CSCDMBHeader::ddu_code_2
unsigned ddu_code_2
constant, should be '1010'
Definition:
CSCDMBHeader.h:90
CSCDMBHeader::setCrateAddress
void setCrateAddress(int crate, int dmbId)
Definition:
CSCDMBHeader.cc:91
CSCDMBHeader::dmb_bxn1
unsigned dmb_bxn1
Definition:
CSCDMBHeader.h:72
CSCDMBHeader::CSCDMBHeader
CSCDMBHeader()
Definition:
CSCDMBHeader.cc:5
CSCDMBHeader::alct_dav_2
unsigned alct_dav_2
Definition:
CSCDMBHeader.h:81
CSCDMBHeader::bxn
unsigned bxn() const
Definition:
CSCDMBHeader.cc:61
CSCDMBHeader::crateID
unsigned crateID() const
Definition:
CSCDMBHeader.cc:51
CSCDMBHeader::tmb_dav_4
unsigned tmb_dav_4
Definition:
CSCDMBHeader.h:67
CSCDMBHeader::dmb_bxn
unsigned dmb_bxn
Definition:
CSCDMBHeader.h:95
CSCDMBHeader::cfebAvailable
unsigned cfebAvailable() const
Definition:
CSCDMBHeader.cc:35
CSCDMBHeader::dmbID
unsigned dmbID() const
Definition:
CSCDMBHeader.cc:56
CSCDMBHeader::cfeb_dav
unsigned cfeb_dav
Definition:
CSCDMBHeader.h:76
CSCDMBHeader::dmb_id
unsigned dmb_id
Definition:
CSCDMBHeader.h:87
CSCDMBHeader::activeDavMismatch
unsigned activeDavMismatch() const
Definition:
CSCDMBHeader.cc:29
CSCDMBHeader::ddu_code_3
unsigned ddu_code_3
constant, should be '1010'
Definition:
CSCDMBHeader.h:100
CSCDMBHeader::newddu_code_1
unsigned newddu_code_1
constant, should be 1001
Definition:
CSCDMBHeader.h:58
CSCDMBHeader::ddu_code_4
unsigned ddu_code_4
constant, should be '1010'
Definition:
CSCDMBHeader.h:105
CSCDMBHeader::addNALCT
void addNALCT()
Definition:
CSCDMBHeader.cc:120
CSCDMBHeader::dmbCfebSync
unsigned dmbCfebSync() const
Definition:
CSCDMBHeader.cc:24
CSCDMBHeader::dmb_cfeb_sync
unsigned dmb_cfeb_sync
Definition:
CSCDMBHeader.h:103
Generated for CMSSW Reference Manual by
1.8.5