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 
14 
18 
20 private:
22 
23 public:
25  auto label = fConfig.getParameter<std::string>("label");
26  token_ = setWhatProduced(this, label).consumes(edm::ESInputTag{"", label});
27  }
28 
30 
31  std::unique_ptr<JME::JetResolution> produce(JetResolutionRcd const& iRecord) {
32  return std::make_unique<JME::JetResolution>(iRecord.get(token_));
33  }
34 };
35 
37 private:
39 
40 public:
42  auto label = fConfig.getParameter<std::string>("label");
43  token_ = setWhatProduced(this, label).consumes(edm::ESInputTag{"", label});
44  }
45 
47 
48  std::unique_ptr<JME::JetResolutionScaleFactor> produce(JetResolutionScaleFactorRcd const& iRecord) {
49  return std::make_unique<JME::JetResolutionScaleFactor>(iRecord.get(token_));
50  }
51 };
52 #endif
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< JME::JetResolution > produce(JetResolutionRcd const &iRecord)
std::unique_ptr< JME::JetResolutionScaleFactor > produce(JetResolutionScaleFactorRcd const &iRecord)
JetResolutionScaleFactorESProducer(edm::ParameterSet const &fConfig)
char const * label
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > token_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > token_
JetResolutionESProducer(edm::ParameterSet const &fConfig)