CMS 3D CMS Logo

SiPixelCalibDigiError.h
Go to the documentation of this file.
1 //---------------------------------------------------
2 
3 // Author : Freya.Blekman@NOSPAM.cern.ch
4 // Name : SiPixelCalibDigiError
5 
6 //---------------------------------------------------
7 
8 #ifndef DataFormats_SiPixelCalibDigi_SiPixelCalibDigiError_H
9 #define DataFormats_SiPixelCalibDigi_SiPixelCalibDigiError_H
10 
11 #include <iostream>
12 #include <utility>
13 #include <string>
14 #include <cstdint>
15 
17 private:
18  uint16_t fRow; // row number
19  uint16_t fCol; // column number
20  uint8_t fErrorType; // error type in case we want to label errors
21 
22 public:
24 
25  SiPixelCalibDigiError(uint16_t row, uint16_t col) : fRow(row), fCol(col), fErrorType(0) { ; }
26  SiPixelCalibDigiError(uint16_t row, uint16_t col, uint16_t error) : fRow(row), fCol(col), fErrorType(error) { ; }
27 
28  virtual ~SiPixelCalibDigiError() { ; }
29 
30  //- Accessible methods
31 
32  //-- Setter/Getter
33 
34  uint16_t getRow() const { return fRow; }
35  void setRow(const uint16_t& in) { fRow = in; }
36 
37  uint16_t getCol() const { return fCol; }
38  void setCol(const uint16_t& in) { fCol = in; }
39 
40  uint16_t getErrorType() const { return fErrorType; }
41  void setErrorType(const uint16_t& in) { fErrorType = in; }
42  std::string printError() const;
43 };
45  if (one.getCol() != other.getCol())
46  return one.getCol() < other.getCol();
47 
48  return one.getRow() < other.getRow();
49 }
50 inline std::ostream& operator<<(std::ostream& output, const SiPixelCalibDigiError& err) {
51  std::string errorstr = err.printError();
52  return output << "pixel SiCalibDigi error in row " << err.getRow() << ", column " << err.getCol() << " of type "
53  << err.getErrorType() << " (" << errorstr << ")";
54 }
55 #endif
std::string printError() const
bool operator<(const SiPixelCalibDigiError &one, const SiPixelCalibDigiError other)
void setErrorType(const uint16_t &in)
uint16_t getErrorType() const
SiPixelCalibDigiError(uint16_t row, uint16_t col, uint16_t error)
void setCol(const uint16_t &in)
std::ostream & operator<<(std::ostream &output, const SiPixelCalibDigiError &err)
SiPixelCalibDigiError(uint16_t row, uint16_t col)
col
Definition: cuy.py:1009
void setRow(const uint16_t &in)