Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
EventFilter
CSCRawToDigi
interface
CSCALCTHeader.h
Go to the documentation of this file.
1
#ifndef CSCALCTHeader_h
2
#define CSCALCTHeader_h
3
7
#include <bitset>
8
#include <vector>
9
#include <iosfwd>
10
#include "
DataFormats/CSCDigi/interface/CSCALCTDigi.h
"
11
#include "
DataFormats/CSCDigi/interface/CSCALCTStatusDigi.h
"
12
#include "
EventFilter/CSCRawToDigi/interface/CSCALCTHeader2006.h
"
13
#include "
EventFilter/CSCRawToDigi/interface/CSCALCTHeader2007.h
"
14
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
15
#include "
FWCore/Utilities/interface/Exception.h
"
16
#include <boost/dynamic_bitset.hpp>
17
18
class
CSCALCTHeader
{
19
public
:
20
explicit
CSCALCTHeader
(
int
chamberType);
21
22
explicit
CSCALCTHeader
(
const
unsigned
short
* buf);
23
24
CSCALCTHeader
(
const
CSCALCTStatusDigi
& digi);
25
27
static
void
setDebug
(
bool
value
){
debug
=
value
;};
28
29
void
setEventInformation
(
const
CSCDMBHeader
&);
30
unsigned
short
int
nLCTChipRead
()
const
;
31
32
std::vector<CSCALCTDigi>
ALCTDigis
()
const
;
33
36
37
enum
FIFO_MODE
{
NO_DUMP
,
FULL_DUMP
,
LOCAL_DUMP
};
38
unsigned
short
int
FIFOMode
()
const
{
return
header2006
.
fifoMode
;}
39
unsigned
short
int
NTBins
()
const
{
40
switch
(
firmwareVersion
)
41
{
42
case
2006:
43
return
header2006
.
nTBins
;
44
case
2007:
45
return
header2007
.
rawBins
;
46
default
:
47
edm::LogError
(
"CSCALCTHeader|CSCRawToDigi"
)
48
<<
"trying to access NTBINs: ALCT firmware version is bad/not defined!"
;
49
return
0;
50
}
51
}
52
unsigned
short
int
BoardID
()
const
{
return
header2006
.
boardID
;}
53
unsigned
short
int
ExtTrig
()
const
{
return
header2006
.
extTrig
;}
54
unsigned
short
int
CSCID
()
const
{
return
header2006
.
cscID
;}
55
unsigned
short
int
BXNCount
()
const
{
56
switch
(
firmwareVersion
)
57
{
58
case
2006:
59
return
header2006
.
bxnCount
;
60
case
2007:
61
return
header2007
.
bxnCount
;
62
default
:
63
edm::LogError
(
"CSCALCTHeader|CSCRawToDigi"
)
64
<<
"trying to access BXNcount: ALCT firmware version is bad/not defined!"
;
65
return
0;
66
}
67
}
68
unsigned
short
int
L1Acc
()
const
{
69
switch
(
firmwareVersion
)
70
{
71
case
2006:
72
return
header2006
.
l1Acc
;
73
case
2007:
74
return
header2007
.
l1aCounter
;
75
default
:
76
edm::LogError
(
"CSCALCTHeader|CSCRawToDigi"
)
77
<<
"trying to access L1Acc: ALCT firmware version is bad/not defined!"
;
78
return
0;
79
}
80
}
81
unsigned
short
int
L1AMatch
()
const
{
return
header2006
.
l1aMatch
;}
82
unsigned
short
int
ActiveFEBs
()
const
{
return
header2006
.
activeFEBs
;}
83
unsigned
short
int
Promote1
()
const
{
return
header2006
.
promote1
;}
84
unsigned
short
int
Promote2
()
const
{
return
header2006
.
promote2
;}
85
unsigned
short
int
LCTChipRead
()
const
{
return
header2006
.
lctChipRead
;}
86
unsigned
short
int
alctFirmwareVersion
()
const
{
return
firmwareVersion
;}
87
void
setDAVForChannel
(
int
wireGroup) {
88
if
(
firmwareVersion
== 2006) {
89
header2006
.
setDAV
((wireGroup-1)/16);
90
}
91
}
92
CSCALCTHeader2007
alctHeader2007
()
const
{
return
header2007
;}
93
CSCALCTHeader2006
alctHeader2006
()
const
{
return
header2006
;}
94
95
unsigned
short
int
*
data
() {
return
theOriginalBuffer
;}
96
98
int
sizeInWords
() {
99
switch
(
firmwareVersion
)
100
{
101
case
2006:
102
return
8;
103
case
2007:
104
return
sizeInWords2007_
;
105
default
:
106
edm::LogError
(
"CSCALCTHeader|CSCRawToDigi"
)
107
<<
"SizeInWords(): ALCT firmware version is bad/not defined!"
;
108
return
0;
109
}
110
}
111
112
bool
check
()
const
{
113
switch
(
firmwareVersion
)
114
{
115
case
2006:
116
return
header2006
.
flag_0
== 0xC;
117
case
2007:
118
return
header2007
.
flag1
== 0xDB0A;
119
default
:
120
edm::LogError
(
"CSCALCTHeader|CSCRawToDigi"
)
121
<<
"check(): ALCT firmware version is bad/not defined!"
;
122
return
0;
123
}
124
}
125
126
void
add
(
const
std::vector<CSCALCTDigi> & digis);
127
128
boost::dynamic_bitset<>
pack
();
129
131
static
void
selfTest
(
int
firmware);
132
133
private
:
134
CSCALCTHeader2006
header2006
;
135
CSCALCTHeader2007
header2007
;
136
std::vector<CSCALCT>
theALCTs
;
137
CSCALCTs2006
alcts2006
;
138
CSCVirtexID
virtexID
;
139
CSCConfigurationRegister
configRegister
;
140
std::vector<CSCCollisionMask>
collisionMasks
;
141
std::vector<CSCHotChannelMask>
hotChannelMasks
;
142
143
//raw data also stored in this buffer
144
//maximum header size is 116 words
145
unsigned
short
int
theOriginalBuffer
[116];
146
147
static
bool
debug
;
148
static
unsigned
short
int
firmwareVersion
;
149
151
unsigned
short
int
sizeInWords2007_
,
bxn0
,
bxn1
;
152
};
153
154
std::ostream &
operator<<
(std::ostream & os,
const
CSCALCTHeader
& header);
155
156
#endif
157
CSCALCTHeader::L1AMatch
unsigned short int L1AMatch() const
Definition:
CSCALCTHeader.h:81
CSCALCTHeader
Definition:
CSCALCTHeader.h:18
CSCALCTHeader2006::bxnCount
unsigned bxnCount
full bunch crossing number
Definition:
CSCALCTHeader2006.h:60
CSCALCTHeader2006::fifoMode
unsigned fifoMode
see the FIFO_MODE enum
Definition:
CSCALCTHeader2006.h:43
CSCALCTHeader::LCTChipRead
unsigned short int LCTChipRead() const
Definition:
CSCALCTHeader.h:85
MessageLogger.h
CSCALCTHeader::hotChannelMasks
std::vector< CSCHotChannelMask > hotChannelMasks
Definition:
CSCALCTHeader.h:141
CSCALCTHeader::collisionMasks
std::vector< CSCCollisionMask > collisionMasks
Definition:
CSCALCTHeader.h:140
CSCALCTStatusDigi.h
CSCALCTHeader2006::promote1
unsigned promote1
promotion bit for 1st LCT pattern
Definition:
CSCALCTHeader2006.h:51
CSCALCTHeader::virtexID
CSCVirtexID virtexID
Definition:
CSCALCTHeader.h:138
CSCALCTHeader::bxn1
unsigned short int bxn1
Definition:
CSCALCTHeader.h:151
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
CSCALCTHeader::nLCTChipRead
unsigned short int nLCTChipRead() const
for packing
Definition:
CSCALCTHeader.cc:124
CSCALCTHeader::NO_DUMP
Definition:
CSCALCTHeader.h:37
CSCALCTHeader2007::flag1
unsigned flag1
Definition:
CSCALCTHeader2007.h:41
CSCALCTStatusDigi
Definition:
CSCALCTStatusDigi.h:17
CSCALCTHeader::LOCAL_DUMP
Definition:
CSCALCTHeader.h:37
CSCALCTHeader::firmwareVersion
static unsigned short int firmwareVersion
Definition:
CSCALCTHeader.h:148
CSCALCTHeader::configRegister
CSCConfigurationRegister configRegister
Definition:
CSCALCTHeader.h:139
CSCALCTHeader::CSCALCTHeader
CSCALCTHeader(int chamberType)
Definition:
CSCALCTHeader.cc:11
CSCALCTHeader::check
bool check() const
Definition:
CSCALCTHeader.h:112
CSCALCTHeader::alcts2006
CSCALCTs2006 alcts2006
Definition:
CSCALCTHeader.h:137
CSCALCTHeader2007
Definition:
CSCALCTHeader2007.h:31
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:187
CSCALCTHeader::setEventInformation
void setEventInformation(const CSCDMBHeader &)
Definition:
CSCALCTHeader.cc:119
CSCALCTHeader::selfTest
static void selfTest(int firmware)
tests that we unpack what we packed
Definition:
CSCALCTHeader.cc:243
CSCALCTHeader2006::extTrig
unsigned extTrig
trigger source was external
Definition:
CSCALCTHeader2006.h:49
CSCALCTHeader::FIFO_MODE
FIFO_MODE
Definition:
CSCALCTHeader.h:37
CSCALCTHeader::alctHeader2007
CSCALCTHeader2007 alctHeader2007() const
Definition:
CSCALCTHeader.h:92
CSCALCTHeader::CSCID
unsigned short int CSCID() const
Definition:
CSCALCTHeader.h:54
CSCConfigurationRegister
Definition:
CSCALCTHeader2007.h:99
CSCALCTHeader::theOriginalBuffer
unsigned short int theOriginalBuffer[116]
Definition:
CSCALCTHeader.h:145
CSCALCTHeader::ActiveFEBs
unsigned short int ActiveFEBs() const
Definition:
CSCALCTHeader.h:82
CSCALCTHeader::header2006
CSCALCTHeader2006 header2006
Definition:
CSCALCTHeader.h:134
edm::LogError
Definition:
MessageLogger.h:164
CSCALCTDigi.h
CSCALCTHeader::ExtTrig
unsigned short int ExtTrig() const
Definition:
CSCALCTHeader.h:53
CSCALCTHeader::debug
static bool debug
Definition:
CSCALCTHeader.h:147
CSCALCTHeader::FULL_DUMP
Definition:
CSCALCTHeader.h:37
CSCALCTHeader2006
ALCT Header consists of several modular units that are defined as structs below.
Definition:
CSCALCTHeader2006.h:10
CSCALCTHeader::theALCTs
std::vector< CSCALCT > theALCTs
Definition:
CSCALCTHeader.h:136
CSCALCTHeader::add
void add(const std::vector< CSCALCTDigi > &digis)
Definition:
CSCALCTHeader.cc:169
CSCALCTHeader::header2007
CSCALCTHeader2007 header2007
Definition:
CSCALCTHeader.h:135
CSCALCTHeader::pack
boost::dynamic_bitset pack()
Definition:
CSCALCTHeader.cc:211
CSCALCTHeader2006::nTBins
unsigned nTBins
of 25 ns time bins in the raw dump
Definition:
CSCALCTHeader2006.h:45
CSCALCTHeader2007::l1aCounter
unsigned l1aCounter
Definition:
CSCALCTHeader2007.h:46
CSCALCTHeader::sizeInWords2007_
unsigned short int sizeInWords2007_
size of the 2007 header in words
Definition:
CSCALCTHeader.h:151
CSCALCTHeader2007::bxnCount
unsigned bxnCount
Definition:
CSCALCTHeader2007.h:52
CSCALCTHeader::Promote2
unsigned short int Promote2() const
Definition:
CSCALCTHeader.h:84
CSCALCTHeader::sizeInWords
int sizeInWords()
in 16-bit words
Definition:
CSCALCTHeader.h:98
CSCALCTHeader::ALCTDigis
std::vector< CSCALCTDigi > ALCTDigis() const
Definition:
CSCALCTHeader.cc:138
CSCALCTHeader2006.h
Exception.h
CSCALCTHeader::Promote1
unsigned short int Promote1() const
Definition:
CSCALCTHeader.h:83
CSCALCTHeader2007::rawBins
unsigned rawBins
Definition:
CSCALCTHeader2007.h:72
CSCALCTHeader::alctFirmwareVersion
unsigned short int alctFirmwareVersion() const
Definition:
CSCALCTHeader.h:86
CSCALCTHeader::bxn0
unsigned short int bxn0
Definition:
CSCALCTHeader.h:151
CSCVirtexID
Definition:
CSCALCTHeader2007.h:78
CSCALCTHeader::setDebug
static void setDebug(bool value)
to access data by via status digis
Definition:
CSCALCTHeader.h:27
CSCALCTHeader::L1Acc
unsigned short int L1Acc() const
Definition:
CSCALCTHeader.h:68
CSCALCTHeader2006::l1Acc
unsigned l1Acc
l1 accept counter
Definition:
CSCALCTHeader2006.h:34
CSCALCTHeader2006::promote2
unsigned promote2
promotion bit for 2nd LCT pattern
Definition:
CSCALCTHeader2006.h:53
CSCALCTHeader::FIFOMode
unsigned short int FIFOMode() const
Definition:
CSCALCTHeader.h:38
CSCALCTHeader2007.h
CSCALCTHeader2006::boardID
unsigned boardID
ALCT2000 board ID.
Definition:
CSCALCTHeader2006.h:38
CSCALCTHeader::NTBins
unsigned short int NTBins() const
Definition:
CSCALCTHeader.h:39
CSCALCTHeader2006::lctChipRead
unsigned lctChipRead
LCT chips read out in raw hit dump.
Definition:
CSCALCTHeader2006.h:67
CSCALCTHeader2006::activeFEBs
unsigned activeFEBs
LCT chips with ADB hits.
Definition:
CSCALCTHeader2006.h:69
CSCALCTs2006
Definition:
CSCALCTHeader2006.h:76
CSCALCTHeader::alctHeader2006
CSCALCTHeader2006 alctHeader2006() const
Definition:
CSCALCTHeader.h:93
CSCALCTHeader2006::cscID
unsigned cscID
chamber ID number
Definition:
CSCALCTHeader2006.h:36
CSCALCTHeader2006::setDAV
void setDAV(int afebBoard)
for packing
Definition:
CSCALCTHeader2006.h:31
CSCALCTHeader::BXNCount
unsigned short int BXNCount() const
Definition:
CSCALCTHeader.h:55
CSCALCTHeader2006::l1aMatch
unsigned l1aMatch
exteran L1A arrived in L1A window
Definition:
CSCALCTHeader2006.h:47
CSCALCTHeader::BoardID
unsigned short int BoardID() const
Definition:
CSCALCTHeader.h:52
CSCALCTHeader::setDAVForChannel
void setDAVForChannel(int wireGroup)
Definition:
CSCALCTHeader.h:87
CSCALCTHeader2006::flag_0
unsigned flag_0
should be '01100', so it'll be a 6xxx in the ASCII dump
Definition:
CSCALCTHeader2006.h:40
CSCALCTHeader::data
unsigned short int * data()
Definition:
CSCALCTHeader.h:95
CSCDMBHeader
Definition:
CSCDMBHeader.h:9
Generated for CMSSW Reference Manual by
1.8.5