CMS 3D CMS Logo

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 
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)
constexpr uint32_t bits
Definition: gpuClustering.h:25
PixelROCName name() const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
void writeBinary(std::ofstream &out) const
void writeASCII(std::ofstream &out) const
void setMask(unsigned int col, unsigned int row, unsigned int mask)
void writeXML(std::ofstream *out) const
This class implements..
This class implements..
Definition: PixelROCName.h:23
unsigned char bits_[520]
col
Definition: cuy.py:1009
friend std::ostream & operator<<(std::ostream &s, const PixelROCMaskBits &maskbits)
unsigned int mask(unsigned int col, unsigned int row) const
This class stores the name and related hardware mappings for a ROC.
int readBinary(const PixelROCName &rocid, std::ifstream &in)