CMS 3D CMS Logo

TrackerParametersESModule.cc
Go to the documentation of this file.
15 
16 #include <memory>
17 
18 namespace edm {
20 }
21 class PTrackerParameters;
23 
25 public:
27 
28  using ReturnType = std::unique_ptr<PTrackerParameters>;
29 
31 
33 
34 private:
38 };
39 
41  fromDD4hep_ = ps.getParameter<bool>("fromDD4hep");
42  auto cc = setWhatProduced(this);
43  if (fromDD4hep_)
45  else
47 
48 #ifdef EDM_ML_DEBUG
49  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::TrackerParametersESModule called with dd4hep: "
50  << fromDD4hep_;
51 #endif
52 }
53 
56  desc.add<bool>("fromDD4hep", false);
57  descriptions.add("trackerParameters", desc);
58 }
59 
61  edm::LogInfo("TrackerGeom") << "TrackerParametersESModule::produce(const PTrackerParametersRcd& iRecord)";
62 
63  auto ptp = std::make_unique<PTrackerParameters>();
65 
66  if (fromDD4hep_) {
67 #ifdef EDM_ML_DEBUG
68  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::produce try to access cms::DDCompactView";
69 #endif
71  builder.build(&(*cpv), *ptp);
72  } else {
73 #ifdef EDM_ML_DEBUG
74  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::produce try to access DDCompactView";
75 #endif
77  builder.build(&(*cpv), *ptp);
78  }
79 
80  return ptp;
81 }
82 
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:165
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
std::unique_ptr< PTrackerParameters > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
Log< level::Info, false > LogInfo
TrackerParametersESModule(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLT enums.
ReturnType produce(const PTrackerParametersRcd &)