Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
CSCRawToDigi
interface
CSCTMBHeader.h
Go to the documentation of this file.
1
#ifndef CSCTMBHeader_h
2
#define CSCTMBHeader_h
3
5
6
#include <iosfwd>
7
#include <vector>
8
#include "
DataFormats/CSCDigi/interface/CSCTMBStatusDigi.h
"
9
#include "
DataFormats/CSCDigi/interface/CSCALCTDigi.h
"
10
#include "
DataFormats/CSCDigi/interface/CSCCLCTDigi.h
"
11
#include "
DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h
"
12
#include "
EventFilter/CSCRawToDigi/interface/CSCVTMBHeaderFormat.h
"
13
#include "
FWCore/Utilities/interface/Exception.h
"
14
#include <boost/shared_ptr.hpp>
15
#ifndef LOCAL_UNPACK
16
#include <atomic>
17
#endif
18
class
CSCDMBHeader
;
19
struct
CSCTMBHeader2006
;
20
struct
CSCTMBHeader2007
;
21
struct
CSCTMBHeader2013
;
22
23
24
class
CSCTMBHeader
{
25
26
public
:
27
CSCTMBHeader
(
int
firmwareVersion,
int
firmwareRevision);
28
CSCTMBHeader
(
const
CSCTMBStatusDigi
& digi);
29
CSCTMBHeader
(
const
unsigned
short
* buf);
30
32
void
setEventInformation
(
const
CSCDMBHeader
& dmbHeader)
33
{
34
theHeaderFormat
->setEventInformation(dmbHeader);
35
}
36
37
int
FirmwareVersion
()
const
{
return
theFirmwareVersion
;}
38
int
FirmwareRevision
()
const
{
return
theHeaderFormat
->firmwareRevision();}
39
40
41
uint16_t
BXNCount
()
const
{
42
return
theHeaderFormat
->BXNCount();
43
}
44
uint16_t
ALCTMatchTime
()
const
{
45
return
theHeaderFormat
->ALCTMatchTime();
46
}
47
uint16_t
CLCTOnly
()
const
{
48
return
theHeaderFormat
->CLCTOnly();
49
}
50
uint16_t
ALCTOnly
()
const
{
51
return
theHeaderFormat
->ALCTOnly();
52
}
53
uint16_t
TMBMatch
()
const
{
54
return
theHeaderFormat
->TMBMatch();
55
}
56
57
uint16_t
Bxn0Diff
()
const
{
58
return
theHeaderFormat
->Bxn0Diff();
59
}
60
uint16_t
Bxn1Diff
()
const
{
61
return
theHeaderFormat
->Bxn1Diff();
62
}
63
64
uint16_t
L1ANumber
()
const
{
65
return
theHeaderFormat
->L1ANumber();
66
}
67
68
uint16_t
sizeInBytes
()
const
{
69
return
theHeaderFormat
->sizeInWords()*2;
70
}
71
73
CSCTMBHeader2007
tmbHeader2007
()
const
;
74
CSCTMBHeader2006
tmbHeader2006
()
const
;
75
CSCTMBHeader2013
tmbHeader2013
()
const
;
76
77
uint16_t
NTBins
()
const
{
78
return
theHeaderFormat
->NTBins();
79
}
80
uint16_t
NCFEBs
()
const
{
81
return
theHeaderFormat
->NCFEBs();
82
}
83
84
void
setNCFEBs
(uint16_t ncfebs) {
85
theHeaderFormat
->setNCFEBs(ncfebs);
86
}
87
88
90
std::vector<CSCCLCTDigi>
CLCTDigis
(uint32_t idlayer)
91
{
92
return
theHeaderFormat
->CLCTDigis(idlayer);
93
}
94
96
std::vector<CSCCorrelatedLCTDigi>
CorrelatedLCTDigis
(uint32_t idlayer)
const
97
{
98
return
theHeaderFormat
->CorrelatedLCTDigis(idlayer);
99
}
100
103
unsigned
short
int
sizeInWords
()
const
{
return
theHeaderFormat
->sizeInWords();}
104
105
unsigned
short
int
NHeaderFrames
()
const
{
106
return
theHeaderFormat
->NHeaderFrames();
107
}
108
109
unsigned
short
*
data
() {
110
return
theHeaderFormat
->data();
111
}
112
114
static
void
setDebug
(
const
bool
value
) {
debug
=
value
;}
115
116
bool
check
()
const
{
117
return
theHeaderFormat
->check();
118
}
119
121
//void setChamberId(const CSCDetId & detId) {theChamberId = detId;}
122
124
void
addCLCT0
(
const
CSCCLCTDigi
& digi) {
theHeaderFormat
->addCLCT0(digi);}
125
void
addCLCT1
(
const
CSCCLCTDigi
& digi) {
theHeaderFormat
->addCLCT1(digi);}
126
void
addALCT0
(
const
CSCALCTDigi
& digi) {
theHeaderFormat
->addALCT0(digi);}
127
void
addALCT1
(
const
CSCALCTDigi
& digi) {
theHeaderFormat
->addALCT1(digi);}
128
void
addCorrelatedLCT0
(
const
CSCCorrelatedLCTDigi
& digi) {
129
theHeaderFormat
->addCorrelatedLCT0(digi);
130
}
131
void
addCorrelatedLCT1
(
const
CSCCorrelatedLCTDigi
& digi) {
132
theHeaderFormat
->addCorrelatedLCT1(digi);
133
}
134
136
void
add
(
const
std::vector<CSCCLCTDigi> & digis);
137
void
add
(
const
std::vector<CSCCorrelatedLCTDigi> & digis);
138
139
141
static
void
selfTest
();
142
143
friend
std::ostream &
operator<<
(std::ostream & os,
const
CSCTMBHeader
& hdr);
144
145
private
:
146
147
//void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
148
149
#ifdef LOCAL_UNPACK
150
static
bool
debug
;
151
#else
152
static
std::atomic<bool>
debug
;
153
#endif
154
155
boost::shared_ptr<CSCVTMBHeaderFormat>
theHeaderFormat
;
156
int
theFirmwareVersion
;
157
158
};
159
160
#endif
161
CSCTMBHeader::BXNCount
uint16_t BXNCount() const
Definition:
CSCTMBHeader.h:41
CSCTMBHeader::setEventInformation
void setEventInformation(const CSCDMBHeader &dmbHeader)
fills fields like bxn and l1a
Definition:
CSCTMBHeader.h:32
CSCTMBHeader::tmbHeader2007
CSCTMBHeader2007 tmbHeader2007() const
will throw if the cast fails
Definition:
CSCTMBHeader.cc:145
CSCTMBHeader2013
Definition:
CSCTMBHeader2013.h:7
CSCTMBHeader::NTBins
uint16_t NTBins() const
Definition:
CSCTMBHeader.h:77
CSCTMBHeader::FirmwareRevision
int FirmwareRevision() const
Definition:
CSCTMBHeader.h:38
CSCTMBStatusDigi.h
CSCCorrelatedLCTDigi.h
CSCTMBHeader::NHeaderFrames
unsigned short int NHeaderFrames() const
Definition:
CSCTMBHeader.h:105
CSCALCTDigi
Definition:
CSCALCTDigi.h:15
CSCTMBHeader::theFirmwareVersion
int theFirmwareVersion
Definition:
CSCTMBHeader.h:156
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
CSCTMBHeader::CLCTOnly
uint16_t CLCTOnly() const
Definition:
CSCTMBHeader.h:47
CSCTMBHeader::L1ANumber
uint16_t L1ANumber() const
Definition:
CSCTMBHeader.h:64
CSCTMBHeader::CorrelatedLCTDigis
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const
returns CorrelatedLCT digis
Definition:
CSCTMBHeader.h:96
CSCTMBHeader::Bxn1Diff
uint16_t Bxn1Diff() const
Definition:
CSCTMBHeader.h:60
CSCTMBHeader::addCorrelatedLCT0
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
Definition:
CSCTMBHeader.h:128
CSCTMBHeader::add
void add(const std::vector< CSCCLCTDigi > &digis)
these methods need more brains to figure which one goes first
Definition:
CSCTMBHeader.cc:127
CSCTMBHeader::addCorrelatedLCT1
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
Definition:
CSCTMBHeader.h:131
CSCTMBHeader::NCFEBs
uint16_t NCFEBs() const
Definition:
CSCTMBHeader.h:80
CSCTMBHeader::addCLCT1
void addCLCT1(const CSCCLCTDigi &digi)
Definition:
CSCTMBHeader.h:125
CSCTMBHeader::theHeaderFormat
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition:
CSCTMBHeader.h:155
CSCTMBHeader::setNCFEBs
void setNCFEBs(uint16_t ncfebs)
Definition:
CSCTMBHeader.h:84
CSCTMBHeader::setDebug
static void setDebug(const bool value)
Definition:
CSCTMBHeader.h:114
CSCALCTDigi.h
CSCTMBHeader::selfTest
static void selfTest()
tests that packing and unpacking give same results
Definition:
CSCTMBHeader.cc:177
CSCTMBHeader::data
unsigned short * data()
Definition:
CSCTMBHeader.h:109
CSCTMBHeader::ALCTOnly
uint16_t ALCTOnly() const
Definition:
CSCTMBHeader.h:50
CSCTMBHeader::Bxn0Diff
uint16_t Bxn0Diff() const
Definition:
CSCTMBHeader.h:57
CSCTMBHeader::debug
static std::atomic< bool > debug
Definition:
CSCTMBHeader.h:152
CSCTMBHeader::operator<<
friend std::ostream & operator<<(std::ostream &os, const CSCTMBHeader &hdr)
Definition:
CSCTMBHeader.cc:241
CSCTMBHeader2007
Definition:
CSCTMBHeader2007.h:7
CSCCLCTDigi
Definition:
CSCCLCTDigi.h:15
CSCTMBHeader::ALCTMatchTime
uint16_t ALCTMatchTime() const
Definition:
CSCTMBHeader.h:44
CSCTMBHeader::sizeInWords
unsigned short int sizeInWords() const
Definition:
CSCTMBHeader.h:103
CSCTMBHeader::sizeInBytes
uint16_t sizeInBytes() const
Definition:
CSCTMBHeader.h:68
Exception.h
CSCTMBHeader::CLCTDigis
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer)
returns CLCT digis
Definition:
CSCTMBHeader.h:90
CSCTMBStatusDigi
Definition:
CSCTMBStatusDigi.h:15
CSCTMBHeader::tmbHeader2006
CSCTMBHeader2006 tmbHeader2006() const
Definition:
CSCTMBHeader.cc:166
CSCTMBHeader::addCLCT0
void addCLCT0(const CSCCLCTDigi &digi)
Needed before data packing.
Definition:
CSCTMBHeader.h:124
CSCTMBHeader::check
bool check() const
Definition:
CSCTMBHeader.h:116
CSCTMBHeader::TMBMatch
uint16_t TMBMatch() const
Definition:
CSCTMBHeader.h:53
CSCVTMBHeaderFormat.h
CSCTMBHeader::FirmwareVersion
int FirmwareVersion() const
Definition:
CSCTMBHeader.h:37
CSCTMBHeader::addALCT1
void addALCT1(const CSCALCTDigi &digi)
Definition:
CSCTMBHeader.h:127
CSCCLCTDigi.h
CSCTMBHeader::CSCTMBHeader
CSCTMBHeader(int firmwareVersion, int firmwareRevision)
Definition:
CSCTMBHeader.cc:20
CSCTMBHeader2006
Definition:
CSCTMBHeader2006.h:7
CSCCorrelatedLCTDigi
Definition:
CSCCorrelatedLCTDigi.h:15
CSCTMBHeader::tmbHeader2013
CSCTMBHeader2013 tmbHeader2013() const
Definition:
CSCTMBHeader.cc:155
CSCTMBHeader
Definition:
CSCTMBHeader.h:24
CSCTMBHeader::addALCT0
void addALCT0(const CSCALCTDigi &digi)
Definition:
CSCTMBHeader.h:126
CSCDMBHeader
Definition:
CSCDMBHeader.h:15
Generated for CMSSW Reference Manual by
1.8.5