CMS 3D CMS Logo

HGCalParametersESModule.cc
Go to the documentation of this file.
10 
11 //#define EDM_ML_DEBUG
12 
14  public:
16  ~HGCalParametersESModule(void) override;
17 
18  using ReturnType = std::unique_ptr<HGCalParameters>;
19 
21 
22  private:
25 };
26 
32 #ifdef EDM_ML_DEBUG
33  edm::LogVerbatim("HGCalGeom")
34  << "HGCalParametersESModule for " << name_ << ":" << namew_ << ":"
35  << namec_ << ":" << namet_;
36 #endif
37  auto cc = setWhatProduced(this, name_);
38  cpvToken_ = cc.consumes<DDCompactView>(edm::ESInputTag{});
39 }
40 
42 
44  const IdealGeometryRecord& iRecord) {
45  edm::LogVerbatim("HGCalGeom")
46  << "HGCalParametersESModule::produce(const IdealGeometryRecord& iRecord)";
48 
49  auto ptp = std::make_unique<HGCalParameters>(name_);
50  HGCalParametersFromDD builder;
51  builder.build(cpv.product(), *ptp, name_, namew_, namec_, namet_);
52 
53  return ptp;
54 }
55 
56 // define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
T getUntrackedParameter(std::string const &, T const &) const
bool build(const DDCompactView *, HGCalParameters &, const std::string &, const std::string &, const std::string &, const std::string &)
ReturnType produce(const IdealGeometryRecord &)
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
std::unique_ptr< HGCalParameters > ReturnType
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
T const * product() const
HGCalParametersESModule(const edm::ParameterSet &)