CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CalibFormats/SiPixelObjects/interface/PixelFEDTestDAC.h

Go to the documentation of this file.
00001 #ifndef _PixelFEDTestDAC_h_
00002 #define _PixelFEDTestDAC_h_
00003 
00011 #include <iostream>
00012 #include <string>
00013 #include <vector>
00014 #include <fstream>
00015 #include <stdlib.h>
00016 #include "CalibFormats/SiPixelObjects/interface/PixelCalibBase.h"
00017 
00018 namespace pos{
00019 
00029   class PixelFEDTestDAC : public PixelCalibBase {
00030 
00031   public:
00032     PixelFEDTestDAC(std::string filename);
00033     PixelFEDTestDAC(std::vector< std::vector<std::string> > &);
00034     std::string mode() {return mode_;}
00035     std::vector<unsigned int> dacs() {return dacs_;}
00036     virtual void writeXMLHeader(  pos::PixelConfigKey key, 
00037                                   int version, 
00038                                   std::string path, 
00039                                   std::ofstream *out,
00040                                   std::ofstream *out1 = NULL,
00041                                   std::ofstream *out2 = NULL
00042                                   ) const ;
00043     virtual void writeXML(        std::ofstream *out,                                                       
00044                                   std::ofstream *out1 = NULL ,         
00045                                   std::ofstream *out2 = NULL ) const ; 
00046     virtual void writeXMLTrailer( std::ofstream *out, 
00047                                   std::ofstream *out1 = NULL,
00048                                   std::ofstream *out2 = NULL
00049                                   ) const ;
00050 
00051   private:
00052 
00053     unsigned int levelEncoder(int level);
00054     std::vector<unsigned int> decimalToBaseX(unsigned int a, unsigned int x, unsigned int length);
00055     std::vector<unsigned int> dacs_;
00056 
00057   };
00058 }
00059 /* @} */
00060 #endif
00061 
00062 
00063 
00064 
00065         
00066