Go to the documentation of this file.00001 #ifndef ErrorChecker_H
00002 #define ErrorChecker_H
00003
00008 #include "DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h"
00009 #include "FWCore/Utilities/interface/typedefs.h"
00010
00011 #include <vector>
00012 #include <map>
00013
00014 class FEDRawData;
00015
00016 class SiPixelFrameConverter;
00017
00018 class ErrorChecker {
00019
00020 public:
00021
00022
00023 typedef cms_uint32_t Word32;
00024 typedef cms_uint64_t Word64;
00025
00026 typedef std::vector<SiPixelRawDataError> DetErrors;
00027 typedef std::map<cms_uint32_t, DetErrors> Errors;
00028
00029 ErrorChecker();
00030
00031 void setErrorStatus(bool ErrorStatus);
00032
00033 bool checkCRC(bool& errorsInEvent, int fedId, const Word64* trailer, Errors& errors);
00034
00035 bool checkHeader(bool& errorsInEvent, int fedId, const Word64* header, Errors& errors);
00036
00037 bool checkTrailer(bool& errorsInEvent, int fedId, int nWords, const Word64* trailer, Errors& errors);
00038
00039 bool checkROC(bool& errorsInEvent, int fedId, const SiPixelFrameConverter* converter,
00040 Word32& errorWord, Errors& errors);
00041
00042 void conversionError(int fedId, const SiPixelFrameConverter* converter,
00043 int status, Word32& errorWord, Errors& errors);
00044
00045 private:
00046 bool includeErrors;
00047
00048 cms_uint32_t errorDetId(const SiPixelFrameConverter* converter,
00049 int errorType, const Word32 & word) const;
00050
00051 };
00052
00053 #endif