EventFilter
GctRawToDigi
src
GctFormatTranslateV38.h
Go to the documentation of this file.
1
#ifndef GctFormatTranslateV38_h_
2
#define GctFormatTranslateV38_h_
3
4
#include "
EventFilter/GctRawToDigi/src/GctFormatTranslateBase.h
"
5
13
// ************************************************************************
14
// *** THE TRANSLATION PROCESS MUST NEVER THROW ANY KIND OF EXCEPTION! ***
15
// ************************************************************************
16
17
class
GctFormatTranslateV38
:
public
GctFormatTranslateBase
{
18
public
:
19
/* PUBLIC METHODS */
20
22
24
explicit
GctFormatTranslateV38
(
bool
hltMode
=
false
,
25
bool
unpackSharedRegions
=
false
,
26
unsigned
numberOfGctSamplesToUnpack
= 1,
27
unsigned
numberOfRctSamplesToUnpack
= 1);
28
29
~GctFormatTranslateV38
()
override
;
30
32
GctBlockHeader
generateBlockHeader
(
const
unsigned
char
*
data
)
const override
;
33
35
bool
convertBlock
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr)
override
;
36
37
/* ------------------------------ */
38
/* Public Block Packing Functions */
39
/* ------------------------------ */
40
41
// -- TO DO --
42
43
protected
:
44
/* PROTECTED METHODS */
45
46
/* Static data member access methods */
47
const
BlockLengthMap
&
blockLengthMap
()
const
final {
48
return
m_blockLength
;
49
}
50
51
const
BlockNameMap
&
blockNameMap
()
const
final {
return
m_blockName
; }
52
53
const
BlkToRctCrateMap
&
rctEmCrateMap
()
const
final {
54
return
m_rctEmCrate
;
55
}
56
57
const
BlkToRctCrateMap
&
rctJetCrateMap
()
const
final {
58
return
m_rctJetCrate
;
59
}
60
61
const
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
()
const
final {
62
return
m_internEmIsoBounds
;
63
}
64
65
/* Other general methods */
67
uint32_t
generateRawHeader
(
const
uint32_t blockId,
68
const
uint32_t
nSamples
,
69
const
uint32_t bxId,
70
const
uint32_t eventId)
const override
;
71
72
private
:
73
/* PRIVATE TYPEDEFS */
74
76
typedef
void
(
GctFormatTranslateV38
::*
PtrToUnpackFn
)(
const
unsigned
char
*,
const
GctBlockHeader
&);
78
typedef
std::map<unsigned int, PtrToUnpackFn>
BlockIdToUnpackFnMap
;
79
80
/* PRIVATE MEMBER DATA */
81
83
static
const
BlockLengthMap
m_blockLength
;
84
86
static
const
BlockNameMap
m_blockName
;
87
89
static
const
BlkToRctCrateMap
m_rctEmCrate
;
90
92
static
const
BlkToRctCrateMap
m_rctJetCrate
;
93
96
static
const
BlockIdToEmCandIsoBoundMap
m_internEmIsoBounds
;
97
99
static
const
BlockIdToUnpackFnMap
m_blockUnpackFn
;
100
102
const
unsigned
m_numberOfGctSamplesToUnpack
;
103
105
const
unsigned
m_numberOfRctSamplesToUnpack
;
106
107
/* PRIVATE METHODS */
108
109
/* --------------------------------- */
110
/* Private Block Unpacking Functions */
111
/* --------------------------------- */
112
114
void
blockToGctEmCandsAndEnergySums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
115
117
void
blockToGctJetCandsAndCounts
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
118
120
void
blockToGctInternEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
121
123
void
blockToRctEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
124
126
void
blockToRctCaloRegions
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
127
129
void
blockToFibres
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
130
132
void
blockToFibresAndToRctEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
133
135
void
blockToGctInternEtSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
136
138
void
blockToGctInternEtSumsAndJetCluster
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
139
141
void
blockToGctTrigObjects
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
142
144
void
blockToGctJetClusterMinimal
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
145
147
void
blockToGctJetPreCluster
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
148
150
void
blockToGctInternRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
151
153
void
blockToGctWheelOutputInternEtAndRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
154
156
void
blockToGctWheelInputInternEtAndRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
157
159
void
blockToGctInternHtMissPreWheel
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
160
162
void
blockToGctInternHtMissPostWheel
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
163
};
164
165
#endif
GctFormatTranslateV38::m_blockName
static const BlockNameMap m_blockName
Map to hold a description for each block number.
Definition:
GctFormatTranslateV38.h:86
GctFormatTranslateV38::blockToGctInternEmCand
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
Definition:
GctFormatTranslateV38.cc:805
runTheMatrix.const
const
Definition:
runTheMatrix.py:340
GctFormatTranslateV38::PtrToUnpackFn
void(GctFormatTranslateV38::* PtrToUnpackFn)(const unsigned char *, const GctBlockHeader &)
Function pointer typdef to a block unpack function.
Definition:
GctFormatTranslateV38.h:76
GctFormatTranslateV38::blockNameMap
const BlockNameMap & blockNameMap() const final
get the static block ID to blockname map.
Definition:
GctFormatTranslateV38.h:51
GctFormatTranslateBase
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
Definition:
GctFormatTranslateBase.h:25
GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Definition:
GctFormatTranslateV38.cc:1166
GctFormatTranslateV38::generateBlockHeader
GctBlockHeader generateBlockHeader(const unsigned char *data) const override
Generate a block header from four 8-bit values.
Definition:
GctFormatTranslateV38.cc:586
GctFormatTranslateBase::unpackSharedRegions
bool unpackSharedRegions() const
Definition:
GctFormatTranslateBase.h:101
GctFormatTranslateV38
Unpacks/packs the V38 raw format.
Definition:
GctFormatTranslateV38.h:17
GctFormatTranslateV38::GctFormatTranslateV38
GctFormatTranslateV38(bool hltMode=false, bool unpackSharedRegions=false, unsigned numberOfGctSamplesToUnpack=1, unsigned numberOfRctSamplesToUnpack=1)
Constructor.
Definition:
GctFormatTranslateV38.cc:576
l1GctHwDigis_cfi.numberOfRctSamplesToUnpack
numberOfRctSamplesToUnpack
Definition:
l1GctHwDigis_cfi.py:9
l1t_dqm_sourceclient-live_cfg.numberOfGctSamplesToUnpack
numberOfGctSamplesToUnpack
Definition:
l1t_dqm_sourceclient-live_cfg.py:81
funct::void
TEMPL(T2) struct Divides void
Definition:
Factorize.h:24
GctFormatTranslateV38::blockToGctInternRingSums
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
Definition:
GctFormatTranslateV38.cc:1139
GctFormatTranslateBase.h
GctFormatTranslateV38::~GctFormatTranslateV38
~GctFormatTranslateV38() override
Destructor.
Definition:
GctFormatTranslateV38.cc:584
GctFormatTranslateV38::m_blockUnpackFn
static const BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
Definition:
GctFormatTranslateV38.h:99
GctFormatTranslateV38::rctEmCrateMap
const BlkToRctCrateMap & rctEmCrateMap() const final
get static the block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV38.h:53
GctFormatTranslateV38::blockToGctInternEtSums
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
Definition:
GctFormatTranslateV38.cc:1004
GctFormatTranslateV38::m_rctJetCrate
static const BlkToRctCrateMap m_rctJetCrate
Map to relate capture block ID to the RCT crate the data originated from (for jets).
Definition:
GctFormatTranslateV38.h:92
GctFormatTranslateV38::m_numberOfGctSamplesToUnpack
const unsigned m_numberOfGctSamplesToUnpack
Number of BXs of GCT data to unpack (assuming they are in the raw data)
Definition:
GctFormatTranslateV38.h:102
GctFormatTranslateV38::blockToGctJetPreCluster
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Definition:
GctFormatTranslateV38.cc:1112
GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
Definition:
GctFormatTranslateV38.cc:1028
GctBlockHeader
Simple class for holding the basic attributes of an 32-bit block header.
Definition:
GctBlockHeader.h:15
GctFormatTranslateV38::BlockIdToUnpackFnMap
std::map< unsigned int, PtrToUnpackFn > BlockIdToUnpackFnMap
Typedef for a block ID to unpack function map.
Definition:
GctFormatTranslateV38.h:78
GctFormatTranslateBase::hltMode
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
Definition:
GctFormatTranslateBase.h:100
GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
Definition:
GctFormatTranslateV38.cc:1197
GctFormatTranslateBase::BlockLengthMap
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
Definition:
GctFormatTranslateBase.h:63
GctFormatTranslateV38::blockToFibres
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
Definition:
GctFormatTranslateV38.cc:977
ztail.d
d
Definition:
ztail.py:151
GctFormatTranslateV38::rctJetCrateMap
const BlkToRctCrateMap & rctJetCrateMap() const final
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV38.h:57
GctFormatTranslateV38::m_blockLength
static const BlockLengthMap m_blockLength
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).
Definition:
GctFormatTranslateV38.h:83
GctFormatTranslateV38::blockToRctCaloRegions
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
Definition:
GctFormatTranslateV38.cc:904
GctFormatTranslateV38::blockToFibresAndToRctEmCand
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
Definition:
GctFormatTranslateV38.cc:999
GctFormatTranslateV38::internEmIsoBounds
const BlockIdToEmCandIsoBoundMap & internEmIsoBounds() const final
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV38.h:61
GctFormatTranslateV38::blockToGctInternHtMissPreWheel
void blockToGctInternHtMissPreWheel(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Missing Ht data that is being input to the wheels.
Definition:
GctFormatTranslateV38.cc:1229
GctFormatTranslateV38::m_numberOfRctSamplesToUnpack
const unsigned m_numberOfRctSamplesToUnpack
Definition:
GctFormatTranslateV38.h:105
GctFormatTranslateV38::blockLengthMap
const BlockLengthMap & blockLengthMap() const final
get the static block ID to block-length map.
Definition:
GctFormatTranslateV38.h:47
GctFormatTranslateV38::m_internEmIsoBounds
static const BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
Definition:
GctFormatTranslateV38.h:96
GctFormatTranslateV38::blockToGctTrigObjects
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
Definition:
GctFormatTranslateV38.cc:1058
GctFormatTranslateV38::blockToGctJetClusterMinimal
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
Definition:
GctFormatTranslateV38.cc:1085
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
GctFormatTranslateV38::blockToRctEmCand
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
Definition:
GctFormatTranslateV38.cc:845
GctFormatTranslateV38::m_rctEmCrate
static const BlkToRctCrateMap m_rctEmCrate
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
Definition:
GctFormatTranslateV38.h:89
PresampleTask_cfi.nSamples
nSamples
Definition:
PresampleTask_cfi.py:7
GctFormatTranslateV38::convertBlock
bool convertBlock(const unsigned char *d, const GctBlockHeader &hdr) override
Get digis from the block - will return true if it succeeds, false otherwise.
Definition:
GctFormatTranslateV38.cc:615
GctFormatTranslateV38::generateRawHeader
uint32_t generateRawHeader(const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const override
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.
Definition:
GctFormatTranslateV38.cc:636
GctFormatTranslateV38::blockToGctJetCandsAndCounts
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Definition:
GctFormatTranslateV38.cc:735
GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
Definition:
GctFormatTranslateBase.h:79
GctFormatTranslateBase::BlkToRctCrateMap
std::map< unsigned int, unsigned int > BlkToRctCrateMap
Typedef for mapping block ID to RCT crate.
Definition:
GctFormatTranslateBase.h:69
GctFormatTranslateBase::BlockNameMap
std::map< unsigned int, std::string > BlockNameMap
Block ID to Block Description map.
Definition:
GctFormatTranslateBase.h:65
GctFormatTranslateV38::blockToGctEmCandsAndEnergySums
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
Definition:
GctFormatTranslateV38.cc:660
GctFormatTranslateV38::blockToGctInternHtMissPostWheel
void blockToGctInternHtMissPostWheel(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Missing Ht data that is either wheel output or concJet input (i.e. after wheel processing).
Definition:
GctFormatTranslateV38.cc:1252
Generated for CMSSW Reference Manual by
1.8.14