test
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
class
CSCDMBHeader
;
16
class
CSCTMBHeader2006
;
17
class
CSCTMBHeader2007
;
18
class
CSCTMBHeader2013
;
19
20
21
class
CSCTMBHeader
{
22
23
public
:
24
CSCTMBHeader
(
int
firmwareVersion,
int
firmwareRevision);
25
CSCTMBHeader
(
const
CSCTMBStatusDigi
& digi);
26
CSCTMBHeader
(
const
unsigned
short
* buf);
27
29
void
setEventInformation
(
const
CSCDMBHeader
& dmbHeader)
30
{
31
theHeaderFormat
->setEventInformation(dmbHeader);
32
}
33
34
int
FirmwareVersion
()
const
{
return
theFirmwareVersion
;}
35
int
FirmwareRevision
()
const
{
return
theHeaderFormat
->firmwareRevision();}
36
37
38
uint16_t
BXNCount
()
const
{
39
return
theHeaderFormat
->BXNCount();
40
}
41
uint16_t
ALCTMatchTime
()
const
{
42
return
theHeaderFormat
->ALCTMatchTime();
43
}
44
uint16_t
CLCTOnly
()
const
{
45
return
theHeaderFormat
->CLCTOnly();
46
}
47
uint16_t
ALCTOnly
()
const
{
48
return
theHeaderFormat
->ALCTOnly();
49
}
50
uint16_t
TMBMatch
()
const
{
51
return
theHeaderFormat
->TMBMatch();
52
}
53
54
uint16_t
Bxn0Diff
()
const
{
55
return
theHeaderFormat
->Bxn0Diff();
56
}
57
uint16_t
Bxn1Diff
()
const
{
58
return
theHeaderFormat
->Bxn1Diff();
59
}
60
61
uint16_t
L1ANumber
()
const
{
62
return
theHeaderFormat
->L1ANumber();
63
}
64
65
uint16_t
sizeInBytes
()
const
{
66
return
theHeaderFormat
->sizeInWords()*2;
67
}
68
70
CSCTMBHeader2007
tmbHeader2007
()
const
;
71
CSCTMBHeader2006
tmbHeader2006
()
const
;
72
CSCTMBHeader2013
tmbHeader2013
()
const
;
73
74
uint16_t
NTBins
()
const
{
75
return
theHeaderFormat
->NTBins();
76
}
77
uint16_t
NCFEBs
()
const
{
78
return
theHeaderFormat
->NCFEBs();
79
}
80
81
void
setNCFEBs
(uint16_t ncfebs) {
82
theHeaderFormat
->setNCFEBs(ncfebs);
83
}
84
85
87
std::vector<CSCCLCTDigi>
CLCTDigis
(uint32_t idlayer)
88
{
89
return
theHeaderFormat
->CLCTDigis(idlayer);
90
}
91
93
std::vector<CSCCorrelatedLCTDigi>
CorrelatedLCTDigis
(uint32_t idlayer)
const
94
{
95
return
theHeaderFormat
->CorrelatedLCTDigis(idlayer);
96
}
97
100
unsigned
short
int
sizeInWords
()
const
{
return
theHeaderFormat
->sizeInWords();}
101
102
unsigned
short
int
NHeaderFrames
()
const
{
103
return
theHeaderFormat
->NHeaderFrames();
104
}
105
106
unsigned
short
*
data
() {
107
return
theHeaderFormat
->data();
108
}
109
111
static
void
setDebug
(
const
bool
value
) {
debug
=
value
;}
112
113
bool
check
()
const
{
114
return
theHeaderFormat
->check();
115
}
116
118
//void setChamberId(const CSCDetId & detId) {theChamberId = detId;}
119
121
void
addCLCT0
(
const
CSCCLCTDigi
& digi) {
theHeaderFormat
->addCLCT0(digi);}
122
void
addCLCT1
(
const
CSCCLCTDigi
& digi) {
theHeaderFormat
->addCLCT1(digi);}
123
void
addALCT0
(
const
CSCALCTDigi
& digi) {
theHeaderFormat
->addALCT0(digi);}
124
void
addALCT1
(
const
CSCALCTDigi
& digi) {
theHeaderFormat
->addALCT1(digi);}
125
void
addCorrelatedLCT0
(
const
CSCCorrelatedLCTDigi
& digi) {
126
theHeaderFormat
->addCorrelatedLCT0(digi);
127
}
128
void
addCorrelatedLCT1
(
const
CSCCorrelatedLCTDigi
& digi) {
129
theHeaderFormat
->addCorrelatedLCT1(digi);
130
}
131
133
void
add
(
const
std::vector<CSCCLCTDigi> & digis);
134
void
add
(
const
std::vector<CSCCorrelatedLCTDigi> & digis);
135
136
138
static
void
selfTest
();
139
140
friend
std::ostream &
operator<<
(std::ostream & os,
const
CSCTMBHeader
& hdr);
141
142
private
:
143
144
//void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
145
146
static
bool
debug
;
147
148
boost::shared_ptr<CSCVTMBHeaderFormat>
theHeaderFormat
;
149
int
theFirmwareVersion
;
150
151
};
152
153
#endif
154
CSCTMBHeader::BXNCount
uint16_t BXNCount() const
Definition:
CSCTMBHeader.h:38
CSCTMBHeader::setEventInformation
void setEventInformation(const CSCDMBHeader &dmbHeader)
fills fields like bxn and l1a
Definition:
CSCTMBHeader.h:29
CSCTMBHeader::tmbHeader2007
CSCTMBHeader2007 tmbHeader2007() const
will throw if the cast fails
Definition:
CSCTMBHeader.cc:141
CSCTMBHeader2013
Definition:
CSCTMBHeader2013.h:7
CSCTMBHeader::NTBins
uint16_t NTBins() const
Definition:
CSCTMBHeader.h:74
CSCTMBHeader::FirmwareRevision
int FirmwareRevision() const
Definition:
CSCTMBHeader.h:35
CSCTMBStatusDigi.h
CSCCorrelatedLCTDigi.h
CSCTMBHeader::NHeaderFrames
unsigned short int NHeaderFrames() const
Definition:
CSCTMBHeader.h:102
CSCALCTDigi
Definition:
CSCALCTDigi.h:15
CSCTMBHeader::theFirmwareVersion
int theFirmwareVersion
Definition:
CSCTMBHeader.h:149
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
CSCTMBHeader::CLCTOnly
uint16_t CLCTOnly() const
Definition:
CSCTMBHeader.h:44
CSCTMBHeader::L1ANumber
uint16_t L1ANumber() const
Definition:
CSCTMBHeader.h:61
CSCTMBHeader::CorrelatedLCTDigis
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const
returns CorrelatedLCT digis
Definition:
CSCTMBHeader.h:93
CSCTMBHeader::Bxn1Diff
uint16_t Bxn1Diff() const
Definition:
CSCTMBHeader.h:57
CSCTMBHeader::addCorrelatedLCT0
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
Definition:
CSCTMBHeader.h:125
CSCTMBHeader::add
void add(const std::vector< CSCCLCTDigi > &digis)
these methods need more brains to figure which one goes first
Definition:
CSCTMBHeader.cc:123
CSCTMBHeader::addCorrelatedLCT1
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
Definition:
CSCTMBHeader.h:128
CSCTMBHeader::NCFEBs
uint16_t NCFEBs() const
Definition:
CSCTMBHeader.h:77
CSCTMBHeader::addCLCT1
void addCLCT1(const CSCCLCTDigi &digi)
Definition:
CSCTMBHeader.h:122
CSCTMBHeader::theHeaderFormat
boost::shared_ptr< CSCVTMBHeaderFormat > theHeaderFormat
Definition:
CSCTMBHeader.h:148
CSCTMBHeader::setNCFEBs
void setNCFEBs(uint16_t ncfebs)
Definition:
CSCTMBHeader.h:81
CSCTMBHeader::setDebug
static void setDebug(const bool value)
Definition:
CSCTMBHeader.h:111
CSCALCTDigi.h
CSCTMBHeader::debug
static bool debug
Definition:
CSCTMBHeader.h:146
CSCTMBHeader::selfTest
static void selfTest()
tests that packing and unpacking give same results
Definition:
CSCTMBHeader.cc:173
CSCTMBHeader::data
unsigned short * data()
Definition:
CSCTMBHeader.h:106
CSCTMBHeader::ALCTOnly
uint16_t ALCTOnly() const
Definition:
CSCTMBHeader.h:47
CSCTMBHeader::Bxn0Diff
uint16_t Bxn0Diff() const
Definition:
CSCTMBHeader.h:54
CSCTMBHeader::operator<<
friend std::ostream & operator<<(std::ostream &os, const CSCTMBHeader &hdr)
Definition:
CSCTMBHeader.cc:237
CSCTMBHeader2007
Definition:
CSCTMBHeader2007.h:7
CSCCLCTDigi
Definition:
CSCCLCTDigi.h:15
CSCTMBHeader::ALCTMatchTime
uint16_t ALCTMatchTime() const
Definition:
CSCTMBHeader.h:41
CSCTMBHeader::sizeInWords
unsigned short int sizeInWords() const
Definition:
CSCTMBHeader.h:100
CSCTMBHeader::sizeInBytes
uint16_t sizeInBytes() const
Definition:
CSCTMBHeader.h:65
Exception.h
CSCTMBHeader::CLCTDigis
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer)
returns CLCT digis
Definition:
CSCTMBHeader.h:87
CSCTMBStatusDigi
Definition:
CSCTMBStatusDigi.h:15
CSCTMBHeader::tmbHeader2006
CSCTMBHeader2006 tmbHeader2006() const
Definition:
CSCTMBHeader.cc:162
CSCTMBHeader::addCLCT0
void addCLCT0(const CSCCLCTDigi &digi)
Needed before data packing.
Definition:
CSCTMBHeader.h:121
CSCTMBHeader::check
bool check() const
Definition:
CSCTMBHeader.h:113
CSCTMBHeader::TMBMatch
uint16_t TMBMatch() const
Definition:
CSCTMBHeader.h:50
CSCVTMBHeaderFormat.h
CSCTMBHeader::FirmwareVersion
int FirmwareVersion() const
Definition:
CSCTMBHeader.h:34
CSCTMBHeader::addALCT1
void addALCT1(const CSCALCTDigi &digi)
Definition:
CSCTMBHeader.h:124
CSCCLCTDigi.h
CSCTMBHeader::CSCTMBHeader
CSCTMBHeader(int firmwareVersion, int firmwareRevision)
Definition:
CSCTMBHeader.cc:16
CSCTMBHeader2006
Definition:
CSCTMBHeader2006.h:7
CSCCorrelatedLCTDigi
Definition:
CSCCorrelatedLCTDigi.h:15
CSCTMBHeader::tmbHeader2013
CSCTMBHeader2013 tmbHeader2013() const
Definition:
CSCTMBHeader.cc:151
CSCTMBHeader
Definition:
CSCTMBHeader.h:21
CSCTMBHeader::addALCT0
void addALCT0(const CSCALCTDigi &digi)
Definition:
CSCTMBHeader.h:123
CSCDMBHeader
Definition:
CSCDMBHeader.h:15
Generated for CMSSW Reference Manual by
1.8.5