Go to the documentation of this file.00001 buildfileTemplate = """
00002 <library file="$_CLASS_NAME_-PyWrapper.cc" name=$_CLASS_NAME_-PyInterface>
00003 <use name=CondCore/Utilities>
00004 <use name=CondFormats/$_PACKAGE_>
00005 <use name=boost>
00006 <use name=boost_filesystem>
00007 <use name=boost_python>
00008 <use name=boost_regex>
00009 <flags EDM_PLUGIN=1>
00010 </library>
00011 """
00012
00013 wrapperTemplate = """
00014 #include "CondFormats/$_PACKAGE_/interface/$_HEADER_FILE_.h"
00015
00016 #include "CondCore/Utilities/interface/PayLoadInspector.h"
00017 #include "CondCore/Utilities/interface/InspectorPythonWrapper.h"
00018
00019 #include <string>
00020 #include <fstream>
00021
00022 namespace cond {
00023
00024 template<>
00025 class ValueExtractor<$_CLASS_NAME_>: public BaseValueExtractor<$_CLASS_NAME_> {
00026 public:
00027
00028 typedef $_CLASS_NAME_ Class;
00029 typedef ExtractWhat<Class> What;
00030 static What what() { return What();}
00031
00032 ValueExtractor(){}
00033 ValueExtractor(What const & what)
00034 {
00035 // here one can make stuff really complicated...
00036 }
00037 void compute(Class const & it){
00038 }
00039 private:
00040
00041 };
00042
00043
00044 template<>
00045 std::string
00046 PayLoadInspector<$_CLASS_NAME_>::dump() const {
00047 std::stringstream ss;
00048 return ss.str();
00049
00050 }
00051
00052 template<>
00053 std::string PayLoadInspector<$_CLASS_NAME_>::summary() const {
00054 std::stringstream ss;
00055 return ss.str();
00056 }
00057
00058
00059 template<>
00060 std::string PayLoadInspector<$_CLASS_NAME_>::plot(std::string const & filename,
00061 std::string const &,
00062 std::vector<int> const&,
00063 std::vector<float> const& ) const {
00064 std::string fname = filename + ".png";
00065 std::ofstream f(fname.c_str());
00066 return fname;
00067 }
00068
00069
00070 }
00071
00072 PYTHON_WRAPPER($_CLASS_NAME_,$_CLASS_NAME_);
00073 """