CMS 3D CMS Logo

PixelROCTrimBits.h
Go to the documentation of this file.
1 #ifndef PixelROCTrimBits_h
2 #define PixelROCTrimBits_h
3 
9 #include <sstream>
10 #include <fstream>
12 #include <string>
13 
14 namespace pos {
20  class PixelROCTrimBits;
21  std::ostream& operator<<(std::ostream& s, const PixelROCTrimBits& trimbits);
22 
24  public:
26 
27  void setROCTrimBits(PixelROCName rocid, std::string bits);
28 
29  int read(PixelROCName rocid, std::string in);
30  int read(PixelROCName rocid, std::ifstream& in);
31  int read(PixelROCName rocid, std::istringstream& in);
32 
33  int readBinary(PixelROCName rocid, std::ifstream& in);
34 
35  friend std::ostream& operator<<(std::ostream& s, const PixelROCTrimBits& trimbits);
36 
37  unsigned int trim(unsigned int col, unsigned int row) const;
38 
39  void setTrim(unsigned int col, unsigned int row, unsigned int trim);
40 
41  void writeBinary(std::ofstream& out) const;
42 
43  void writeASCII(std::ofstream& out) const;
44  void writeXML(std::ofstream* out) const;
45 
46  PixelROCName name() const { return rocid_; }
47 
48  private:
49  unsigned char bits_[2080];
51  };
52 
53 } // namespace pos
54 #endif
int read(PixelROCName rocid, std::string in)
void writeBinary(std::ofstream &out) const
void setROCTrimBits(PixelROCName rocid, std::string bits)
friend std::ostream & operator<<(std::ostream &s, const PixelROCTrimBits &trimbits)
PixelROCName name() const
int readBinary(PixelROCName rocid, std::ifstream &in)
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
void writeXML(std::ofstream *out) const
void writeASCII(std::ofstream &out) const
void setTrim(unsigned int col, unsigned int row, unsigned int trim)
This class implements..
Definition: PixelROCName.h:23
This class implements..
unsigned char bits_[2080]
col
Definition: cuy.py:1009
unsigned int trim(unsigned int col, unsigned int row) const
This class stores the name and related hardware mappings for a ROC.