CMS 3D CMS Logo

TrackingRecHitPropagatorESProducer.cc
Go to the documentation of this file.
9 
10 #include <string>
11 #include <memory>
12 
14 public:
16 
17  std::unique_ptr<TrackingRecHitPropagator> produce(const TrackingComponentsRecord&);
18 
19  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
20 
21 private:
23 };
24 
25 using namespace edm;
26 
28  : mfToken_(setWhatProduced(this, p.getParameter<std::string>("ComponentName"))
30  edm::ESInputTag("", p.getParameter<std::string>("SimpleMagneticField")))) {}
31 
32 std::unique_ptr<TrackingRecHitPropagator> TrackingRecHitPropagatorESProducer::produce(
33  const TrackingComponentsRecord& iRecord) {
34  return std::make_unique<TrackingRecHitPropagator>(&iRecord.get(mfToken_));
35 }
36 
39  desc.add<std::string>("ComponentName");
40  desc.add<std::string>("SimpleMagneticField", "");
41  descriptions.addDefault(desc);
42 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unique_ptr< TrackingRecHitPropagator > produce(const TrackingComponentsRecord &)
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
HLT enums.
TrackingRecHitPropagatorESProducer(const edm::ParameterSet &p)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_