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
pos::PixelROCTrimBits::name
PixelROCName name() const
Definition: PixelROCTrimBits.h:46
pos::PixelROCTrimBits::PixelROCTrimBits
PixelROCTrimBits()
Definition: PixelROCTrimBits.cc:18
pos::PixelROCTrimBits::operator<<
friend std::ostream & operator<<(std::ostream &s, const PixelROCTrimBits &trimbits)
cuy.col
col
Definition: cuy.py:1009
pos
Definition: PixelAliasList.h:18
PixelROCName.h
This class stores the name and related hardware mappings for a ROC.
pos::PixelROCTrimBits::read
int read(PixelROCName rocid, std::string in)
Definition: PixelROCTrimBits.cc:30
pos::PixelROCTrimBits::writeBinary
void writeBinary(std::ofstream &out) const
Definition: PixelROCTrimBits.cc:116
pos::PixelROCTrimBits::readBinary
int readBinary(PixelROCName rocid, std::ifstream &in)
Definition: PixelROCTrimBits.cc:108
pos::PixelROCTrimBits
This class implements..
Definition: PixelROCTrimBits.h:23
alignCSCRings.s
s
Definition: alignCSCRings.py:92
pos::PixelROCTrimBits::writeXML
void writeXML(std::ofstream *out) const
Definition: PixelROCTrimBits.cc:189
recoMuon::in
Definition: RecoMuonEnumerators.h:6
pos::PixelROCTrimBits::writeASCII
void writeASCII(std::ofstream &out) const
Definition: PixelROCTrimBits.cc:128
pos::operator<<
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
Definition: PixelCalibConfiguration.cc:1325
pos::PixelROCName
This class implements..
Definition: PixelROCName.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pos::PixelROCTrimBits::trim
unsigned int trim(unsigned int col, unsigned int row) const
Definition: PixelROCTrimBits.cc:148
pos::PixelROCTrimBits::bits_
unsigned char bits_[2080]
Definition: PixelROCTrimBits.h:49
pos::PixelROCTrimBits::setTrim
void setTrim(unsigned int col, unsigned int row, unsigned int trim)
Definition: PixelROCTrimBits.cc:155
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
pos::PixelROCTrimBits::setROCTrimBits
void setROCTrimBits(PixelROCName rocid, std::string bits)
Definition: PixelROCTrimBits.cc:20
pos::PixelROCTrimBits::rocid_
PixelROCName rocid_
Definition: PixelROCTrimBits.h:50