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 { namespace tau {
28 
30  /* Base class for all named RecoTau plugins */
31  public:
32  explicit RecoTauNamedPlugin(const edm::ParameterSet& pset);
33  virtual ~RecoTauNamedPlugin() {}
34  const std::string& name() const;
35  private:
37 };
38 
40  /* Base class for all plugins that cache the edm::Event and edm::EventSetup
41  * as internal data members */
42  public:
45  // Get the internal cached copy of the event
46  const edm::Event* evt() const;
47  edm::Event* evt();
48  const edm::EventSetup* evtSetup() const;
49  // Cache a local pointer to the event and event setup
50  void setup(edm::Event&, const edm::EventSetup&);
51  // Called after setup(...)
52  virtual void beginEvent() {}
53  private:
56 };
57 }} // end namespace reco::tau
58 #endif
RecoTauNamedPlugin(const edm::ParameterSet &pset)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
fixed size matrix
const std::string & name() const