CMS 3D CMS Logo

SiPixelCalibDigiError.h

Go to the documentation of this file.
00001 //---------------------------------------------------
00002 
00003 // Author : Freya.Blekman@NOSPAM.cern.ch
00004 // Name   : SiPixelCalibDigiError
00005 
00006 //---------------------------------------------------
00007 
00008 #ifndef DataFormats_SiPixelCalibDigi_SiPixelCalibDigiError_H
00009 #define DataFormats_SiPixelCalibDigi_SiPixelCalibDigiError_H
00010 
00011 #include <iostream>
00012 #include <utility>
00013 #include <string>
00014 #include "boost/cstdint.hpp"
00015 
00016 class SiPixelCalibDigiError
00017 {
00018  private :
00019 
00020   uint16_t  fRow;// row number
00021   uint16_t  fCol;// column number
00022   uint8_t  fErrorType;// error type in case we want to label errors
00023 
00024  public :
00025 
00026   SiPixelCalibDigiError():fRow(0),fCol(0),fErrorType(0) {;}
00027    
00028   SiPixelCalibDigiError(uint16_t row, uint16_t col):fRow(row),fCol(col),fErrorType(0) {;} 
00029   SiPixelCalibDigiError(uint16_t row, uint16_t col,uint16_t error):fRow(row),fCol(col),fErrorType(error) {;}
00030 
00031   virtual ~SiPixelCalibDigiError(){;}
00032 
00033  //- Accessible methods
00034 
00035  //-- Setter/Getter
00036 
00037   uint16_t  getRow() const { return fRow;}
00038   void  setRow(const uint16_t & in) { fRow = in; }
00039 
00040   uint16_t  getCol() const { return fCol;}
00041   void  setCol(const uint16_t & in) { fCol = in; }
00042 
00043   uint16_t  getErrorType() const { return fErrorType;}
00044   void  setErrorType(const uint16_t & in) { fErrorType = in; }
00045   std::string printError() const;
00046   
00047 };
00048 inline bool operator <( const SiPixelCalibDigiError & one, const SiPixelCalibDigiError other){
00049   if(one.getCol()!=other.getCol())
00050     return one.getCol() < other.getCol();
00051   
00052   return one.getRow() < other.getRow();
00053   
00054 }
00055 inline std::ostream & operator << (std::ostream & output, const SiPixelCalibDigiError & err)
00056 {
00057   std::string errorstr = err.printError();
00058   return output << "pixel SiCalibDigi error in row " << err.getRow() << ", column " << err.getCol() << " of type " << err.getErrorType() << " (" << errorstr << ")";
00059 
00060 }
00061 #endif
00062 

Generated on Tue Jun 9 17:31:41 2009 for CMSSW by  doxygen 1.5.4