Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
15
// ************************************************************************
16
// *** THE TRANSLATION PROCESS MUST NEVER THROW ANY KIND OF EXCEPTION! ***
17
// ************************************************************************
18
19
class
GctFormatTranslateV35
:
public
GctFormatTranslateBase
20
{
21
public
:
22
23
/* PUBLIC METHODS */
24
26
28
explicit
GctFormatTranslateV35
(
bool
hltMode
=
false
,
bool
unpackSharedRegions
=
false
);
29
30
virtual
~GctFormatTranslateV35
();
31
33
virtual
GctBlockHeader
generateBlockHeader
(
const
unsigned
char
*
data
)
const
;
34
36
virtual
bool
convertBlock
(
const
unsigned
char
* d,
const
GctBlockHeader
& hdr);
37
38
39
/* ------------------------------ */
40
/* Public Block Packing Functions */
41
/* ------------------------------ */
42
43
// -- TO DO --
44
45
46
protected
:
47
48
/* PROTECTED METHODS */
49
50
/* Static data member access methods */
51
virtual
BlockLengthMap
&
blockLengthMap
() {
return
m_blockLength
; }
52
virtual
const
BlockLengthMap
&
blockLengthMap
()
const
{
return
m_blockLength
; }
53
54
virtual
BlockNameMap
&
blockNameMap
() {
return
m_blockName
; }
55
virtual
const
BlockNameMap
&
blockNameMap
()
const
{
return
m_blockName
; }
56
57
virtual
BlkToRctCrateMap
&
rctEmCrateMap
() {
return
m_rctEmCrate
; }
58
virtual
const
BlkToRctCrateMap
&
rctEmCrateMap
()
const
{
return
m_rctEmCrate
; }
59
60
virtual
BlkToRctCrateMap
&
rctJetCrateMap
() {
return
m_rctJetCrate
; }
61
virtual
const
BlkToRctCrateMap
&
rctJetCrateMap
()
const
{
return
m_rctJetCrate
; }
62
63
virtual
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
() {
return
m_internEmIsoBounds
; }
64
virtual
const
BlockIdToEmCandIsoBoundMap
&
internEmIsoBounds
()
const
{
return
m_internEmIsoBounds
; }
65
66
67
/* Other general methods */
69
virtual
uint32_t
generateRawHeader
(
const
uint32_t blockId,
70
const
uint32_t nSamples,
71
const
uint32_t bxId,
72
const
uint32_t eventId)
const
;
73
74
75
private
:
76
77
/* PRIVATE TYPEDEFS */
78
80
typedef
void (
GctFormatTranslateV35
::*
PtrToUnpackFn
)(
const
unsigned
char
*,
const
GctBlockHeader
&);
82
typedef
std::map<unsigned int, PtrToUnpackFn>
BlockIdToUnpackFnMap
;
83
84
85
/* PRIVATE MEMBER DATA */
86
88
static
BlockLengthMap
m_blockLength
;
89
91
static
BlockNameMap
m_blockName
;
92
94
static
BlkToRctCrateMap
m_rctEmCrate
;
95
97
static
BlkToRctCrateMap
m_rctJetCrate
;
98
101
static
BlockIdToEmCandIsoBoundMap
m_internEmIsoBounds
;
102
104
static
BlockIdToUnpackFnMap
m_blockUnpackFn
;
105
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
};
158
159
#endif
GctFormatTranslateV35::rctJetCrateMap
virtual BlkToRctCrateMap & rctJetCrateMap()
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV35.h:60
GctFormatTranslateV35::generateBlockHeader
virtual GctBlockHeader generateBlockHeader(const unsigned char *data) const
Generate a block header from four 8-bit values.
Definition:
GctFormatTranslateV35.cc:555
GctFormatTranslateV35::rctEmCrateMap
virtual const BlkToRctCrateMap & rctEmCrateMap() const
get static the block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV35.h:58
GctFormatTranslateV35::m_blockLength
static BlockLengthMap m_blockLength
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).
Definition:
GctFormatTranslateV35.h:88
GctFormatTranslateV35::blockToRctCaloRegions
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
Definition:
GctFormatTranslateV35.cc:829
GctFormatTranslateV35::blockNameMap
virtual const BlockNameMap & blockNameMap() const
get the static block ID to blockname map.
Definition:
GctFormatTranslateV35.h:55
GctFormatTranslateV35::GctFormatTranslateV35
GctFormatTranslateV35(bool hltMode=false, bool unpackSharedRegions=false)
Constructor.
Definition:
GctFormatTranslateV35.cc:27
GctFormatTranslateV35::blockToGctJetCandsAndCounts
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Definition:
GctFormatTranslateV35.cc:676
GctFormatTranslateBase
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
Definition:
GctFormatTranslateBase.h:29
GctFormatTranslateV35::blockToGctJetPreCluster
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Definition:
GctFormatTranslateV35.cc:1001
GctFormatTranslateV35::convertBlock
virtual bool convertBlock(const unsigned char *d, const GctBlockHeader &hdr)
Get digis from the block - will return true if it succeeds, false otherwise.
Definition:
GctFormatTranslateV35.cc:583
GctFormatTranslateV35::blockToFibres
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
Definition:
GctFormatTranslateV35.cc:881
GctFormatTranslateV35::blockToGctInternRingSums
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
Definition:
GctFormatTranslateV35.cc:1024
GctFormatTranslateBase.h
GctFormatTranslateV35::blockToGctTrigObjects
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
Definition:
GctFormatTranslateV35.cc:955
GctFormatTranslateV35::blockToGctEmCandsAndEnergySums
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
Definition:
GctFormatTranslateV35.cc:623
GctFormatTranslateV35::internEmIsoBounds
virtual const BlockIdToEmCandIsoBoundMap & internEmIsoBounds() const
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV35.h:64
GctFormatTranslateV35::rctEmCrateMap
virtual BlkToRctCrateMap & rctEmCrateMap()
get the static block ID to RCT crate map for electrons.
Definition:
GctFormatTranslateV35.h:57
GctFormatTranslateBase::unpackSharedRegions
bool unpackSharedRegions() const
Definition:
GctFormatTranslateBase.h:111
GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Definition:
GctFormatTranslateV35.cc:1049
GctBlockHeader
Simple class for holding the basic attributes of an 32-bit block header.
Definition:
GctBlockHeader.h:18
GctFormatTranslateV35::generateRawHeader
virtual uint32_t generateRawHeader(const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.
Definition:
GctFormatTranslateV35.cc:601
GctFormatTranslateV35
Unpacks/packs the V35 raw format.
Definition:
GctFormatTranslateV35.h:19
GctFormatTranslateV35::m_rctEmCrate
static BlkToRctCrateMap m_rctEmCrate
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
Definition:
GctFormatTranslateV35.h:94
GctFormatTranslateV35::blockToGctInternEmCand
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
Definition:
GctFormatTranslateV35.cc:734
GctFormatTranslateV35::blockNameMap
virtual BlockNameMap & blockNameMap()
get the static block ID to block-name map.
Definition:
GctFormatTranslateV35.h:54
GctFormatTranslateV35::blockToGctJetClusterMinimal
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
Definition:
GctFormatTranslateV35.cc:978
GctFormatTranslateV35::blockLengthMap
virtual BlockLengthMap & blockLengthMap()
get the static block ID to block-length map.
Definition:
GctFormatTranslateV35.h:51
GctFormatTranslateBase::BlockLengthMap
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
Definition:
GctFormatTranslateBase.h:70
GctFormatTranslateBase::hltMode
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
Definition:
GctFormatTranslateBase.h:110
GctFormatTranslateV35::blockToGctInternEtSums
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
Definition:
GctFormatTranslateV35.cc:907
GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
Definition:
GctFormatTranslateV35.cc:929
GctFormatTranslateV35::m_rctJetCrate
static BlkToRctCrateMap m_rctJetCrate
Map to relate capture block ID to the RCT crate the data originated from (for jets).
Definition:
GctFormatTranslateV35.h:97
GctFormatTranslateV35::blockLengthMap
virtual const BlockLengthMap & blockLengthMap() const
get the static block ID to block-length map.
Definition:
GctFormatTranslateV35.h:52
GctFormatTranslateV35::blockToFibresAndToRctEmCand
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:901
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
GctFormatTranslateV35::~GctFormatTranslateV35
virtual ~GctFormatTranslateV35()
Destructor.
Definition:
GctFormatTranslateV35.cc:551
GctFormatTranslateV35::m_blockUnpackFn
static BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
Definition:
GctFormatTranslateV35.h:104
GctFormatTranslateV35::blockToRctEmCand
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
Definition:
GctFormatTranslateV35.cc:775
GctFormatTranslateV35::rctJetCrateMap
virtual const BlkToRctCrateMap & rctJetCrateMap() const
get the static block ID to RCT crate map for jets
Definition:
GctFormatTranslateV35.h:61
GctFormatTranslateBase::BlockIdToEmCandIsoBoundMap
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
Definition:
GctFormatTranslateBase.h:86
GctFormatTranslateBase::BlkToRctCrateMap
std::map< unsigned int, unsigned int > BlkToRctCrateMap
Typedef for mapping block ID to RCT crate.
Definition:
GctFormatTranslateBase.h:76
GctFormatTranslateBase::BlockNameMap
std::map< unsigned int, std::string > BlockNameMap
Block ID to Block Description map.
Definition:
GctFormatTranslateBase.h:72
GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
Definition:
GctFormatTranslateV35.cc:1078
GctFormatTranslateV35::m_blockName
static BlockNameMap m_blockName
Map to hold a description for each block number.
Definition:
GctFormatTranslateV35.h:91
GctFormatTranslateV35::internEmIsoBounds
virtual BlockIdToEmCandIsoBoundMap & internEmIsoBounds()
get the static intern EM cand isolated boundary map.
Definition:
GctFormatTranslateV35.h:63
GctFormatTranslateV35::PtrToUnpackFn
void(GctFormatTranslateV35::* PtrToUnpackFn)(const unsigned char *, const GctBlockHeader &)
Function pointer typdef to a block unpack function.
Definition:
GctFormatTranslateV35.h:80
GctFormatTranslateV35::BlockIdToUnpackFnMap
std::map< unsigned int, PtrToUnpackFn > BlockIdToUnpackFnMap
Typedef for a block ID to unpack function map.
Definition:
GctFormatTranslateV35.h:82
GctFormatTranslateV35::m_internEmIsoBounds
static BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
Definition:
GctFormatTranslateV35.h:101
Generated for CMSSW Reference Manual by
1.8.5