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