FairRoot/PandaRoot
|
PndCRCCalculator calculates the CRC checksum from a given vector<char> More...
#include <PndCRCCalculator.h>
Public Member Functions | |
PndCRCCalculator () | |
PndCRCCalculator (UInt_t order, ULong64_t polynom, ULong64_t CRCXor, UInt_t refIn, UInt_t refOut, UInt_t CRCInit_direct) | |
virtual | ~PndCRCCalculator () |
ULong64_t | CalculateCRCTableFast (std::vector< char > p, ULong64_t len) |
ULong64_t | ReflectBitsStream (ULong64_t crc, int bitnum) |
void | PrintCRCTable () |
Protected Member Functions | |
void | GenerateCRCTable () |
Private Member Functions | |
ClassDef (PndCRCCalculator, 1) | |
Private Attributes | |
const UInt_t | fOrder |
const ULong64_t | fPolynom |
const ULong64_t | fCRCXor |
const UInt_t | fRefIn |
const UInt_t | fRefOut |
ULong64_t | fCRCMask |
ULong64_t | fCRCHighBit |
ULong64_t | fCRCInit_direct |
ULong64_t | fCRCTab [256] |
PndCRCCalculator calculates the CRC checksum from a given vector<char>
PndCRCCalculator is based on a look-up table initially calculated from the paramters of the used CRC code. The output of the calculator was cross-checked with the online CRC calculator: http://www.sunshine2k.de/coding/javascript/crc/crc_js.html Both the generated look-up tables as the output match
Definition at line 17 of file PndCRCCalculator.h.
PndCRCCalculator::PndCRCCalculator | ( | ) |
Definition at line 9 of file PndCRCCalculator.cxx.
References fCRCHighBit, fCRCMask, fOrder, and GenerateCRCTable().
PndCRCCalculator::PndCRCCalculator | ( | UInt_t | order, |
ULong64_t | polynom, | ||
ULong64_t | CRCXor, | ||
UInt_t | refIn, | ||
UInt_t | refOut, | ||
UInt_t | CRCInit_direct | ||
) |
Definition at line 18 of file PndCRCCalculator.cxx.
References fCRCHighBit, fCRCMask, fOrder, and GenerateCRCTable().
|
virtual |
Definition at line 28 of file PndCRCCalculator.cxx.
ULong64_t PndCRCCalculator::CalculateCRCTableFast | ( | std::vector< char > | p, |
ULong64_t | len | ||
) |
Definition at line 47 of file PndCRCCalculator.cxx.
References fCRCInit_direct, fCRCMask, fCRCTab, fCRCXor, fOrder, fRefIn, fRefOut, and ReflectBitsStream().
Referenced by CheckCRC().
|
private |
|
protected |
Definition at line 80 of file PndCRCCalculator.cxx.
References fCRCHighBit, fCRCMask, fCRCTab, fOrder, fPolynom, fRefIn, i, and ReflectBitsStream().
Referenced by PndCRCCalculator().
void PndCRCCalculator::PrintCRCTable | ( | ) |
Definition at line 109 of file PndCRCCalculator.cxx.
ULong64_t PndCRCCalculator::ReflectBitsStream | ( | ULong64_t | crc, |
int | bitnum | ||
) |
Definition at line 119 of file PndCRCCalculator.cxx.
References i.
Referenced by CalculateCRCTableFast(), and GenerateCRCTable().
|
private |
Definition at line 44 of file PndCRCCalculator.h.
Referenced by GenerateCRCTable(), and PndCRCCalculator().
|
private |
Definition at line 45 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast().
|
private |
Definition at line 43 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast(), GenerateCRCTable(), and PndCRCCalculator().
|
private |
Definition at line 46 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast(), GenerateCRCTable(), and PrintCRCTable().
|
private |
Definition at line 39 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast().
|
private |
Definition at line 37 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast(), GenerateCRCTable(), and PndCRCCalculator().
|
private |
Definition at line 38 of file PndCRCCalculator.h.
Referenced by GenerateCRCTable().
|
private |
Definition at line 40 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast(), and GenerateCRCTable().
|
private |
Definition at line 41 of file PndCRCCalculator.h.
Referenced by CalculateCRCTableFast().