00001 #ifndef PixelConfigBase_h 00002 #define PixelConfigBase_h 00003 00009 // 00010 // Base class for pixel configuration data 00011 // provide a place to implement common interfaces 00012 // for these objects. Any configuration data 00013 // object that is to be accessed from the database 00014 // should derive from this class. 00015 // 00016 00017 #include <string> 00018 #include "CalibFormats/SiPixelObjects/interface/PixelConfigKey.h" 00019 00020 00021 namespace pos{ 00032 class PixelConfigBase { 00033 00034 public: 00035 00036 //A few things that you should provide 00037 //description : purpose of this object 00038 //creator : who created this configuration object 00039 //date : time/date of creation (should probably not be 00040 // a string, but I have no idea what CMS uses. 00041 PixelConfigBase(std::string description, 00042 std::string creator, 00043 std::string date); 00044 00045 virtual ~PixelConfigBase(){} 00046 00047 std::string description(); 00048 std::string creator(); 00049 std::string date(); 00050 00051 //Interface to write out data to ascii file 00052 virtual void writeASCII(std::string dir="") const = 0; 00053 //Interface to write out data to XML file for DB population 00054 virtual void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;} 00055 virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const {;} 00056 virtual void writeXML( std::ofstream *out) const {;} 00057 virtual void writeXMLTrailer( std::ofstream *out) const {;} 00058 00059 private: 00060 00061 std::string description_; 00062 std::string creator_; 00063 std::string date_; 00064 00065 00066 }; 00067 00068 /* @} */ 00069 } 00070 00071 #endif