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
00034 PixelTBMSettings():PixelConfigBase("", "", "") {;}
00035
00036 virtual ~PixelTBMSettings(){}
00037
00038
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, int version, std::string path, std::ofstream *out) const {;}
00048 virtual void writeXML( std::ofstream *out) const {;}
00049 virtual void writeXMLTrailer( std::ofstream *out) const {;}
00050
00051 friend std::ostream& operator<<(std::ostream& s, const PixelTBMSettings& mask);
00052
00053 unsigned char getAnalogInputBias() {return analogInputBias_;}
00054 void setAnalogInputBias(unsigned char analogInputBias) {analogInputBias_=analogInputBias;}
00055
00056 unsigned char getAnalogOutputBias() {return analogOutputBias_;}
00057 void setAnalogOutputBias(unsigned char analogOutputBias) {analogOutputBias_=analogOutputBias;}
00058
00059 unsigned char getAnalogOutputGain() {return analogOutputGain_;}
00060 void setAnalogOutputGain(unsigned char analogOutputGain) {analogOutputGain_=analogOutputGain;}
00061
00062
00063 bool getMode(void) {return singlemode_;}
00064 void setMode(bool mode) {singlemode_ = mode;}
00065 void setROCName(std::string rocname){
00066 PixelROCName tmp(rocname);
00067 rocid_=tmp;
00068 }
00069 void setTBMGenericValue(std::string, int) ;
00070
00071 private:
00072
00073 PixelROCName rocid_;
00074 PixelModuleName moduleId_ ;
00075
00076 unsigned char analogInputBias_;
00077 unsigned char analogOutputBias_;
00078 unsigned char analogOutputGain_;
00079 bool singlemode_;
00080
00081 };
00082 }
00083
00084 #endif