Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:11

0001 #ifndef CommonTools_UtilAlgos_EventSelectorBase_h
0002 #define CommonTools_UtilAlgos_EventSelectorBase_h
0003 
0004 /** \class EventSelectorBase
0005  *
0006  * Base-class for event selections in physics analyses
0007  * 
0008  * \author Christian Veelken, UC Davis
0009  *
0010  * \version $Revision: 1.1 $
0011  *
0012  * $Id: EventSelectorBase.h,v 1.1 2009/03/03 13:07:26 llista Exp $
0013  *
0014  */
0015 
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 class EventSelectorBase {
0021 public:
0022   // constructor
0023   explicit EventSelectorBase() {}
0024 
0025   // destructor
0026   virtual ~EventSelectorBase() {}
0027 
0028   // function implementing actual cut
0029   // ( return value = true  : event passes cut
0030   //                  false : event fails cut )
0031   virtual bool operator()(edm::Event&, const edm::EventSetup&) const = 0;
0032 };
0033 
0034 #include "FWCore/PluginManager/interface/PluginFactory.h"
0035 
0036 typedef edmplugin::PluginFactory<EventSelectorBase*(const edm::ParameterSet&)> EventSelectorPluginFactory;
0037 
0038 #endif