CMS 3D CMS Logo

PixelROCTrimBits.h

Go to the documentation of this file.
00001 #ifndef PixelROCTrimBits_h
00002 #define PixelROCTrimBits_h
00003 
00009 #include <sstream>
00010 #include <fstream>
00011 #include "CalibFormats/SiPixelObjects/interface/PixelROCName.h"
00012 #include <string>
00013 
00014 namespace pos{
00020   class PixelROCTrimBits {
00021 
00022   public:
00023 
00024     PixelROCTrimBits();
00025 
00026     void setROCTrimBits(PixelROCName rocid ,std::string bits);
00027 
00028     int read(PixelROCName rocid, std::ifstream& in);
00029     int read(PixelROCName rocid, std::istringstream& in);
00030 
00031     int readBinary(PixelROCName rocid, std::ifstream& in);
00032 
00033     friend std::ostream& operator<<(std::ostream& s, const PixelROCTrimBits& trimbits);
00034 
00035     unsigned int trim(unsigned int col, unsigned int row) const;
00036 
00037     void setTrim(unsigned int col, unsigned int row, unsigned int trim);
00038 
00039     void writeBinary(std::ofstream& out) const;
00040 
00041     void writeASCII(std::ofstream& out) const;
00042 //    void writeXML(pos::PixelConfigKey key, int version, std::string path) const {;}
00043 
00044     PixelROCName name() const {return rocid_;}
00045 
00046   private:
00047 
00048     unsigned char bits_[2080];
00049     PixelROCName rocid_;
00050 
00051 
00052   };
00053 
00054 }
00055 #endif

Generated on Tue Jun 9 17:25:24 2009 for CMSSW by  doxygen 1.5.4