EventFilter
CSCRawToDigi
src
CSCDMBHeader2013.cc
Go to the documentation of this file.
1
#include "
EventFilter/CSCRawToDigi/interface/CSCDMBHeader2013.h
"
2
#include <iostream>
3
4
CSCDMBHeader2013::CSCDMBHeader2013
() {
5
bzero(
data
(),
sizeInWords
() * 2);
6
bits
.ddu_code_1 =
bits
.ddu_code_2 =
bits
.ddu_code_3 =
bits
.ddu_code_4 = 0xA;
7
bits
.newddu_code_1 =
bits
.newddu_code_2 =
bits
.newddu_code_3 =
bits
.newddu_code_4 = 0x9;
8
}
9
10
CSCDMBHeader2013::CSCDMBHeader2013
(
const
uint16_t*
buf
) { memcpy(
data
(),
buf
,
sizeInWords
() * 2); }
11
12
unsigned
CSCDMBHeader2013::cfebMovlp
()
const
{
return
bits
.cfeb_movlp; }
13
14
unsigned
CSCDMBHeader2013::dmbCfebSync
()
const
{
return
bits
.dmb_cfeb_sync; }
15
16
unsigned
CSCDMBHeader2013::activeDavMismatch
()
const
{
return
bits
.clct_dav_mismatch; }
17
18
unsigned
CSCDMBHeader2013::format_version
()
const
{
return
bits
.fmt_version; }
19
20
unsigned
CSCDMBHeader2013::cfebAvailable
()
const
{
return
bits
.cfeb_dav; }
21
22
unsigned
CSCDMBHeader2013::nalct
()
const
{
return
bits
.alct_dav; }
23
24
unsigned
CSCDMBHeader2013::nclct
()
const
{
return
bits
.tmb_dav; }
25
26
unsigned
CSCDMBHeader2013::crateID
()
const
{
return
bits
.dmb_crate; }
27
28
unsigned
CSCDMBHeader2013::dmbID
()
const
{
return
bits
.dmb_id; }
29
30
unsigned
CSCDMBHeader2013::bxn
()
const
{
return
bits
.dmb_bxn; }
31
32
unsigned
CSCDMBHeader2013::bxn12
()
const
{
return
bits
.dmb_bxn1; }
33
34
unsigned
CSCDMBHeader2013::l1a
()
const
{
return
bits
.dmb_l1a; }
35
36
unsigned
CSCDMBHeader2013::l1a24
()
const
{
return
(
bits
.dmb_l1a_lowo | (
bits
.dmb_l1a_hiwo << 12)); }
37
38
void
CSCDMBHeader2013::setL1A
(
int
l1a) {
bits
.dmb_l1a =
l1a
& 0x1F; }
39
40
void
CSCDMBHeader2013::setL1A24
(
int
l1a) {
41
bits
.dmb_l1a_lowo =
l1a
& 0xFFF;
42
bits
.dmb_l1a_hiwo = (
l1a
>> 12) & 0xFFF;
43
}
44
45
void
CSCDMBHeader2013::setBXN
(
int
bxn) {
46
bits
.dmb_bxn1 =
bxn
& 0xFFF;
47
bits
.dmb_bxn =
bxn
& 0x1F;
48
}
49
50
void
CSCDMBHeader2013::setCrateAddress
(
int
crate,
int
dmbId) {
51
this->
bits
.dmb_crate = crate;
52
this->
bits
.dmb_id = dmbId;
53
}
54
55
unsigned
CSCDMBHeader2013::sizeInWords
()
const
{
return
8; }
56
58
bool
CSCDMBHeader2013::cfebAvailable
(
unsigned
icfeb) {
59
assert
(icfeb < 7);
60
return
(
cfebAvailable
() >> icfeb) & 1;
61
}
62
63
void
CSCDMBHeader2013::addCFEB
(
int
icfeb) {
64
assert
(icfeb < 7);
65
bits
.cfeb_dav |= (1 << icfeb);
66
bits
.cfeb_clct_sent |= (1 << icfeb);
67
}
68
69
void
CSCDMBHeader2013::addNCLCT
() {
bits
.tmb_dav =
bits
.tmb_dav_copy =
bits
.tmb_dav_copy2 = 1; }
70
71
void
CSCDMBHeader2013::addNALCT
() {
bits
.alct_dav =
bits
.alct_dav_copy =
bits
.alct_dav_copy2 = 1; }
72
73
bool
CSCDMBHeader2013::check
()
const
{
74
return
(
bits
.ddu_code_1 == 0xA &&
bits
.ddu_code_2 == 0xA &&
bits
.ddu_code_3 == 0xA &&
bits
.ddu_code_4 == 0xA &&
75
bits
.newddu_code_1 == 0x9 &&
bits
.newddu_code_2 == 0x9 &&
bits
.newddu_code_3 == 0x9 &&
76
bits
.newddu_code_4 == 0x9);
77
}
CSCDMBHeader2013::cfebAvailable
unsigned cfebAvailable() const override
Definition:
CSCDMBHeader2013.cc:20
CSCDMBHeader2013::l1a24
unsigned l1a24() const override
Definition:
CSCDMBHeader2013.cc:36
CSCDMBHeader2013::CSCDMBHeader2013
CSCDMBHeader2013()
Definition:
CSCDMBHeader2013.cc:4
CSCDMBHeader2013::bxn
unsigned bxn() const override
Definition:
CSCDMBHeader2013.cc:30
CSCDMBHeader2013::crateID
unsigned crateID() const override
Definition:
CSCDMBHeader2013.cc:26
cms::cuda::assert
assert(be >=bs)
CSCDMBHeader2013::sizeInWords
unsigned sizeInWords() const override
Definition:
CSCDMBHeader2013.cc:55
CSCDMBHeader2013::l1a
unsigned l1a() const override
Definition:
CSCDMBHeader2013.cc:34
CSCDMBHeader2013::bxn12
unsigned bxn12() const override
Definition:
CSCDMBHeader2013.cc:32
CSCDMBHeader2013::activeDavMismatch
unsigned activeDavMismatch() const override
Definition:
CSCDMBHeader2013.cc:16
CSCDMBHeader2013.h
CSCDMBHeader2013::setL1A
void setL1A(int l1a) override
Definition:
CSCDMBHeader2013.cc:38
CSCDMBHeader2013::format_version
unsigned format_version() const override
Definition:
CSCDMBHeader2013.cc:18
CSCDMBHeader2013::dmbCfebSync
unsigned dmbCfebSync() const override
Definition:
CSCDMBHeader2013.cc:14
CSCDMBHeader2013::check
bool check() const override
Definition:
CSCDMBHeader2013.cc:73
CSCDMBHeader2013::addNALCT
void addNALCT() override
Definition:
CSCDMBHeader2013.cc:71
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:154
CSCDMBHeader2013::nalct
unsigned nalct() const override
Definition:
CSCDMBHeader2013.cc:22
CSCDMBHeader2013::addCFEB
void addCFEB(int icfeb) override
Definition:
CSCDMBHeader2013.cc:63
CSCDMBHeader2013::setL1A24
void setL1A24(int l1a) override
Definition:
CSCDMBHeader2013.cc:40
CSCDMBHeader2013::dmbID
unsigned dmbID() const override
Definition:
CSCDMBHeader2013.cc:28
CSCDMBHeader2013::addNCLCT
void addNCLCT() override
Definition:
CSCDMBHeader2013.cc:69
CSCDMBHeader2013::setCrateAddress
void setCrateAddress(int crate, int dmbId) override
Definition:
CSCDMBHeader2013.cc:50
CSCDMBHeader2013::nclct
unsigned nclct() const override
Definition:
CSCDMBHeader2013.cc:24
CSCDMBHeader2013::data
unsigned short * data() override
Definition:
CSCDMBHeader2013.h:86
CSCDMBHeader2013::bits
struct CSCDMBHeader2013::@454 bits
CSCDMBHeader2013::setBXN
void setBXN(int bxn) override
Definition:
CSCDMBHeader2013.cc:45
CSCDMBHeader2013::cfebMovlp
unsigned cfebMovlp() const override
Definition:
CSCDMBHeader2013.cc:12
Generated for CMSSW Reference Manual by
1.8.16