CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondCore/EcalPlugins/plugins/EcalTBWeightsPyWrapper.cc

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