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
JetResolutionESProducer::~JetResolutionESProducer
~JetResolutionESProducer() override
Definition: JetResolutionESProducer.h:29
edm::ESInputTag
Definition: ESInputTag.h:87
JetResolutionScaleFactorESProducer::~JetResolutionScaleFactorESProducer
~JetResolutionScaleFactorESProducer() override
Definition: JetResolutionESProducer.h:46
JetResolutionScaleFactorESProducer::JetResolutionScaleFactorESProducer
JetResolutionScaleFactorESProducer(edm::ParameterSet const &fConfig)
Definition: JetResolutionESProducer.h:41
JetResolutionESProducer::produce
std::unique_ptr< JME::JetResolution > produce(JetResolutionRcd const &iRecord)
Definition: JetResolutionESProducer.h:31
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESProducer.h
JetResolutionScaleFactorESProducer::produce
std::unique_ptr< JME::JetResolutionScaleFactor > produce(JetResolutionScaleFactorRcd const &iRecord)
Definition: JetResolutionESProducer.h:48
JetResolutionScaleFactorESProducer
Definition: JetResolutionESProducer.h:36
JetResolutionRcd
Definition: JetResolutionRcd.h:9
JetResolutionESProducer
Definition: JetResolutionESProducer.h:19
JetResolution.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
JetResolutionESProducer::token_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > token_
Definition: JetResolutionESProducer.h:21
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd >
JetResolutionScaleFactorESProducer::token_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > token_
Definition: JetResolutionESProducer.h:38
ModuleFactory.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
JetResolutionESProducer::JetResolutionESProducer
JetResolutionESProducer(edm::ParameterSet const &fConfig)
Definition: JetResolutionESProducer.h:24
edm::ESProducer
Definition: ESProducer.h:104
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
JetResolutionScaleFactorRcd.h
JetResolutionScaleFactorRcd
Definition: JetResolutionScaleFactorRcd.h:9
ParameterSet.h
label
const char * label
Definition: PFTauDecayModeTools.cc:11
JetResolutionRcd.h