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
RecoTauEventHolderPlugin(const edm::ParameterSet &pset)
const edm::EventSetup * evtSetup() const
RecoTauNamedPlugin(const edm::ParameterSet &pset)
void setup(edm::Event &, const edm::EventSetup &)
fixed size matrix
const std::string & name() const