CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ModifyObjectValueBase.h
Go to the documentation of this file.
1 #ifndef __CommonTools_CandAlgos_ModifyObjectValueBase_h__
2 #define __CommonTools_CandAlgos_ModifyObjectValueBase_h__
3 
9 
15 
16 #include <string>
17 
19  public:
21  name_( conf.getParameter<std::string>("modifierName") ) {}
22 
24 
25  virtual void setEvent(const edm::Event&) {}
26  virtual void setEventContent(const edm::EventSetup&) {}
28 
29  virtual void modifyObject(pat::Electron&) const {
30  throw cms::Exception("InvalidConfiguration")
31  << name_ << " is not configured to handle electrons!";
32  }
33  virtual void modifyObject(pat::Photon&) const {
34  throw cms::Exception("InvalidConfiguration")
35  << name_ << " is not configured to handle photons!";
36  }
37  virtual void modifyObject(pat::Muon&) const {
38  throw cms::Exception("InvalidConfiguration")
39  << name_ << " is not configured to handle muons!";
40  }
41  virtual void modifyObject(pat::Tau&) const {
42  throw cms::Exception("InvalidConfiguration")
43  << name_ << " is not configured to handle taus!";
44  }
45  virtual void modifyObject(pat::Jet&) const {
46  throw cms::Exception("InvalidConfiguration")
47  << name_ << " is not configured to handle jets!";
48  }
49 
50  const std::string& name() const { return name_; }
51 
52  private:
54 };
55 
56 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
59 #endif
60 
61 #endif
Analysis-level Photon class.
Definition: Photon.h:47
virtual void modifyObject(pat::Jet &) const
virtual void setConsumes(edm::ConsumesCollector &)
virtual void modifyObject(pat::Tau &) const
const std::string & name() const
virtual void setEventContent(const edm::EventSetup &)
virtual void modifyObject(pat::Photon &) const
ModifyObjectValueBase(const edm::ParameterSet &conf)
Analysis-level tau class.
Definition: Tau.h:56
tuple conf
Definition: dbtoconf.py:185
edmplugin::PluginFactory< ModifyObjectValueBase *(const edm::ParameterSet &) > ModifyObjectValueFactory
Analysis-level electron class.
Definition: Electron.h:52
Analysis-level calorimeter jet class.
Definition: Jet.h:77
virtual void modifyObject(pat::Muon &) const
virtual void setEvent(const edm::Event &)
virtual void modifyObject(pat::Electron &) const
Analysis-level muon class.
Definition: Muon.h:49