Main Page
Namespaces
Classes
Package Documentation
EventFilter
GctRawToDigi
src
GctFormatTranslateV35.h
Go to the documentation of this file.
1
#ifndef GctFormatTranslateV35_h_
2
#define GctFormatTranslateV35_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
GctFormatTranslateV35
:
public
GctFormatTranslateBase
18
{
19
public
:
20
21
/* PUBLIC METHODS */
22
24
26
explicit
GctFormatTranslateV35
(
bool
hltMode
=
false
,
bool
unpackSharedRegions
=
false
);
27
28
~GctFormatTranslateV35
()
override
;
29
31
GctBlockHeader
generateBlockHeader
(
const
unsigned
char
*
data
)
const override
;
32
34
bool
convertBlock
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr)
override
;
35
36
37
/* ------------------------------ */
38
/* Public Block Packing Functions */
39
/* ------------------------------ */
40
41
// -- TO DO --
42
43
44
protected
:
45
46
/* PROTECTED METHODS */
47
48
/* Static data member access methods */
49
const
BlockLengthMap
&
blockLengthMap
() const final {
return
m_blockLength
; }
50
51
const
BlockNameMap
&
blockNameMap
() const final {
return
m_blockName
; }
52
53
const
BlkToRctCrateMap
&
rctEmCrateMap
() const final {
return
m_rctEmCrate
; }
54
55
const
BlkToRctCrateMap
&
rctJetCrateMap
() const final {
return
m_rctJetCrate
; }
56
57
const
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
() const final {
return
m_internEmIsoBounds
; }
58
59
60
/* Other general methods */
62
uint32_t
generateRawHeader
(
const
uint32_t blockId,
63
const
uint32_t
nSamples
,
64
const
uint32_t bxId,
65
const
uint32_t eventId)
const override
;
66
67
68
private
:
69
70
/* PRIVATE TYPEDEFS */
71
73
typedef
void (
GctFormatTranslateV35
::*
PtrToUnpackFn
)(
const
unsigned
char
*,
const
GctBlockHeader
&);
75
typedef
std::map<unsigned int, PtrToUnpackFn>
BlockIdToUnpackFnMap
;
76
77
78
/* PRIVATE MEMBER DATA */
79
81
static
const
BlockLengthMap
m_blockLength
;
82
84
static
const
BlockNameMap
m_blockName
;
85
87
static
const
BlkToRctCrateMap
m_rctEmCrate
;
88
90
static
const
BlkToRctCrateMap
m_rctJetCrate
;
91
94
static
const
BlockIdToEmCandIsoBoundMap
m_internEmIsoBounds
;
95
97
static
const
BlockIdToUnpackFnMap
m_blockUnpackFn
;
98
99
100
/* PRIVATE METHODS */
101
102
/* --------------------------------- */
103
/* Private Block Unpacking Functions */
104
/* --------------------------------- */
105
107
void
blockToGctEmCandsAndEnergySums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
108
110
void
blockToGctJetCandsAndCounts
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
111
113
void
blockToGctInternEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
114
116
void
blockToRctEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
117
119
void
blockToRctCaloRegions
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
120
122
void
blockToFibres
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
123
125
void
blockToFibresAndToRctEmCand
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
126
128
void
blockToGctInternEtSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
129
131
void
blockToGctInternEtSumsAndJetCluster
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
132
134
void
blockToGctTrigObjects
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
135
137
void
blockToGctJetClusterMinimal
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
138
140
void
blockToGctJetPreCluster
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
141
143
void
blockToGctInternRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
144
146
void
blockToGctWheelOutputInternEtAndRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
147
149
void
blockToGctWheelInputInternEtAndRingSums
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
150
};
151
152
#endif
GctFormatTranslateV35::m_rctJetCrate
static const BlkToRctCrateMap m_rctJetCrate
Map to relate capture block ID to the RCT crate the data originated from (for jets).
Definition:
GctFormatTranslateV35.h:90
GctFormatTranslateV35::generateBlockHeader
GctBlockHeader generateBlockHeader(const unsigned char *data) const override
Generate a block header from four 8-bit values.
Definition:
GctFormatTranslateV35.cc:549
GctFormatTranslateV35::blockToRctCaloRegions
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
Definition:
GctFormatTranslateV35.cc:826
GctFormatTranslateV35::internEmIsoBounds
const BlockIdToEmCandIsoBoundMap & internEmIsoBounds() const final
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV35.h:57
GctFormatTranslateV35::GctFormatTranslateV35
GctFormatTranslateV35(bool hltMode=false, bool unpackSharedRegions=false)
Constructor.
Definition:
GctFormatTranslateV35.cc:540
GctFormatTranslateV35::blockToGctJetCandsAndCounts
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Definition:
GctFormatTranslateV35.cc:670
GctFormatTranslateBase
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
Definition:
GctFormatTranslateBase.h:27
GctFormatTranslateV35::blockToGctJetPreCluster
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Definition:
GctFormatTranslateV35.cc:999
GctFormatTranslateV35::PtrToUnpackFn
void(GctFormatTranslateV35::* PtrToUnpackFn)(const unsigned char *, const GctBlockHeader &)
Function pointer typdef to a block unpack function.
Definition:
GctFormatTranslateV35.h:73
GctFormatTranslateV35::blockToFibres
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
Definition:
GctFormatTranslateV35.cc:879
GctFormatTranslateV35::blockToGctInternRingSums
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
Definition:
GctFormatTranslateV35.cc:1022
GctFormatTranslateBase.h
GctFormatTranslateV35::blockToGctTrigObjects
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
Definition:
GctFormatTranslateV35.cc:953
GctFormatTranslateV35::blockToGctEmCandsAndEnergySums
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
Definition:
GctFormatTranslateV35.cc:617
GctFormatTranslateV35::~GctFormatTranslateV35
~GctFormatTranslateV35() override
Destructor.
Definition:
GctFormatTranslateV35.cc:545
GctFormatTranslateV35::m_internEmIsoBounds
static const BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
Definition:
GctFormatTranslateV35.h:94
GctFormatTranslateBase::unpackSharedRegions
bool unpackSharedRegions() const
Definition:
GctFormatTranslateBase.h:104
GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Definition:
GctFormatTranslateV35.cc:1047
GctBlockHeader
Simple class for holding the basic attributes of an 32-bit block header.
Definition:
GctBlockHeader.h:16
GctFormatTranslateV35::rctJetCrateMap
const BlkToRctCrateMap & rctJetCrateMap() const final
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV35.h:55
GctFormatTranslateV35::blockLengthMap
const BlockLengthMap & blockLengthMap() const final
get the static block ID to block-length map.
Definition:
GctFormatTranslateV35.h:49
GctFormatTranslateV35
Unpacks/packs the V35 raw format.
Definition:
GctFormatTranslateV35.h:17
GctFormatTranslateV35::blockToGctInternEmCand
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
Definition:
GctFormatTranslateV35.cc:728
GctFormatTranslateV35::blockToGctJetClusterMinimal
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
Definition:
GctFormatTranslateV35.cc:976
GctFormatTranslateBase::BlockLengthMap
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
Definition:
GctFormatTranslateBase.h:68
GctFormatTranslateV35::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:
GctFormatTranslateV35.h:81
GctFormatTranslateBase::hltMode
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
Definition:
GctFormatTranslateBase.h:103
hgc_digi::nSamples
constexpr size_t nSamples
Definition:
HGCDigitizerTypes.h:22
GctFormatTranslateV35::rctEmCrateMap
const BlkToRctCrateMap & rctEmCrateMap() const final
get static the block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV35.h:53
edmIntegrityCheck.d
d
Definition:
edmIntegrityCheck.py:65
GctFormatTranslateV35::blockToGctInternEtSums
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
Definition:
GctFormatTranslateV35.cc:905
GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
Definition:
GctFormatTranslateV35.cc:927
GctFormatTranslateV35::blockToFibresAndToRctEmCand
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:899
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
GctFormatTranslateV35::blockToRctEmCand
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:770
GctFormatTranslateV35::blockNameMap
const BlockNameMap & blockNameMap() const final
get the static block ID to blockname map.
Definition:
GctFormatTranslateV35.h:51
GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
Definition:
GctFormatTranslateBase.h:84
GctFormatTranslateV35::m_rctEmCrate
static const BlkToRctCrateMap m_rctEmCrate
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
Definition:
GctFormatTranslateV35.h:87
GctFormatTranslateV35::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:
GctFormatTranslateV35.cc:595
GctFormatTranslateV35::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:
GctFormatTranslateV35.cc:577
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
GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
Definition:
GctFormatTranslateV35.cc:1076
GctFormatTranslateV35::m_blockName
static const BlockNameMap m_blockName
Map to hold a description for each block number.
Definition:
GctFormatTranslateV35.h:84
GctFormatTranslateV35::m_blockUnpackFn
static const BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
Definition:
GctFormatTranslateV35.h:97
GctFormatTranslateV35::BlockIdToUnpackFnMap
std::map< unsigned int, PtrToUnpackFn > BlockIdToUnpackFnMap
Typedef for a block ID to unpack function map.
Definition:
GctFormatTranslateV35.h:75
Generated for CMSSW Reference Manual by
1.8.11