Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
{
19
public
:
20
21
/* PUBLIC METHODS */
22
24
26
explicit
GctFormatTranslateV38
(
bool
hltMode
=
false
,
27
bool
unpackSharedRegions
=
false
,
28
unsigned
numberOfGctSamplesToUnpack
=1,
29
unsigned
numberOfRctSamplesToUnpack
=1);
30
31
virtual
~GctFormatTranslateV38
();
32
34
virtual
GctBlockHeader
generateBlockHeader
(
const
unsigned
char
*
data
)
const override
;
35
37
virtual
bool
convertBlock
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr)
override
;
38
39
40
/* ------------------------------ */
41
/* Public Block Packing Functions */
42
/* ------------------------------ */
43
44
// -- TO DO --
45
46
47
protected
:
48
49
/* PROTECTED METHODS */
50
51
/* Static data member access methods */
52
virtual
const
BlockLengthMap
&
blockLengthMap
()
const
override final {
return
m_blockLength
; }
53
54
virtual
const
BlockNameMap
&
blockNameMap
()
const
override final {
return
m_blockName
; }
55
56
virtual
const
BlkToRctCrateMap
&
rctEmCrateMap
()
const
override final {
return
m_rctEmCrate
; }
57
58
virtual
const
BlkToRctCrateMap
&
rctJetCrateMap
()
const
override final {
return
m_rctJetCrate
; }
59
60
virtual
const
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
()
const
override final {
return
m_internEmIsoBounds
; }
61
62
63
/* Other general methods */
65
virtual
uint32_t
generateRawHeader
(
const
uint32_t blockId,
66
const
uint32_t nSamples,
67
const
uint32_t bxId,
68
const
uint32_t eventId)
const override
;
69
70
71
private
:
72
73
/* PRIVATE TYPEDEFS */
74
76
typedef
void (
GctFormatTranslateV38
::*
PtrToUnpackFn
)(
const
unsigned
char
*,
const
GctBlockHeader
&);
78
typedef
std::map<unsigned int, PtrToUnpackFn>
BlockIdToUnpackFnMap
;
79
80
81
/* PRIVATE MEMBER DATA */
82
84
static
const
BlockLengthMap
m_blockLength
;
85
87
static
const
BlockNameMap
m_blockName
;
88
90
static
const
BlkToRctCrateMap
m_rctEmCrate
;
91
93
static
const
BlkToRctCrateMap
m_rctJetCrate
;
94
97
static
const
BlockIdToEmCandIsoBoundMap
m_internEmIsoBounds
;
98
100
static
const
BlockIdToUnpackFnMap
m_blockUnpackFn
;
101
103
const
unsigned
m_numberOfGctSamplesToUnpack
;
104
106
const
unsigned
m_numberOfRctSamplesToUnpack
;
107
108
/* PRIVATE METHODS */
109
110
/* --------------------------------- */
111
/* Private Block Unpacking Functions */
112
/* --------------------------------- */
113
115
void
blockToGctEmCandsAndEnergySums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
116
118
void
blockToGctJetCandsAndCounts
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
119
121
void
blockToGctInternEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
122
124
void
blockToRctEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
125
127
void
blockToRctCaloRegions
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
128
130
void
blockToFibres
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
131
133
void
blockToFibresAndToRctEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
134
136
void
blockToGctInternEtSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
137
139
void
blockToGctInternEtSumsAndJetCluster
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
140
142
void
blockToGctTrigObjects
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
143
145
void
blockToGctJetClusterMinimal
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
146
148
void
blockToGctJetPreCluster
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
149
151
void
blockToGctInternRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
152
154
void
blockToGctWheelOutputInternEtAndRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
155
157
void
blockToGctWheelInputInternEtAndRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
158
160
void
blockToGctInternHtMissPreWheel
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
161
163
void
blockToGctInternHtMissPostWheel
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
164
};
165
166
#endif
GctFormatTranslateV38::m_blockName
static const BlockNameMap m_blockName
Map to hold a description for each block number.
Definition:
GctFormatTranslateV38.h:87
GctFormatTranslateV38::blockToGctInternEmCand
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
Definition:
GctFormatTranslateV38.cc:777
GctFormatTranslateV38::internEmIsoBounds
virtual const BlockIdToEmCandIsoBoundMap & internEmIsoBounds() const overridefinal
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV38.h:60
GctFormatTranslateBase
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
Definition:
GctFormatTranslateBase.h:27
GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Definition:
GctFormatTranslateV38.cc:1112
GctFormatTranslateV38::generateBlockHeader
virtual GctBlockHeader generateBlockHeader(const unsigned char *data) const override
Generate a block header from four 8-bit values.
Definition:
GctFormatTranslateV38.cc:570
GctFormatTranslateV38::rctJetCrateMap
virtual const BlkToRctCrateMap & rctJetCrateMap() const overridefinal
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV38.h:58
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:557
GctFormatTranslateV38::blockToGctInternRingSums
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
Definition:
GctFormatTranslateV38.cc:1087
GctFormatTranslateBase.h
GctFormatTranslateV38::m_blockUnpackFn
static const BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
Definition:
GctFormatTranslateV38.h:100
GctFormatTranslateV38::blockLengthMap
virtual const BlockLengthMap & blockLengthMap() const overridefinal
get the static block ID to block-length map.
Definition:
GctFormatTranslateV38.h:52
GctFormatTranslateV38::blockToGctInternEtSums
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
Definition:
GctFormatTranslateV38.cc:970
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:93
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:103
GctFormatTranslateV38::blockToGctJetPreCluster
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Definition:
GctFormatTranslateV38.cc:1064
GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
Definition:
GctFormatTranslateV38.cc:992
GctFormatTranslateV38::~GctFormatTranslateV38
virtual ~GctFormatTranslateV38()
Destructor.
Definition:
GctFormatTranslateV38.cc:566
GctFormatTranslateBase::unpackSharedRegions
bool unpackSharedRegions() const
Definition:
GctFormatTranslateBase.h:104
HLT_50ns_5e33_v1_cff.numberOfRctSamplesToUnpack
tuple numberOfRctSamplesToUnpack
Definition:
HLT_50ns_5e33_v1_cff.py:1917
GctBlockHeader
Simple class for holding the basic attributes of an 32-bit block header.
Definition:
GctBlockHeader.h:16
GctFormatTranslateV38::BlockIdToUnpackFnMap
std::map< unsigned int, PtrToUnpackFn > BlockIdToUnpackFnMap
Typedef for a block ID to unpack function map.
Definition:
GctFormatTranslateV38.h:78
HLT_50ns_5e33_v1_cff.numberOfGctSamplesToUnpack
tuple numberOfGctSamplesToUnpack
Definition:
HLT_50ns_5e33_v1_cff.py:1915
GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
Definition:
GctFormatTranslateV38.cc:1141
GctFormatTranslateBase::BlockLengthMap
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
Definition:
GctFormatTranslateBase.h:68
GctFormatTranslateBase::hltMode
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
Definition:
GctFormatTranslateBase.h:103
GctFormatTranslateV38::blockToFibres
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
Definition:
GctFormatTranslateV38.cc:944
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:84
GctFormatTranslateV38::blockToRctCaloRegions
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
Definition:
GctFormatTranslateV38.cc:875
GctFormatTranslateV38::blockToFibresAndToRctEmCand
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
Definition:
GctFormatTranslateV38.cc:964
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:1170
GctFormatTranslateV38::m_numberOfRctSamplesToUnpack
const unsigned m_numberOfRctSamplesToUnpack
Definition:
GctFormatTranslateV38.h:106
GctFormatTranslateV38::m_internEmIsoBounds
static const BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
Definition:
GctFormatTranslateV38.h:97
compareJSON.const
string const
Definition:
compareJSON.py:14
GctFormatTranslateV38::blockToGctTrigObjects
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
Definition:
GctFormatTranslateV38.cc:1018
GctFormatTranslateV38::rctEmCrateMap
virtual const BlkToRctCrateMap & rctEmCrateMap() const overridefinal
get static the block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV38.h:56
GctFormatTranslateV38::blockToGctJetClusterMinimal
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
Definition:
GctFormatTranslateV38.cc:1041
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
GctFormatTranslateV38::blockNameMap
virtual const BlockNameMap & blockNameMap() const overridefinal
get the static block ID to blockname map.
Definition:
GctFormatTranslateV38.h:54
GctFormatTranslateV38::blockToRctEmCand
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
Definition:
GctFormatTranslateV38.cc:819
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:90
GctFormatTranslateV38::convertBlock
virtual 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:598
GctFormatTranslateV38::generateRawHeader
virtual 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:616
GctFormatTranslateV38::blockToGctJetCandsAndCounts
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Definition:
GctFormatTranslateV38.cc:711
GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
Definition:
GctFormatTranslateBase.h:84
GctFormatTranslateV38::PtrToUnpackFn
void(GctFormatTranslateV38::* PtrToUnpackFn)(const unsigned char *, const GctBlockHeader &)
Function pointer typdef to a block unpack function.
Definition:
GctFormatTranslateV38.h:76
GctFormatTranslateBase::BlkToRctCrateMap
std::map< unsigned int, unsigned int > BlkToRctCrateMap
Typedef for mapping block ID to RCT crate.
Definition:
GctFormatTranslateBase.h:74
GctFormatTranslateBase::BlockNameMap
std::map< unsigned int, std::string > BlockNameMap
Block ID to Block Description map.
Definition:
GctFormatTranslateBase.h:70
GctFormatTranslateV38::blockToGctEmCandsAndEnergySums
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
Definition:
GctFormatTranslateV38.cc:642
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:1193
Generated for CMSSW Reference Manual by
1.8.5