File indexing completed on 2024-04-06 12:10:41
0001 #ifndef GctFormatTranslateV38_h_
0002 #define GctFormatTranslateV38_h_
0003
0004 #include "EventFilter/GctRawToDigi/src/GctFormatTranslateBase.h"
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 class GctFormatTranslateV38 : public GctFormatTranslateBase {
0018 public:
0019
0020
0021
0022
0023
0024 explicit GctFormatTranslateV38(bool hltMode = false,
0025 bool unpackSharedRegions = false,
0026 unsigned numberOfGctSamplesToUnpack = 1,
0027 unsigned numberOfRctSamplesToUnpack = 1);
0028
0029 ~GctFormatTranslateV38() override;
0030
0031
0032 GctBlockHeader generateBlockHeader(const unsigned char* data) const override;
0033
0034
0035 bool convertBlock(const unsigned char* d, const GctBlockHeader& hdr) override;
0036
0037
0038
0039
0040
0041
0042
0043 protected:
0044
0045
0046
0047 const BlockLengthMap& blockLengthMap() const final {
0048 return m_blockLength;
0049 }
0050
0051 const BlockNameMap& blockNameMap() const final { return m_blockName; }
0052
0053 const BlkToRctCrateMap& rctEmCrateMap() const final {
0054 return m_rctEmCrate;
0055 }
0056
0057 const BlkToRctCrateMap& rctJetCrateMap() const final {
0058 return m_rctJetCrate;
0059 }
0060
0061 const BlockIdToEmCandIsoBoundMap& internEmIsoBounds() const final {
0062 return m_internEmIsoBounds;
0063 }
0064
0065
0066
0067 uint32_t generateRawHeader(const uint32_t blockId,
0068 const uint32_t nSamples,
0069 const uint32_t bxId,
0070 const uint32_t eventId) const override;
0071
0072 private:
0073
0074
0075
0076 typedef void (GctFormatTranslateV38::*PtrToUnpackFn)(const unsigned char*, const GctBlockHeader&);
0077
0078 typedef std::map<unsigned int, PtrToUnpackFn> BlockIdToUnpackFnMap;
0079
0080
0081
0082
0083 static const BlockLengthMap m_blockLength;
0084
0085
0086 static const BlockNameMap m_blockName;
0087
0088
0089 static const BlkToRctCrateMap m_rctEmCrate;
0090
0091
0092 static const BlkToRctCrateMap m_rctJetCrate;
0093
0094
0095
0096 static const BlockIdToEmCandIsoBoundMap m_internEmIsoBounds;
0097
0098
0099 static const BlockIdToUnpackFnMap m_blockUnpackFn;
0100
0101
0102 const unsigned m_numberOfGctSamplesToUnpack;
0103
0104
0105 const unsigned m_numberOfRctSamplesToUnpack;
0106
0107
0108
0109
0110
0111
0112
0113
0114 void blockToGctEmCandsAndEnergySums(const unsigned char* d, const GctBlockHeader& hdr);
0115
0116
0117 void blockToGctJetCandsAndCounts(const unsigned char* d, const GctBlockHeader& hdr);
0118
0119
0120 void blockToGctInternEmCand(const unsigned char* d, const GctBlockHeader& hdr);
0121
0122
0123 void blockToRctEmCand(const unsigned char* d, const GctBlockHeader& hdr);
0124
0125
0126 void blockToRctCaloRegions(const unsigned char* d, const GctBlockHeader& hdr);
0127
0128
0129 void blockToFibres(const unsigned char* d, const GctBlockHeader& hdr);
0130
0131
0132 void blockToFibresAndToRctEmCand(const unsigned char* d, const GctBlockHeader& hdr);
0133
0134
0135 void blockToGctInternEtSums(const unsigned char* d, const GctBlockHeader& hdr);
0136
0137
0138 void blockToGctInternEtSumsAndJetCluster(const unsigned char* d, const GctBlockHeader& hdr);
0139
0140
0141 void blockToGctTrigObjects(const unsigned char* d, const GctBlockHeader& hdr);
0142
0143
0144 void blockToGctJetClusterMinimal(const unsigned char* d, const GctBlockHeader& hdr);
0145
0146
0147 void blockToGctJetPreCluster(const unsigned char* d, const GctBlockHeader& hdr);
0148
0149
0150 void blockToGctInternRingSums(const unsigned char* d, const GctBlockHeader& hdr);
0151
0152
0153 void blockToGctWheelOutputInternEtAndRingSums(const unsigned char* d, const GctBlockHeader& hdr);
0154
0155
0156 void blockToGctWheelInputInternEtAndRingSums(const unsigned char* d, const GctBlockHeader& hdr);
0157
0158
0159 void blockToGctInternHtMissPreWheel(const unsigned char* d, const GctBlockHeader& hdr);
0160
0161
0162 void blockToGctInternHtMissPostWheel(const unsigned char* d, const GctBlockHeader& hdr);
0163 };
0164
0165 #endif