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