CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetResolutionESProducer.h
Go to the documentation of this file.
1 #ifndef JERESProducer_h
2 #define JERESProducer_h
3 
4 //
5 // Author: Sébastien Brochet
6 //
7 
8 #include <string>
9 #include "boost/shared_ptr.hpp"
10 
15 
19 
21 {
22  private:
24 
25  public:
27  {
28  m_label = fConfig.getParameter<std::string>("label");
29  setWhatProduced(this, m_label);
30  }
31 
33 
34  boost::shared_ptr<JME::JetResolution> produce(JetResolutionRcd const& iRecord) {
35 
36  // Get object from record
38  iRecord.get(m_label, jerObjectHandle);
39 
40  // Convert this object to a JetResolution object
41  JME::JetResolutionObject const& jerObject = (*jerObjectHandle);
42  return boost::shared_ptr<JME::JetResolution>(new JME::JetResolution(jerObject));
43  }
44 };
45 
47 {
48  private:
50 
51  public:
53  {
54  m_label = fConfig.getParameter<std::string>("label");
55  setWhatProduced(this, m_label);
56  }
57 
59 
60  boost::shared_ptr<JME::JetResolutionScaleFactor> produce(JetResolutionScaleFactorRcd const& iRecord) {
61 
62  // Get object from record
64  iRecord.get(m_label, jerObjectHandle);
65 
66  // Convert this object to a JetResolution object
67  JME::JetResolutionObject const& jerObject = (*jerObjectHandle);
68  return boost::shared_ptr<JME::JetResolutionScaleFactor>(new JME::JetResolutionScaleFactor(jerObject));
69  }
70 };
71 #endif
boost::shared_ptr< JME::JetResolutionScaleFactor > produce(JetResolutionScaleFactorRcd const &iRecord)
T getParameter(std::string const &) const
JetResolutionScaleFactorESProducer(edm::ParameterSet const &fConfig)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
boost::shared_ptr< JME::JetResolution > produce(JetResolutionRcd const &iRecord)
JetResolutionESProducer(edm::ParameterSet const &fConfig)