CMS 3D CMS Logo

Public Member Functions | Private Attributes

BtagPerformanceESProducer Class Reference

#include <BtagPerformanceESProducer.h>

Inheritance diagram for BtagPerformanceESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 BtagPerformanceESProducer (const edm::ParameterSet &p)
boost::shared_ptr
< BtagPerformance
produce (const BTagPerformanceRecord &)
virtual ~BtagPerformanceESProducer ()

Private Attributes

boost::shared_ptr
< BtagPerformance
_perf
std::string mypl
std::string mywp
edm::ParameterSet pset_

Detailed Description

Definition at line 12 of file BtagPerformanceESProducer.h.


Constructor & Destructor Documentation

BtagPerformanceESProducer::BtagPerformanceESProducer ( const edm::ParameterSet p)

Definition at line 15 of file BtagPerformanceESProducer.cc.

References edm::ParameterSet::getParameter(), and L1TEmulatorMonitor_cff::p.

{
  std::string myname = p.getParameter<std::string>("ComponentName");
  mypl = p.getParameter<std::string>("PayloadName"); 
  mywp = p.getParameter<std::string>("WorkingPointName");
  
  pset_ = p;
  setWhatProduced(this,myname);
}
BtagPerformanceESProducer::~BtagPerformanceESProducer ( ) [virtual]

Definition at line 25 of file BtagPerformanceESProducer.cc.

{}

Member Function Documentation

boost::shared_ptr< BtagPerformance > BtagPerformanceESProducer::produce ( const BTagPerformanceRecord iRecord)

Definition at line 28 of file BtagPerformanceESProducer.cc.

References gather_cfg::cout, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and edm::ESHandle< T >::product().

                                                                       { 
   ESHandle<PerformancePayload> pl;
   //ESHandle<PhysicsPerformancePayload> pl;
   ESHandle<PerformanceWorkingPoint> wp;
   iRecord.getRecord<PerformancePayloadRecord>().get(mypl,pl);
   
   std::cout <<"HERE "<<std::endl;
   iRecord.getRecord<PerformanceWPRecord>().get(mywp,wp);
   std::cout <<"HERE "<<std::endl;
   
   std::cout <<" Got the payload, which is a  "<<typeid(*(pl.product())).name()<<std::endl;
   
   //    BtagWorkingPoint wp;
   
   
   
   _perf  = boost::shared_ptr<BtagPerformance>(new BtagPerformance(*((pl.product())), *((wp.product()))));
   //    _perf  = boost::shared_ptr<BtagPerformance>(new BtagPerformance(*((pl.product())), wp));
   return _perf;
}

Member Data Documentation

boost::shared_ptr<BtagPerformance> BtagPerformanceESProducer::_perf [private]

Definition at line 18 of file BtagPerformanceESProducer.h.

std::string BtagPerformanceESProducer::mypl [private]

Definition at line 20 of file BtagPerformanceESProducer.h.

std::string BtagPerformanceESProducer::mywp [private]

Definition at line 21 of file BtagPerformanceESProducer.h.

Definition at line 19 of file BtagPerformanceESProducer.h.