CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CondCore/EcalPlugins/plugins/EcalWeightXtalGroupsPyWrapper.cc

Go to the documentation of this file.
00001 
00002 #include "CondFormats/EcalObjects/interface/EcalWeightXtalGroups.h"
00003 #include "CondTools/Ecal/interface/EcalWeightGroupXMLTranslator.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<EcalWeightXtalGroups>: public  BaseValueExtractor<EcalWeightXtalGroups> {
00014   public:
00015 
00016     typedef EcalWeightXtalGroups 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<EcalWeightXtalGroups>::dump() const {
00035     std::stringstream ss;
00036     EcalCondHeader h;
00037     ss<<EcalWeightGroupXMLTranslator::dumpXML(h,object());
00038     return ss.str();
00039     
00040   }
00041   
00042   template<>
00043   std::string PayLoadInspector<EcalWeightXtalGroups>::summary() const {
00044     std::stringstream ss;
00045     return ss.str();
00046   }
00047   
00048 
00049   template<>
00050   std::string PayLoadInspector<EcalWeightXtalGroups>::plot(std::string const & filename,
00051                                                    std::string const &, 
00052                                                    std::vector<int> const&, 
00053                                                    std::vector<float> const& ) const {
00054     std::string fname = filename + ".png";
00055     std::ofstream f(fname.c_str());
00056     return fname;
00057   }
00058 
00059 
00060 }
00061 
00062 PYTHON_WRAPPER(EcalWeightXtalGroups,EcalWeightXtalGroups);