CMS 3D CMS Logo

TrackerInteractionGeometryESProducer.cc
Go to the documentation of this file.
7 
8 #include <memory>
9 #include <string>
10 
12 public:
14  ~TrackerInteractionGeometryESProducer() override = default;
15  std::unique_ptr<TrackerInteractionGeometry> produce(const TrackerInteractionGeometryRecord&);
16 
17 private:
21 };
22 
24  auto cc = setWhatProduced(this);
25  label_ = p.getUntrackedParameter<std::string>("trackerGeometryLabel", "");
26  geoSearchToken_ = cc.consumes(edm::ESInputTag("", label_));
27  theTrackerMaterial_ = p.getParameter<edm::ParameterSet>("TrackerMaterial");
28 }
29 
30 std::unique_ptr<TrackerInteractionGeometry> TrackerInteractionGeometryESProducer::produce(
31  const TrackerInteractionGeometryRecord& iRecord) {
32  const GeometricSearchTracker* theGeomSearchTracker = &iRecord.get(geoSearchToken_);
33  return std::make_unique<TrackerInteractionGeometry>(theTrackerMaterial_, theGeomSearchTracker);
34 }
35 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
~TrackerInteractionGeometryESProducer() override=default
std::unique_ptr< TrackerInteractionGeometry > produce(const TrackerInteractionGeometryRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > geoSearchToken_