CMS 3D CMS Logo

StraightLinePropagatorESProducer.cc
Go to the documentation of this file.
4 
9 
10 #include <string>
11 #include <memory>
12 
13 using namespace edm;
14 
16 {
17  std::string myname = p.getParameter<std::string>("ComponentName");
18  pset_ = p;
19  setWhatProduced(this,myname);
20 }
21 
23 
24 std::unique_ptr<Propagator>
26 // if (_propagator){
27 // delete _propagator;
28 // _propagator = 0;
29 // }
30  ESHandle<MagneticField> magfield;
31  iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield );
32  std::string pdir = pset_.getParameter<std::string>("PropagationDirection");
33 
35 
36  if (pdir == "oppositeToMomentum") dir = oppositeToMomentum;
37  else if (pdir == "anyDirection") dir = anyDirection;
38  return std::make_unique<StraightLinePropagator>(&(*magfield),dir);
39 }
40 
41 
T getParameter(std::string const &) const
std::unique_ptr< Propagator > produce(const TrackingComponentsRecord &)
PropagationDirection
StraightLinePropagatorESProducer(const edm::ParameterSet &p)
HLT enums.
dbl *** dir
Definition: mlp_gen.cc:35