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);
45 
46 #ifdef EDM_ML_DEBUG
47  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::TrackerParametersESModule called with dd4hep: "
48  << fromDD4Hep_;
49 #endif
50 }
51 
54  desc.add<bool>("fromDD4Hep", false);
55  descriptions.add("trackerParameters", desc);
56 }
57 
59  edm::LogInfo("TrackerGeom") << "TrackerParametersESModule::produce(const PTrackerParametersRcd& iRecord)";
60 
61  auto ptp = std::make_unique<PTrackerParameters>();
63 
64  if (fromDD4Hep_) {
65 #ifdef EDM_ML_DEBUG
66  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::produce try to access cms::DDCompactView";
67 #endif
69  builder.build(&(*cpv), *ptp);
70  } else {
71 #ifdef EDM_ML_DEBUG
72  edm::LogVerbatim("TrackerGeom") << "TrackerParametersESModule::produce try to access DDCompactView";
73 #endif
75  builder.build(&(*cpv), *ptp);
76  }
77 
78  return ptp;
79 }
80 
ConfigurationDescriptions.h
TrackerParametersFromDD.h
edm::ESInputTag
Definition: ESInputTag.h:87
ESTransientHandle.h
PTrackerParameters
Definition: PTrackerParameters.h:6
ESHandle.h
TrackerParametersESModule::fromDD4Hep_
bool fromDD4Hep_
Definition: TrackerParametersESModule.cc:37
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackerParametersESModule::ReturnType
std::unique_ptr< PTrackerParameters > ReturnType
Definition: TrackerParametersESModule.cc:28
ESProducer.h
TrackerParametersESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: TrackerParametersESModule.cc:52
PTrackerParameters.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
DDCompactView.h
PTrackerParametersRcd
Definition: PTrackerParametersRcd.h:9
TrackerParametersESModule::cpvTokenDD4Hep_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition: TrackerParametersESModule.cc:36
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:92
DDCompactView.h
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
PTrackerParametersRcd.h
IdealGeometryRecord.h
cc
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
TrackerParametersESModule::TrackerParametersESModule
TrackerParametersESModule(const edm::ParameterSet &)
Definition: TrackerParametersESModule.cc:40
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ConfigurationDescriptions
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
cms::DDCompactView
Definition: DDCompactView.h:31
TrackerParametersESModule::produce
ReturnType produce(const PTrackerParametersRcd &)
Definition: TrackerParametersESModule.cc:58
TrackerParametersFromDD::build
bool build(const DDCompactView *, PTrackerParameters &)
Definition: TrackerParametersFromDD.cc:8
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESProducer
Definition: ESProducer.h:104
TrackerParametersFromDD
Definition: TrackerParametersFromDD.h:14
ParameterSet.h
TrackerParametersESModule::cpvTokenDDD_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition: TrackerParametersESModule.cc:35
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
TrackerParametersESModule
Definition: TrackerParametersESModule.cc:24