CMS 3D CMS Logo

Public Member Functions | Private Attributes

StraightLinePropagatorESProducer Class Reference

#include <StraightLinePropagatorESProducer.h>

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

List of all members.

Public Member Functions

boost::shared_ptr< Propagatorproduce (const TrackingComponentsRecord &)
 StraightLinePropagatorESProducer (const edm::ParameterSet &p)
virtual ~StraightLinePropagatorESProducer ()

Private Attributes

boost::shared_ptr< Propagator_propagator
edm::ParameterSet pset_

Detailed Description

Definition at line 10 of file StraightLinePropagatorESProducer.h.


Constructor & Destructor Documentation

StraightLinePropagatorESProducer::StraightLinePropagatorESProducer ( const edm::ParameterSet p)

Definition at line 15 of file StraightLinePropagatorESProducer.cc.

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

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

Definition at line 22 of file StraightLinePropagatorESProducer.cc.

{}

Member Function Documentation

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(), autoMagneticFieldProducer_cfi::magfield, oppositeToMomentum, and StraightLinePropagator_cfi::StraightLinePropagator.

                                                                                 { 
//   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;
}

Member Data Documentation

Definition at line 16 of file StraightLinePropagatorESProducer.h.

Definition at line 17 of file StraightLinePropagatorESProducer.h.