Go to the documentation of this file.00001 #ifndef PixelFEDConfig_h
00002 #define PixelFEDConfig_h
00003
00011 #include <vector>
00012 #include <string>
00013 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
00014 #include "CalibFormats/SiPixelObjects/interface/PixelFEDParameters.h"
00015
00016 namespace pos{
00027 class PixelFEDConfig: public PixelConfigBase {
00028
00029 public:
00030
00031 PixelFEDConfig(std::string filename);
00032
00033 PixelFEDConfig(std::vector<std::vector<std::string> >& tableMat );
00034
00035 virtual ~PixelFEDConfig();
00036
00037 unsigned int getNFEDBoards() const;
00038
00039 unsigned int getFEDNumber(unsigned int i) const;
00040 unsigned int getCrate(unsigned int i) const;
00041 unsigned int getVMEBaseAddress(unsigned int i) const;
00042 unsigned int crateFromFEDNumber(unsigned int fednumber) const;
00043 unsigned int VMEBaseAddressFromFEDNumber(unsigned int fednumber) const;
00044
00045 unsigned int FEDNumberFromCrateAndVMEBaseAddress(unsigned int crate, unsigned int vmebaseaddress) const;
00046
00047 virtual void writeASCII(std::string dir) const;
00048 void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;}
00049 virtual void writeXMLHeader( pos::PixelConfigKey key,
00050 int version,
00051 std::string path,
00052 std::ofstream *out,
00053 std::ofstream *out1 = NULL,
00054 std::ofstream *out2 = NULL
00055 ) const ;
00056 virtual void writeXML( std::ofstream *out,
00057 std::ofstream *out1 = NULL ,
00058 std::ofstream *out2 = NULL ) const ;
00059 virtual void writeXMLTrailer( std::ofstream *out,
00060 std::ofstream *out1 = NULL,
00061 std::ofstream *out2 = NULL
00062 ) const ;
00063
00064
00065
00066 private:
00067
00068
00069
00070
00071
00072
00073
00074 std::vector< PixelFEDParameters > fedconfig_;
00075
00076 };
00077 }
00078
00079 #endif