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