src
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
public
:
19
/* PUBLIC METHODS */
20
22
24
explicit
GctFormatTranslateV35
(
bool
hltMode
=
false
,
bool
unpackSharedRegions
=
false
);
25
26
~GctFormatTranslateV35
()
override
;
27
29
GctBlockHeader
generateBlockHeader
(
const
unsigned
char
*
data
)
const override
;
30
32
bool
convertBlock
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr)
override
;
33
34
/* ------------------------------ */
35
/* Public Block Packing Functions */
36
/* ------------------------------ */
37
38
// -- TO DO --
39
40
protected
:
41
/* PROTECTED METHODS */
42
43
/* Static data member access methods */
44
const
BlockLengthMap
&
blockLengthMap
()
const
final {
45
return
m_blockLength
;
46
}
47
48
const
BlockNameMap
&
blockNameMap
()
const
final {
return
m_blockName
; }
49
50
const
BlkToRctCrateMap
&
rctEmCrateMap
()
const
final {
51
return
m_rctEmCrate
;
52
}
53
54
const
BlkToRctCrateMap
&
rctJetCrateMap
()
const
final {
55
return
m_rctJetCrate
;
56
}
57
58
const
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
()
const
final {
59
return
m_internEmIsoBounds
;
60
}
61
62
/* Other general methods */
64
uint32_t
generateRawHeader
(
const
uint32_t blockId,
65
const
uint32_t
nSamples
,
66
const
uint32_t bxId,
67
const
uint32_t eventId)
const override
;
68
69
private
:
70
/* PRIVATE TYPEDEFS */
71
73
typedef
void
(
GctFormatTranslateV35
::*
PtrToUnpackFn
)(
const
unsigned
char
*,
const
GctBlockHeader
&);
75
typedef
std::map<unsigned int, PtrToUnpackFn>
BlockIdToUnpackFnMap
;
76
77
/* PRIVATE MEMBER DATA */
78
80
static
const
BlockLengthMap
m_blockLength
;
81
83
static
const
BlockNameMap
m_blockName
;
84
86
static
const
BlkToRctCrateMap
m_rctEmCrate
;
87
89
static
const
BlkToRctCrateMap
m_rctJetCrate
;
90
93
static
const
BlockIdToEmCandIsoBoundMap
m_internEmIsoBounds
;
94
96
static
const
BlockIdToUnpackFnMap
m_blockUnpackFn
;
97
98
/* PRIVATE METHODS */
99
100
/* --------------------------------- */
101
/* Private Block Unpacking Functions */
102
/* --------------------------------- */
103
105
void
blockToGctEmCandsAndEnergySums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
106
108
void
blockToGctJetCandsAndCounts
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
109
111
void
blockToGctInternEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
112
114
void
blockToRctEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
115
117
void
blockToRctCaloRegions
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
118
120
void
blockToFibres
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
121
123
void
blockToFibresAndToRctEmCand
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
124
126
void
blockToGctInternEtSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
127
129
void
blockToGctInternEtSumsAndJetCluster
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
130
132
void
blockToGctTrigObjects
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
133
135
void
blockToGctJetClusterMinimal
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
136
138
void
blockToGctJetPreCluster
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
139
141
void
blockToGctInternRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
142
144
void
blockToGctWheelOutputInternEtAndRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
145
147
void
blockToGctWheelInputInternEtAndRingSums
(
const
unsigned
char
*
d
,
const
GctBlockHeader
& hdr);
148
};
149
150
#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:89
GctFormatTranslateV35::rctEmCrateMap
const BlkToRctCrateMap & rctEmCrateMap() const final
get static the block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV35.h:50
runTheMatrix.const
const
Definition:
runTheMatrix.py:373
GctFormatTranslateV35::blockToRctCaloRegions
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
Definition:
GctFormatTranslateV35.cc:848
GctFormatTranslateV35::GctFormatTranslateV35
GctFormatTranslateV35(bool hltMode=false, bool unpackSharedRegions=false)
Constructor.
Definition:
GctFormatTranslateV35.cc:559
GctFormatTranslateV35::blockToGctJetCandsAndCounts
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Definition:
GctFormatTranslateV35.cc:692
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:614
GctFormatTranslateBase
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
Definition:
GctFormatTranslateBase.h:25
GctFormatTranslateV35::blockToGctJetPreCluster
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Definition:
GctFormatTranslateV35.cc:1038
GctFormatTranslateBase::unpackSharedRegions
bool unpackSharedRegions() const
Definition:
GctFormatTranslateBase.h:101
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:903
GctFormatTranslateV35::blockToGctInternRingSums
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
Definition:
GctFormatTranslateV35.cc:1065
GctFormatTranslateV35::blockNameMap
const BlockNameMap & blockNameMap() const final
get the static block ID to blockname map.
Definition:
GctFormatTranslateV35.h:48
GctFormatTranslateV35::internEmIsoBounds
const BlockIdToEmCandIsoBoundMap & internEmIsoBounds() const final
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV35.h:58
funct::void
TEMPL(T2) struct Divides void
Definition:
Factorize.h:24
GctFormatTranslateV35::blockLengthMap
const BlockLengthMap & blockLengthMap() const final
get the static block ID to block-length map.
Definition:
GctFormatTranslateV35.h:44
GctFormatTranslateBase.h
GctFormatTranslateV35::blockToGctTrigObjects
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
Definition:
GctFormatTranslateV35.cc:984
GctFormatTranslateV35::blockToGctEmCandsAndEnergySums
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
Definition:
GctFormatTranslateV35.cc:634
GctFormatTranslateV35::~GctFormatTranslateV35
~GctFormatTranslateV35() override
Destructor.
Definition:
GctFormatTranslateV35.cc:562
GctFormatTranslateV35::m_internEmIsoBounds
static const BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
Definition:
GctFormatTranslateV35.h:93
GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Definition:
GctFormatTranslateV35.cc:1092
GctBlockHeader
Simple class for holding the basic attributes of an 32-bit block header.
Definition:
GctBlockHeader.h:15
GctFormatTranslateV35::generateBlockHeader
GctBlockHeader generateBlockHeader(const unsigned char *data) const override
Generate a block header from four 8-bit values.
Definition:
GctFormatTranslateV35.cc:564
GctFormatTranslateV35
Unpacks/packs the V35 raw format.
Definition:
GctFormatTranslateV35.h:17
GctFormatTranslateBase::hltMode
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
Definition:
GctFormatTranslateBase.h:100
GctFormatTranslateV35::blockToGctInternEmCand
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
Definition:
GctFormatTranslateV35.cc:749
GctFormatTranslateV35::blockToGctJetClusterMinimal
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
Definition:
GctFormatTranslateV35.cc:1011
GctFormatTranslateBase::BlockLengthMap
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
Definition:
GctFormatTranslateBase.h:63
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:80
ztail.d
d
Definition:
ztail.py:151
GctFormatTranslateV35::rctJetCrateMap
const BlkToRctCrateMap & rctJetCrateMap() const final
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV35.h:54
GctFormatTranslateV35::blockToGctInternEtSums
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
Definition:
GctFormatTranslateV35.cc:930
GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
Definition:
GctFormatTranslateV35.cc:954
GctFormatTranslateV35::blockToFibresAndToRctEmCand
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:925
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:80
PresampleTask_cfi.nSamples
nSamples
Definition:
PresampleTask_cfi.py:7
GctFormatTranslateV35::blockToRctEmCand
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:789
GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
Definition:
GctFormatTranslateBase.h:79
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:86
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:593
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
GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
Definition:
GctFormatTranslateV35.cc:1123
GctFormatTranslateV35::m_blockName
static const BlockNameMap m_blockName
Map to hold a description for each block number.
Definition:
GctFormatTranslateV35.h:83
GctFormatTranslateV35::m_blockUnpackFn
static const BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
Definition:
GctFormatTranslateV35.h:96
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.14