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); // <---- Modified for the conversion from parallel vectors to object that contain the configuration 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, int version, std::string path, std::ofstream *out) const {;} 00050 virtual void writeXML( std::ofstream *out) const {;} 00051 virtual void writeXMLTrailer( std::ofstream *out) const {;} 00052 00053 //friend std::ostream& operator<<(std::ostream& s, const PixelDetectorconfig& config); 00054 00055 private: 00056 00057 //Already fixed from parallel vectors to vector of objects .... the object that contains the FED config is PixelFEDParameters 00058 00059 // std::vector<unsigned int> fednumber_; 00060 // std::vector<unsigned int> crate_; 00061 // std::vector<unsigned int> vmebaseaddress_; 00062 00063 std::vector< PixelFEDParameters > fedconfig_; 00064 00065 }; 00066 } 00067 /* @} */ 00068 #endif