File indexing completed on 2023-03-17 11:10:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <memory>
0014
0015
0016 #include "FWCore/Framework/interface/ModuleFactory.h"
0017 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0018 #include "FWCore/Framework/interface/ESProducer.h"
0019 #include "FWCore/Framework/interface/ModuleFactory.h"
0020 #include "FWCore/Utilities/interface/do_nothing_deleter.h"
0021
0022 #include "CondFormats/JetMETObjects/interface/QGLikelihoodObject.h"
0023 #include "CondFormats/DataRecord/interface/QGLikelihoodSystematicsRcd.h"
0024
0025 class QGLikelihoodSystematicsESProducer : public edm::ESProducer {
0026 public:
0027 QGLikelihoodSystematicsESProducer(const edm::ParameterSet&);
0028 ~QGLikelihoodSystematicsESProducer() override{};
0029
0030 std::shared_ptr<const QGLikelihoodSystematicsObject> produce(const QGLikelihoodSystematicsRcd&);
0031
0032 private:
0033 const edm::ESGetToken<QGLikelihoodSystematicsObject, QGLikelihoodSystematicsRcd> token_;
0034 };
0035
0036 QGLikelihoodSystematicsESProducer::QGLikelihoodSystematicsESProducer(const edm::ParameterSet& iConfig)
0037 : token_(setWhatProduced(this, iConfig.getParameter<std::string>("@module_label"))
0038 .consumes(edm::ESInputTag{"", iConfig.getParameter<std::string>("algo")})) {}
0039
0040
0041 std::shared_ptr<const QGLikelihoodSystematicsObject> QGLikelihoodSystematicsESProducer::produce(
0042 const QGLikelihoodSystematicsRcd& iRecord) {
0043 return std::shared_ptr<const QGLikelihoodSystematicsObject>(&iRecord.get(token_), edm::do_nothing_deleter());
0044 }
0045
0046 DEFINE_FWK_EVENTSETUP_MODULE(QGLikelihoodSystematicsESProducer);