CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelROCMaskBits.h
Go to the documentation of this file.
1 #ifndef PixelROCMaskBits_h
2 #define PixelROCMaskBits_h
3 
9 #include <sstream>
10 #include <fstream>
11 #include <string>
13 
14 namespace pos {
15 
16  class PixelROCMaskBits;
17  std::ostream& operator<<(std::ostream& s, const PixelROCMaskBits& maskbits);
18 
25  public:
27 
28  void setROCMaskBits(PixelROCName& rocid, std::string bits);
29 
30  int read(const PixelROCName& rocid, std::string in);
31  int read(const PixelROCName& rocid, std::ifstream& in);
32  int read(const PixelROCName& rocid, std::istringstream& in);
33 
34  int readBinary(const PixelROCName& rocid, std::ifstream& in);
35 
36  unsigned int mask(unsigned int col, unsigned int row) const;
37 
38  void setMask(unsigned int col, unsigned int row, unsigned int mask);
39 
40  void writeBinary(std::ofstream& out) const;
41 
42  void writeASCII(std::ofstream& out) const;
43  void writeXML(std::ofstream* out) const;
44 
45  PixelROCName name() const { return rocid_; }
46 
47  friend std::ostream& operator<<(std::ostream& s, const PixelROCMaskBits& maskbits);
48 
49  private:
51  unsigned char bits_[520];
52  };
53 } // namespace pos
54 
55 #endif
void setROCMaskBits(PixelROCName &rocid, std::string bits)
int read(const PixelROCName &rocid, std::string in)
PixelROCName name() const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
void writeASCII(std::ofstream &out) const
void setMask(unsigned int col, unsigned int row, unsigned int mask)
This class implements..
This class implements..
Definition: PixelROCName.h:23
unsigned char bits_[520]
unsigned int mask(unsigned int col, unsigned int row) const
void writeXML(std::ofstream *out) const
int col
Definition: cuy.py:1009
void writeBinary(std::ofstream &out) const
friend std::ostream & operator<<(std::ostream &s, const PixelROCMaskBits &maskbits)
This class stores the name and related hardware mappings for a ROC.
int readBinary(const PixelROCName &rocid, std::ifstream &in)