CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/CalibFormats/SiPixelObjects/interface/PixelTBMSettings.h

Go to the documentation of this file.
00001 #ifndef PixelTBMSettings_h
00002 #define PixelTBMSettings_h
00003 
00011 #include <vector>
00012 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
00013 #include "CalibFormats/SiPixelObjects/interface/PixelFECConfigInterface.h"
00014 #include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h"
00015 
00016 namespace pos{
00027   class PixelTBMSettings: public PixelConfigBase {
00028 
00029   public:
00030 
00031     PixelTBMSettings(std::vector < std::vector< std::string> > &tableMat);
00032     PixelTBMSettings(std::string filename);
00033     // modified by MR on 29-04-2008 16:43:30
00034   PixelTBMSettings():PixelConfigBase("", "", "") {;}
00035 
00036     virtual ~PixelTBMSettings(){}
00037 
00038     //Generate the DAC settings
00039     void generateConfiguration(PixelFECConfigInterface* pixelFEC,
00040                                PixelNameTranslation* trans,
00041                                bool physics=false) const; 
00042 
00043     void writeBinary(std::string filename) const;
00044 
00045     void         writeASCII(std::string dir) const;
00046     void         writeXML(         pos::PixelConfigKey key, int version, std::string path) const {;}
00047     virtual void writeXMLHeader(   pos::PixelConfigKey key, 
00048                                    int version, 
00049                                    std::string path, 
00050                                    std::ofstream *out,
00051                                    std::ofstream *out1 = NULL,
00052                                    std::ofstream *out2 = NULL
00053                                    ) const ;
00054     virtual void writeXML(        std::ofstream *out,                                                       
00055                                   std::ofstream *out1 = NULL ,
00056                                   std::ofstream *out2 = NULL ) const ;
00057     virtual void writeXMLTrailer( std::ofstream *out, 
00058                                   std::ofstream *out1 = NULL,
00059                                   std::ofstream *out2 = NULL
00060                                   ) const ;
00061 
00062     friend std::ostream& operator<<(std::ostream& s, const PixelTBMSettings& mask);
00063 
00064     unsigned char getAnalogInputBias() {return analogInputBias_;}
00065     void setAnalogInputBias(unsigned char analogInputBias) {analogInputBias_=analogInputBias;}
00066     
00067     unsigned char getAnalogOutputBias() {return analogOutputBias_;}
00068     void setAnalogOutputBias(unsigned char analogOutputBias) {analogOutputBias_=analogOutputBias;}
00069     
00070     unsigned char getAnalogOutputGain() {return analogOutputGain_;}
00071     void setAnalogOutputGain(unsigned char analogOutputGain) {analogOutputGain_=analogOutputGain;}
00072     
00073     // Added by Dario (Apr 2008)
00074     bool getMode(void)      {return singlemode_;}
00075     void setMode(bool mode) {singlemode_ = mode;}
00076     void setROCName(std::string rocname){
00077         PixelROCName tmp(rocname);
00078         rocid_=tmp;
00079     }
00080     void setTBMGenericValue(std::string, int) ;
00081     
00082   private:
00083 
00084     PixelROCName rocid_;
00085     PixelModuleName moduleId_ ;
00086 
00087     unsigned char analogInputBias_;
00088     unsigned char analogOutputBias_;
00089     unsigned char analogOutputGain_;
00090     bool singlemode_;
00091 
00092   };
00093 }
00094 /* @} */
00095 #endif