Go to the documentation of this file.00001 #ifndef PixelConfigBase_h
00002 #define PixelConfigBase_h
00003
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <string>
00018 #include "CalibFormats/SiPixelObjects/interface/PixelConfigKey.h"
00019 #include "CalibFormats/SiPixelObjects/interface/PixelBase64.h"
00020
00021
00022 namespace pos{
00033 class PixelConfigBase {
00034
00035 public:
00036
00037
00038
00039
00040
00041
00042 PixelConfigBase(std::string description,
00043 std::string creator,
00044 std::string date);
00045
00046 virtual ~PixelConfigBase(){}
00047
00048 std::string description();
00049 std::string creator();
00050 std::string date();
00051
00052
00053 virtual void writeASCII(std::string dir="") const = 0;
00054
00055 virtual void writeXMLHeader( pos::PixelConfigKey key,
00056 int version,
00057 std::string path,
00058 std::ofstream *out,
00059 std::ofstream *out1,
00060 std::ofstream *out2) const {;}
00061 virtual void writeXML( std::ofstream *out,
00062 std::ofstream *out1,
00063 std::ofstream *out2 ) const {;}
00064 virtual void writeXMLTrailer( std::ofstream *out,
00065 std::ofstream *ou1,
00066 std::ofstream *out2) const {;}
00067 virtual void writeXML( pos::PixelConfigKey key, int version, std::string path) const {;}
00068 virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const {;}
00069 virtual void writeXML( std::ofstream *out) const {;}
00070 virtual void writeXMLTrailer( std::ofstream *out) const {;}
00071
00072 void setAuthor (std::string author) {creator_ = author ;}
00073 void setComment(std::string comment) {comment_ = comment;}
00074 std::string getAuthor()const {return creator_ ;}
00075 std::string getComment()const {return base64_encode((unsigned char *)comment_.c_str(), comment_.length()) ;}
00076
00077 private:
00078
00079 std::string description_;
00080 std::string creator_ ;
00081 std::string date_ ;
00082 std::string comment_ ;
00083
00084 };
00085
00086
00087 }
00088
00089 #endif