CMS 3D CMS Logo

HGCalNumberingInitialization.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HGCalNumberingInitialization
4 // Class: HGCalNumberingInitialization
5 //
14 //
15 // Original Author: Sunanda Banerjee
16 // Created: Tue Mar 21 16:40:29 PDT 2013
17 //
18 
19 // user include files
24 
28 
29 //#define EDM_ML_DEBUG
30 
32 public:
35 
36  typedef std::unique_ptr<HGCalDDDConstants> ReturnType;
37 
39 
40 private:
43 };
44 
46  name_ = iConfig.getUntrackedParameter<std::string>("Name");
47 #ifdef EDM_ML_DEBUG
48  edm::LogVerbatim("HGCalGeom") << "HGCalNumberingInitialization for " << name_;
49 #endif
50  auto cc = setWhatProduced(this, name_);
51  hgParToken_ = cc.consumes<HGCalParameters>(edm::ESInputTag{"", name_});
52 }
53 
55 
56 // ------------ method called to produce the data ------------
58  edm::LogVerbatim("HGCalGeom") << "in HGCalNumberingInitialization::produce for " << name_;
59  const auto& pHGpar = iRecord.get(hgParToken_);
60  return std::make_unique<HGCalDDDConstants>(&pHGpar, name_);
61 }
62 
63 // define this as a plug-in
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::unique_ptr< HGCalDDDConstants > ReturnType
T getUntrackedParameter(std::string const &, T const &) const
ReturnType produce(const IdealGeometryRecord &)
HGCalNumberingInitialization(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESGetToken< HGCalParameters, IdealGeometryRecord > hgParToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const