#include <StraightLinePropagatorESProducer.h>
Public Member Functions | |
boost::shared_ptr< Propagator > | produce (const TrackingComponentsRecord &) |
StraightLinePropagatorESProducer (const edm::ParameterSet &p) | |
virtual | ~StraightLinePropagatorESProducer () |
Private Attributes | |
boost::shared_ptr< Propagator > | _propagator |
edm::ParameterSet | pset_ |
Definition at line 10 of file StraightLinePropagatorESProducer.h.
StraightLinePropagatorESProducer::StraightLinePropagatorESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 15 of file StraightLinePropagatorESProducer.cc.
References edm::ParameterSet::getParameter(), AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.
{ std::string myname = p.getParameter<std::string>("ComponentName"); pset_ = p; setWhatProduced(this,myname); }
StraightLinePropagatorESProducer::~StraightLinePropagatorESProducer | ( | ) | [virtual] |
Definition at line 22 of file StraightLinePropagatorESProducer.cc.
{}
boost::shared_ptr< Propagator > StraightLinePropagatorESProducer::produce | ( | const TrackingComponentsRecord & | iRecord | ) |
Definition at line 25 of file StraightLinePropagatorESProducer.cc.
References alongMomentum, anyDirection, dir, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HLT_ES_cff::magfield, oppositeToMomentum, StraightLinePropagator_cfi::StraightLinePropagator, and AlCaHLTBitMon_QueryRunRegistry::string.
{ // if (_propagator){ // delete _propagator; // _propagator = 0; // } ESHandle<MagneticField> magfield; iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield ); std::string pdir = pset_.getParameter<std::string>("PropagationDirection"); PropagationDirection dir = alongMomentum; if (pdir == "oppositeToMomentum, alongMomentum, anyDirection") if (pdir == "oppositeToMomentum") dir = oppositeToMomentum; if (pdir == "alongMomentum") dir = alongMomentum; if (pdir == "anyDirection") dir = anyDirection; _propagator = boost::shared_ptr<Propagator>(new StraightLinePropagator(&(*magfield),dir)); return _propagator; }
boost::shared_ptr<Propagator> StraightLinePropagatorESProducer::_propagator [private] |
Definition at line 16 of file StraightLinePropagatorESProducer.h.
Definition at line 17 of file StraightLinePropagatorESProducer.h.