CMS 3D CMS Logo

TrackingRecHitPropagatorESProducer.cc
Go to the documentation of this file.
2 
8 
9 #include <string>
10 #include <memory>
11 
12 using namespace edm;
13 
15 {
16  std::string myname = p.getParameter<std::string>("ComponentName");
17  pset_ = p;
18  setWhatProduced(this,myname);
19 }
20 
22 
23 std::unique_ptr<TrackingRecHitPropagator>
25  ESHandle<MagneticField> magfield;
26  std::string mfName = "";
27  if (pset_.exists("SimpleMagneticField"))
28  mfName = pset_.getParameter<std::string>("SimpleMagneticField");
29  iRecord.getRecord<IdealMagneticFieldRecord>().get(mfName,magfield);
30  // edm::ESInputTag mfESInputTag(mfName);
31  // iRecord.getRecord<IdealMagneticFieldRecord>().get(mfESInputTag,magfield);
32  return std::make_unique<TrackingRecHitPropagator>(magfield.product());
33 }
34 
35 
T getParameter(std::string const &) const
std::unique_ptr< TrackingRecHitPropagator > produce(const TrackingComponentsRecord &)
HLT enums.
TrackingRecHitPropagatorESProducer(const edm::ParameterSet &p)
T const * product() const
Definition: ESHandle.h:86