CP3-llbb Framework
Filter.h
1 #pragma once
2 
3 #include <FWCore/PluginManager/interface/PluginFactory.h>
4 #include <FWCore/ParameterSet/interface/ParameterSet.h>
5 #include <FWCore/Framework/interface/Event.h>
6 #include <FWCore/Framework/interface/Run.h>
7 #include <FWCore/Framework/interface/LuminosityBlock.h>
8 #include <FWCore/Framework/interface/EventSetup.h>
9 #include <FWCore/Framework/interface/ConsumesCollector.h>
10 #include <FWCore/Utilities/interface/InputTag.h>
11 
12 #include <cp3_llbb/Framework/interface/Types.h>
13 #include <cp3_llbb/Framework/interface/MetadataManager.h>
14 
15 #include <Math/Vector4D.h>
16 
17 #include <vector>
18 #include <map>
19 
20 namespace Framework {
21 
22  class Filter {
23  public:
24  Filter(const std::string& name, const edm::ParameterSet& config):
25  m_name(name) {
26  }
27 
28  virtual bool filter(edm::Event&, const edm::EventSetup&) = 0;
29  virtual void doConsumes(const edm::ParameterSet&, edm::ConsumesCollector&& collector) {}
30 
31  virtual void beginJob(MetadataManager&) {}
32  virtual void endJob(MetadataManager&) {}
33 
34  virtual void beginRun(const edm::Run&, const edm::EventSetup&) {}
35  virtual void endRun(const edm::Run&, const edm::EventSetup&) {}
36 
37  virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) {}
38  virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) {}
39 
40  protected:
41  std::string m_name;
42  };
43 
44 }
45 
46 typedef edmplugin::PluginFactory<Framework::Filter* (const std::string&, const edm::ParameterSet&)> ExTreeMakerFilterFactory;
Definition: Filter.h:22
Definition: MetadataManager.h:9