CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BtagPerformanceESProducer.cc
Go to the documentation of this file.
2 
7 
8 
9 #include <iostream>
10 #include <memory>
11 #include <string>
12 
13 using namespace edm;
14 
16 {
17  std::string myname = p.getParameter<std::string>("ComponentName");
18  mypl = p.getParameter<std::string>("PayloadName");
19  mywp = p.getParameter<std::string>("WorkingPointName");
20 
21  pset_ = p;
22  setWhatProduced(this,myname);
23 }
24 
26 
27 boost::shared_ptr<BtagPerformance>
30  //ESHandle<PhysicsPerformancePayload> pl;
32  iRecord.getRecord<PerformancePayloadRecord>().get(mypl,pl);
33 
34  std::cout <<"HERE "<<std::endl;
35  iRecord.getRecord<PerformanceWPRecord>().get(mywp,wp);
36  std::cout <<"HERE "<<std::endl;
37 
38  std::cout <<" Got the payload, which is a "<<typeid(*(pl.product())).name()<<std::endl;
39 
40  // BtagWorkingPoint wp;
41 
42 
43 
44  _perf = boost::shared_ptr<BtagPerformance>(new BtagPerformance(*((pl.product())), *((wp.product()))));
45  // _perf = boost::shared_ptr<BtagPerformance>(new BtagPerformance(*((pl.product())), wp));
46  return _perf;
47 }
48 
49 
51 
T getParameter(std::string const &) const
boost::shared_ptr< BtagPerformance > produce(const BTagPerformanceRecord &)
T const * product() const
Definition: ESHandle.h:62
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56
BtagPerformanceESProducer(const edm::ParameterSet &p)
tuple cout
Definition: gather_cfg.py:121