FairRoot/PandaRoot
PndHammingDecoder.h
Go to the documentation of this file.
1 /*
2  * PndHammingEncoder.h
3  *
4  * Created on: 16.09.2015
5  * Author: Stockmanns
6  */
7 
8 #ifndef MVD_MVDOFFLINETBANALYSIS_TOPIX4_PNDHAMMINGDECODER_H_
9 #define MVD_MVDOFFLINETBANALYSIS_TOPIX4_PNDHAMMINGDECODER_H_
10 
11 #include "Rtypes.h"
12 
14 public:
16  virtual ~PndHammingDecoder();
17 
18  UShort_t CheckHammingCode(ULong64_t dataword, int dataword_length);
19  ULong64_t CalculateCRCTableFast(std::vector<char> p, ULong64_t len);
20  ULong64_t ReflectBitsStream(ULong64_t crc, int bitnum);
21  std::vector<char> ConvertData(std::vector<ULong64_t> topixFrame);
22 
23 protected:
24  void GenerateCRCTable();
25 
26 private:
27  // CRC parameters :
28 
29  const UInt_t fOrder;
30  const ULong64_t fPolynom;
31  const ULong64_t fCRCXor;
32  const UInt_t fRefIn;
33  const UInt_t fRefOut;
34 
35  ULong64_t fCRCMask;
36  ULong64_t fCRCHighBit;
37  ULong64_t fCRCInit_direct;
38  ULong64_t fCRCTab[256];
39 };
40 
41 #endif /* MVD_MVDOFFLINETBANALYSIS_TOPIX4_PNDHAMMINGDECODER_H_ */
std::vector< char > ConvertData(std::vector< ULong64_t > topixFrame)
const ULong64_t fPolynom
const ULong64_t fCRCXor
Double_t p
Definition: anasim.C:58
ULong64_t fCRCTab[256]
ULong64_t CalculateCRCTableFast(std::vector< char > p, ULong64_t len)
const UInt_t fRefOut
ULong64_t ReflectBitsStream(ULong64_t crc, int bitnum)
UShort_t CheckHammingCode(ULong64_t dataword, int dataword_length)