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