CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CommonTools/UtilAlgos/interface/EventSelectorAdapter.h

Go to the documentation of this file.
00001 #ifndef CommonTools_UtilAlgos_EventSelectorAdapter_h
00002 #define CommonTools_UtilAlgos_EventSelectorAdapter_h
00003 
00016 #include "FWCore/Framework/interface/EDFilter.h"
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/Framework/interface/EventSetup.h"
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 
00021 template<typename T>
00022 class EventSelectorAdapter : public edm::EDFilter 
00023 {
00024  public:
00025   // constructor 
00026   explicit EventSelectorAdapter(const edm::ParameterSet& cfg) : 
00027     eventSelector_( cfg ) {
00028   }
00029     
00030   // destructor
00031   virtual ~EventSelectorAdapter() {}
00032     
00033  private:
00034   bool filter(edm::Event& evt, const edm::EventSetup& es) { return eventSelector_(evt, es); } 
00035   
00036   T eventSelector_;
00037 };
00038 
00039 #endif