CMS 3D CMS Logo

RecoTauPluginsCommon.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_RecoTauPluginsCommon_h
2 #define RecoTauTag_RecoTau_RecoTauPluginsCommon_h
3 
4 /*
5  * RecoTauPluginsCommon
6  *
7  * Common base classes for the plugins used in the
8  * the PFTau production classes. The named plugin simply
9  * assigns a name to each plugin, that is retrieved by the
10  * ParameterSet passed to the constructor. The EventHolder
11  * plugin manages plugins that might need access to event data.
12  *
13  * The setup(...) method should be called for each event to cache
14  * pointers to the edm::Event and edm::EventSetup. Derived classes
15  * can access this information through the evt() and evtSetup() methods.
16  * The virtual function beginEvent() is provided as a hook for derived
17  * classes to do setup tasks and is called by RecoTauEventHolderPlugin
18  * after setup is called.
19  *
20  * Author: Evan K. Friis, UC Davis
21  *
22  */
23 
26 
27 namespace reco {
28  namespace tau {
29 
31  /* Base class for all named RecoTau plugins */
32  public:
33  explicit RecoTauNamedPlugin(const edm::ParameterSet& pset);
34  virtual ~RecoTauNamedPlugin() {}
35  const std::string& name() const;
36 
37  private:
39  };
40 
42  /* Base class for all plugins that cache the edm::Event and edm::EventSetup
43  * as internal data members */
44  public:
47  // Get the internal cached copy of the event
48  const edm::Event* evt() const;
49  edm::Event* evt();
50  const edm::EventSetup* evtSetup() const;
51  // Cache a local pointer to the event and event setup
52  void setup(edm::Event&, const edm::EventSetup&);
53  // Called after setup(...)
54  virtual void beginEvent() {}
55 
56  private:
59  };
60  } // namespace tau
61 } // namespace reco
62 #endif
reco::tau::RecoTauEventHolderPlugin::evt
const edm::Event * evt() const
Definition: RecoTauPluginsCommon.cc:16
reco::tau::RecoTauNamedPlugin::RecoTauNamedPlugin
RecoTauNamedPlugin(const edm::ParameterSet &pset)
Definition: RecoTauPluginsCommon.cc:7
reco::tau::RecoTauEventHolderPlugin::evt_
edm::Event * evt_
Definition: RecoTauPluginsCommon.h:57
reco::tau::RecoTauNamedPlugin::name
const std::string & name() const
Definition: RecoTauPluginsCommon.cc:10
metsig::tau
Definition: SignAlgoResolutions.h:49
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::tau::RecoTauNamedPlugin::name_
std::string name_
Definition: RecoTauPluginsCommon.h:38
reco::tau::RecoTauNamedPlugin
Definition: RecoTauPluginsCommon.h:30
reco::tau::RecoTauEventHolderPlugin
Definition: RecoTauPluginsCommon.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
reco::tau::RecoTauEventHolderPlugin::~RecoTauEventHolderPlugin
~RecoTauEventHolderPlugin() override
Definition: RecoTauPluginsCommon.h:46
edm::EventSetup
Definition: EventSetup.h:58
reco::tau::RecoTauEventHolderPlugin::es_
const edm::EventSetup * es_
Definition: RecoTauPluginsCommon.h:58
reco::tau::RecoTauNamedPlugin::~RecoTauNamedPlugin
virtual ~RecoTauNamedPlugin()
Definition: RecoTauPluginsCommon.h:34
ParameterSet.h
reco::tau::RecoTauEventHolderPlugin::evtSetup
const edm::EventSetup * evtSetup() const
Definition: RecoTauPluginsCommon.cc:18
reco::tau::RecoTauEventHolderPlugin::beginEvent
virtual void beginEvent()
Definition: RecoTauPluginsCommon.h:54
edm::Event
Definition: Event.h:73
reco::tau::RecoTauEventHolderPlugin::setup
void setup(edm::Event &, const edm::EventSetup &)
Definition: RecoTauPluginsCommon.cc:20
reco::tau::RecoTauEventHolderPlugin::RecoTauEventHolderPlugin
RecoTauEventHolderPlugin(const edm::ParameterSet &pset)
Definition: RecoTauPluginsCommon.cc:13
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27