CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h

Go to the documentation of this file.
00001 #ifndef DataFormats_SiPixelRawDataError_h
00002 #define DataFormats_SiPixelRawDataError_h
00003 
00004 //---------------------------------------------------------------------------
00012 //---------------------------------------------------------------------------
00013 
00014 #include <string>
00015 #include <stdint.h>
00016 
00017 class SiPixelRawDataError {
00018   public:
00019 
00021     SiPixelRawDataError();
00023     SiPixelRawDataError(uint32_t errorWord32, const int errorType, int fedId);
00025     SiPixelRawDataError(uint64_t errorWord64, const int errorType, int fedId);
00027     ~SiPixelRawDataError();
00028 
00029     void setWord32(uint32_t errorWord32);               // function to allow user to input the error word (if 32-bit) after instantiation
00030     void setWord64(uint64_t errorWord64);               // function to allow user to input the error word (if 64-bit) after instantiation
00031     void setType(int errorType);                        // function to allow user to input the error type after instantiation
00032     void setFedId(int fedId);                           // function to allow user to input the fedID after instantiation
00033     void setMessage();                           // function to create an error message based on errorType
00034 
00035     inline uint32_t getWord32() const {return errorWord32_;} // the 32-bit word that contains the error information
00036     inline uint64_t getWord64() const {return errorWord64_;}    // the 64-bit word that contains the error information
00037     inline int getType() const {return errorType_;}              // the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)
00038     inline int getFedId() const {return fedId_;}                 // the fedId where the error occured
00039     inline std::string getMessage() const {return errorMessage_;}     // the error message to be displayed with the error       
00040 
00041   private:
00042 
00043     uint32_t errorWord32_;
00044     uint64_t errorWord64_;
00045     int errorType_;
00046     int fedId_;
00047     std::string errorMessage_;
00048     
00049 };
00050 
00051 // Comparison operators
00052 inline bool operator<( const SiPixelRawDataError& one, const SiPixelRawDataError& other) {
00053   return one.getFedId() < other.getFedId();
00054 }
00055 
00056 #endif