test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 "boost/cstdint.hpp"
15 
17 {
18  private :
19 
20  uint16_t fRow;// row number
21  uint16_t fCol;// column number
22  uint8_t fErrorType;// error type in case we want to label errors
23 
24  public :
25 
27 
28  SiPixelCalibDigiError(uint16_t row, uint16_t col):fRow(row),fCol(col),fErrorType(0) {;}
29  SiPixelCalibDigiError(uint16_t row, uint16_t col,uint16_t error):fRow(row),fCol(col),fErrorType(error) {;}
30 
32 
33  //- Accessible methods
34 
35  //-- Setter/Getter
36 
37  uint16_t getRow() const { return fRow;}
38  void setRow(const uint16_t & in) { fRow = in; }
39 
40  uint16_t getCol() const { return fCol;}
41  void setCol(const uint16_t & in) { fCol = in; }
42 
43  uint16_t getErrorType() const { return fErrorType;}
44  void setErrorType(const uint16_t & in) { fErrorType = in; }
45  std::string printError() const;
46 
47 };
48 inline bool operator <( const SiPixelCalibDigiError & one, const SiPixelCalibDigiError other){
49  if(one.getCol()!=other.getCol())
50  return one.getCol() < other.getCol();
51 
52  return one.getRow() < other.getRow();
53 
54 }
55 inline std::ostream & operator << (std::ostream & output, const SiPixelCalibDigiError & err)
56 {
57  std::string errorstr = err.printError();
58  return output << "pixel SiCalibDigi error in row " << err.getRow() << ", column " << err.getCol() << " of type " << err.getErrorType() << " (" << errorstr << ")";
59 
60 }
61 #endif
62 
void setErrorType(const uint16_t &in)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
std::string printError() const
SiPixelCalibDigiError(uint16_t row, uint16_t col, uint16_t error)
void setCol(const uint16_t &in)
SiPixelCalibDigiError(uint16_t row, uint16_t col)
void setRow(const uint16_t &in)
uint16_t getErrorType() const
int col
Definition: cuy.py:1008