CMS 3D CMS Logo

PopConAnalyzer.h

Go to the documentation of this file.
00001 #ifndef POPCON_ANALYZER_H
00002 #define POPCON_ANALYZER_H
00003 
00004 //
00005 // Original Author:  Marcin BOGUSZ
00006 //         Created:  Tue Jul  3 10:48:22 CEST 2007
00007 
00008 
00009 #include "CondCore/PopCon/interface/PopCon.h"
00010 #include <vector>
00011 
00012 
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 
00016 namespace popcon{
00017   template <typename S>
00018   class PopConAnalyzer : public edm::EDAnalyzer {
00019   public:
00020     typedef S SourceHandler;
00021     
00022     PopConAnalyzer(const edm::ParameterSet& pset) : 
00023       m_populator(pset),
00024       m_source(pset.getParameter<edm::ParameterSet>("Source")) {}
00025     
00026     
00027     virtual ~PopConAnalyzer(){}
00028     
00029   private:
00030     
00031     virtual void beginJob(const edm::EventSetup&){}
00032     virtual void endJob() {
00033       write();
00034     }
00035     
00036     virtual void analyze(const edm::Event&, const edm::EventSetup&){} 
00037     
00038     
00039     void write() {
00040       m_populator.write(m_source);
00041       
00042     }
00043     
00044   private:
00045     PopCon m_populator;
00046     SourceHandler m_source;     
00047   };
00048 
00049 }
00050 #endif

Generated on Tue Jun 9 17:26:13 2009 for CMSSW by  doxygen 1.5.4