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 
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
char const * label
std::shared_ptr< const QGLikelihoodObject > produce(const QGLikelihoodRcd &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd > token_
QGLikelihoodESProducer(const edm::ParameterSet &)