CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 setROCTrimBits(PixelROCName rocid, std::string bits)
friend std::ostream & operator<<(std::ostream &s, const PixelROCTrimBits &trimbits)
void writeBinary(std::ofstream &out) const
int readBinary(PixelROCName rocid, std::ifstream &in)
unsigned int trim(unsigned int col, unsigned int row) const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
void writeXML(std::ofstream *out) const
PixelROCName name() 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]
void writeASCII(std::ofstream &out) const
int col
Definition: cuy.py:1009
This class stores the name and related hardware mappings for a ROC.