CMS 3D CMS Logo

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 <memory>
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  std::unique_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 std::make_unique<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  std::unique_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 std::make_unique<JME::JetResolutionScaleFactor>(jerObject);
69  }
70 };
71 #endif
T getParameter(std::string const &) const
std::unique_ptr< JME::JetResolution > produce(JetResolutionRcd const &iRecord)
std::unique_ptr< JME::JetResolutionScaleFactor > produce(JetResolutionScaleFactorRcd const &iRecord)
JetResolutionScaleFactorESProducer(edm::ParameterSet const &fConfig)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
JetResolutionESProducer(edm::ParameterSet const &fConfig)