#include <CRC32Calculator.h>
Public Member Functions | |
boost::uint32_t | checksum () |
CRC32Calculator (std::string const &message) | |
Private Attributes | |
boost::uint32_t | checksum_ |
Definition at line 62 of file CRC32Calculator.h.
cms::CRC32Calculator::CRC32Calculator | ( | std::string const & | message | ) |
Definition at line 81 of file CRC32Calculator.cc.
References checksum_, j, and AlCaHLTBitMon_ParallelJobs::p.
{ /* initialize value */ checksum_ = CRC32_XINIT; /* process each byte prior to checksum field */ int length = message.length(); char const* p = message.data(); for (int j = 0; j < length; j++) { unsigned char uc = *p++; checksum_ = cms::crctable[(checksum_ ^ uc) & 0xFFL] ^ (checksum_ >> 8); } /* return XOR out value */ checksum_ = checksum_ ^ CRC32_XOROT; }
boost::uint32_t cms::CRC32Calculator::checksum | ( | ) | [inline] |
Definition at line 68 of file CRC32Calculator.h.
References checksum_.
Referenced by edm::BranchID::toID().
{ return checksum_; }
boost::uint32_t cms::CRC32Calculator::checksum_ [private] |
Definition at line 72 of file CRC32Calculator.h.
Referenced by checksum(), and CRC32Calculator().