CMS 3D CMS Logo

QGLikelihoodESProducer.cc
Go to the documentation of this file.
1 /*
2  Description: ESProducer to get the quark-gluon likelihood object "QGLikelihoodObject"
3  from record "QGLikelihoodRcd".
4 
5  Implementation:
6  Completely trivial, simply returns the QGLikelihoodObject to the user. There is only
7  one QGLikelihoodObject object in each record.
8 */
9 // Original Author: Salvatore Rappoccio
10 // Created: Thu, 13 Mar 2014 15:02:39 GMT
11 
12 // system include files
13 #include <memory>
14 
15 // user include files
22 
25 
27 public:
30 
31  std::shared_ptr<const QGLikelihoodObject> produce(const QGLikelihoodRcd&);
32 
33 private:
35 };
36 
38  //the following line is needed to tell the framework what
39  // data is being produced
40  std::string label = iConfig.getParameter<std::string>("@module_label");
41  auto algo = iConfig.getParameter<std::string>("algo");
42  setWhatProduced(this, label).setConsumes(token_, edm::ESInputTag{"", algo});
43 }
44 
45 // Produce the data
46 std::shared_ptr<const QGLikelihoodObject> QGLikelihoodESProducer::produce(const QGLikelihoodRcd& iRecord) {
47  return std::shared_ptr<const QGLikelihoodObject>(&iRecord.get(token_), edm::do_nothing_deleter());
48 }
49 
edm::ESInputTag
Definition: ESInputTag.h:87
QGLikelihoodESProducer
Definition: QGLikelihoodESProducer.cc:26
ESHandle.h
QGLikelihoodESProducer::produce
std::shared_ptr< const QGLikelihoodObject > produce(const QGLikelihoodRcd &)
Definition: QGLikelihoodESProducer.cc:46
QGLikelihoodESProducer::~QGLikelihoodESProducer
~QGLikelihoodESProducer() override
Definition: QGLikelihoodESProducer.cc:29
edm::do_nothing_deleter
Definition: do_nothing_deleter.h:34
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ESProducer.h
QGLikelihoodRcd
Definition: QGLikelihoodRcd.h:23
QGLikelihoodESProducer::token_
edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd > token_
Definition: QGLikelihoodESProducer.cc:34
cmsdt::algo
algo
Definition: constants.h:164
QGLikelihoodESProducer::QGLikelihoodESProducer
QGLikelihoodESProducer(const edm::ParameterSet &)
Definition: QGLikelihoodESProducer.cc:37
EventSetupRecordIntervalFinder.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
QGLikelihoodObject.h
edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd >
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
QGLikelihoodRcd.h
edm::ESProducer
Definition: ESProducer.h:101
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
label
const char * label
Definition: PFTauDecayModeTools.cc:11
do_nothing_deleter.h