00001 00002 #include "CondFormats/EcalObjects/interface/EcalLaserAPDPNRatios.h" 00003 00004 #include "CondCore/Utilities/interface/PayLoadInspector.h" 00005 #include "CondCore/Utilities/interface/InspectorPythonWrapper.h" 00006 #include "CondTools/Ecal/interface/EcalLaserAPDPNRatiosXMLTranslator.h" 00007 #include "CondTools/Ecal/interface/EcalCondHeader.h" 00008 00009 #include <string> 00010 #include <fstream> 00011 00012 namespace cond { 00013 00014 template<> 00015 class ValueExtractor<EcalLaserAPDPNRatios>: public BaseValueExtractor<EcalLaserAPDPNRatios> { 00016 public: 00017 00018 typedef EcalLaserAPDPNRatios Class; 00019 typedef ExtractWhat<Class> What; 00020 static What what() { return What();} 00021 00022 ValueExtractor(){} 00023 ValueExtractor(What const & what) 00024 { 00025 // here one can make stuff really complicated... 00026 } 00027 void compute(Class const & it){ 00028 } 00029 private: 00030 00031 }; 00032 00033 00034 template<> 00035 std::string 00036 PayLoadInspector<EcalLaserAPDPNRatios>::dump() const { 00037 00038 std::stringstream ss; 00039 EcalCondHeader header; 00040 ss<<EcalLaserAPDPNRatiosXMLTranslator::dumpXML(header,object()); 00041 return ss.str(); 00042 00043 } 00044 00045 template<> 00046 std::string PayLoadInspector<EcalLaserAPDPNRatios>::summary() const { 00047 std::stringstream ss; 00048 return ss.str(); 00049 } 00050 00051 00052 template<> 00053 std::string PayLoadInspector<EcalLaserAPDPNRatios>::plot(std::string const & filename, 00054 std::string const &, 00055 std::vector<int> const&, 00056 std::vector<float> const& ) const { 00057 std::string fname = filename + ".png"; 00058 std::ofstream f(fname.c_str()); 00059 return fname; 00060 } 00061 00062 00063 } 00064 00065 PYTHON_WRAPPER(EcalLaserAPDPNRatios,EcalLaserAPDPNRatios);