CMS 3D CMS Logo

TrackerRecoGeometryESProducer.cc
Go to the documentation of this file.
8 
16 
17 #include <memory>
18 #include <string>
19 
21 public:
23 
24  std::unique_ptr<GeometricSearchTracker> produce(const TrackerRecoGeometryRecord &);
25 
26  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
27 
28 private:
31 };
32 
33 using namespace edm;
34 
36  auto c = setWhatProduced(this);
37 
38  // 08-Oct-2007 - Patrick Janot
39  // Allow several reco geometries to be created, corresponding to the labelled
40  // TrackerDigiGeometry's - that must created beforehand. Useful to handle an
41  // aligned and a misaligned geometry in the same job.
42  // The default parameter ("") makes this change transparent to the user
43  // See FastSimulation/Configuration/data/ for examples of cfi's.
44  c.setConsumes(geomToken_, edm::ESInputTag("", p.getUntrackedParameter<std::string>("trackerGeometryLabel")));
45  c.setConsumes(tTopToken_);
46 }
47 
48 std::unique_ptr<GeometricSearchTracker> TrackerRecoGeometryESProducer::produce(
49  const TrackerRecoGeometryRecord &iRecord) {
50  TrackerGeometry const &tG = iRecord.get(geomToken_);
51 
53  return std::unique_ptr<GeometricSearchTracker>(builder.build(tG.trackerDet(), &tG, &iRecord.get(tTopToken_)));
54 }
55 
58 
59  desc.addUntracked<std::string>("trackerGeometryLabel", "");
60  descriptions.addDefault(desc);
61 }
62 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
T getUntrackedParameter(std::string const &, T const &) const
GeometricDet const * trackerDet() const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::unique_ptr< GeometricSearchTracker > produce(const TrackerRecoGeometryRecord &)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HLT enums.
TrackerRecoGeometryESProducer(const edm::ParameterSet &p)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopToken_
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo) __attribute__((cold))