CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CalibFormats/SiPixelObjects/interface/PixelTrimBase.h

Go to the documentation of this file.
00001 #ifndef PixelTrimBase_h
00002 #define PixelTrimBase_h
00003 
00018 #include <string>
00019 #include "CalibFormats/SiPixelObjects/interface/PixelTrimOverrideBase.h"
00020 #include "CalibFormats/SiPixelObjects/interface/PixelTrimBase.h"
00021 #include "CalibFormats/SiPixelObjects/interface/PixelROCTrimBits.h"
00022 #include "CalibFormats/SiPixelObjects/interface/PixelROCName.h"
00023 #include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h"
00024 #include "CalibFormats/SiPixelObjects/interface/PixelFECConfigInterface.h"
00025 
00026 
00027 namespace pos{
00046   class PixelTrimBase: public PixelConfigBase {
00047 
00048   public:
00049 
00050     PixelTrimBase(std::string description, 
00051                   std::string creator,
00052                   std::string date);
00053 
00054     virtual ~PixelTrimBase();
00055     
00056     void setOverride(PixelTrimOverrideBase* trimOverride);
00057 
00058     //Build the commands needed to configure ROCs
00059     //on control link
00060 
00061     virtual void generateConfiguration(PixelFECConfigInterface* pixelFEC,
00062                                        PixelNameTranslation* trans,
00063                                        const PixelMaskBase& pixelMask) const =0;
00064     virtual void writeBinary(     std::string filename) const =0;
00065 
00066     virtual void writeASCII(      std::string filename)  const =0;
00067     virtual void writeXML(        pos::PixelConfigKey key, 
00068                                   int version, 
00069                                   std::string path
00070                                 ) const {;}
00071     virtual void writeXMLHeader(  pos::PixelConfigKey key, 
00072                                   int version, 
00073                                   std::string path, 
00074                                   std::ofstream *out,
00075                                   std::ofstream *out1 = NULL,
00076                                   std::ofstream *out2 = NULL
00077                                 ) const {;}
00078     virtual void writeXML(        std::ofstream *out,                                                       
00079                                   std::ofstream *out1 = NULL ,
00080                                   std::ofstream *out2 = NULL 
00081                                 ) const {;}
00082     virtual void writeXMLTrailer( std::ofstream *out, 
00083                                   std::ofstream *out1 = NULL,
00084                                   std::ofstream *out2 = NULL
00085                                 ) const {;}
00086 
00087     virtual PixelROCTrimBits getTrimBits(int ROCId) const =0;
00088 
00089     virtual PixelROCTrimBits* getTrimBits(PixelROCName name)  =0;
00090 
00091     friend std::ostream& operator<<(std::ostream& s, const PixelTrimBase& mask);
00092 
00093 
00094   private:
00095 
00096     PixelTrimOverrideBase* trimOverride_;
00097 
00098   };
00099 }
00100 /* @} */
00101 #endif