Go to the documentation of this file.00001 #ifndef GctFormatTranslateV35_h_
00002 #define GctFormatTranslateV35_h_
00003
00004 #include "EventFilter/GctRawToDigi/src/GctFormatTranslateBase.h"
00005
00015
00016
00017
00018
00019 class GctFormatTranslateV35 : public GctFormatTranslateBase
00020 {
00021 public:
00022
00023
00024
00026
00028 explicit GctFormatTranslateV35(bool hltMode = false, bool unpackSharedRegions = false);
00029
00030 virtual ~GctFormatTranslateV35();
00031
00033 virtual GctBlockHeader generateBlockHeader(const unsigned char * data) const;
00034
00036 virtual bool convertBlock(const unsigned char * d, const GctBlockHeader& hdr);
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 protected:
00047
00048
00049
00050
00051 virtual BlockLengthMap& blockLengthMap() { return m_blockLength; }
00052 virtual const BlockLengthMap& blockLengthMap() const { return m_blockLength; }
00053
00054 virtual BlockNameMap& blockNameMap() { return m_blockName; }
00055 virtual const BlockNameMap& blockNameMap() const { return m_blockName; }
00056
00057 virtual BlkToRctCrateMap& rctEmCrateMap() { return m_rctEmCrate; }
00058 virtual const BlkToRctCrateMap& rctEmCrateMap() const { return m_rctEmCrate; }
00059
00060 virtual BlkToRctCrateMap& rctJetCrateMap() { return m_rctJetCrate; }
00061 virtual const BlkToRctCrateMap& rctJetCrateMap() const { return m_rctJetCrate; }
00062
00063 virtual BlockIdToEmCandIsoBoundMap& internEmIsoBounds() { return m_internEmIsoBounds; }
00064 virtual const BlockIdToEmCandIsoBoundMap& internEmIsoBounds() const { return m_internEmIsoBounds; }
00065
00066
00067
00069 virtual uint32_t generateRawHeader(const uint32_t blockId,
00070 const uint32_t nSamples,
00071 const uint32_t bxId,
00072 const uint32_t eventId) const;
00073
00074
00075 private:
00076
00077
00078
00080 typedef void (GctFormatTranslateV35::*PtrToUnpackFn)(const unsigned char *, const GctBlockHeader&);
00082 typedef std::map<unsigned int, PtrToUnpackFn> BlockIdToUnpackFnMap;
00083
00084
00085
00086
00088 static BlockLengthMap m_blockLength;
00089
00091 static BlockNameMap m_blockName;
00092
00094 static BlkToRctCrateMap m_rctEmCrate;
00095
00097 static BlkToRctCrateMap m_rctJetCrate;
00098
00101 static BlockIdToEmCandIsoBoundMap m_internEmIsoBounds;
00102
00104 static BlockIdToUnpackFnMap m_blockUnpackFn;
00105
00106
00107
00108
00109
00110
00111
00112
00114 void blockToGctEmCandsAndEnergySums(const unsigned char * d, const GctBlockHeader& hdr);
00115
00117 void blockToGctJetCandsAndCounts(const unsigned char * d, const GctBlockHeader& hdr);
00118
00120 void blockToGctInternEmCand(const unsigned char * d, const GctBlockHeader& hdr);
00121
00123 void blockToRctEmCand(const unsigned char * d, const GctBlockHeader& hdr);
00124
00126 void blockToRctCaloRegions(const unsigned char * d, const GctBlockHeader& hdr);
00127
00129 void blockToFibres(const unsigned char * d, const GctBlockHeader& hdr);
00130
00132 void blockToFibresAndToRctEmCand(const unsigned char * d, const GctBlockHeader& hdr);
00133
00135 void blockToGctInternEtSums(const unsigned char * d, const GctBlockHeader& hdr);
00136
00138 void blockToGctInternEtSumsAndJetCluster(const unsigned char * d, const GctBlockHeader& hdr);
00139
00141 void blockToGctTrigObjects(const unsigned char * d, const GctBlockHeader& hdr);
00142
00144 void blockToGctJetClusterMinimal(const unsigned char * d, const GctBlockHeader& hdr);
00145
00147 void blockToGctJetPreCluster(const unsigned char * d, const GctBlockHeader& hdr);
00148
00150 void blockToGctInternRingSums(const unsigned char * d, const GctBlockHeader& hdr);
00151
00153 void blockToGctWheelOutputInternEtAndRingSums(const unsigned char * d, const GctBlockHeader& hdr);
00154
00156 void blockToGctWheelInputInternEtAndRingSums(const unsigned char * d, const GctBlockHeader& hdr);
00157 };
00158
00159 #endif