CMS 3D CMS Logo

HGCalGeometryESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HGCalGeometry
4 // Class: HGCalGeometryESProducer
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 //
16 //
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
31 
32 //#define EDM_ML_DEBUG
33 
34 //
35 // class decleration
36 //
37 
39 public:
41  ~HGCalGeometryESProducer() override;
42 
43  using ReturnType = std::unique_ptr<HGCalGeometry>;
44 
46 
47 private:
48  // ----------member data ---------------------------
51 };
52 
54  name_ = iConfig.getUntrackedParameter<std::string>("Name");
55 #ifdef EDM_ML_DEBUG
56  edm::LogVerbatim("HGCalGeom") << "Constructing HGCalGeometry for " << name_;
57 #endif
58  auto cc = setWhatProduced(this, name_);
60 }
61 
63 
64 //
65 // member functions
66 //
67 
68 // ------------ method called to produce the data ------------
70  const auto& topo = iRecord.get(topologyToken_);
71  edm::LogVerbatim("HGCalGeom") << "Create HGCalGeometry (*topo) for " << name_;
72 
73  HGCalGeometryLoader builder;
74  return ReturnType(builder.build(topo));
75 }
76 
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:165
edm::ESGetToken< HGCalTopology, IdealGeometryRecord > topologyToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
HGCalGeometry * build(const HGCalTopology &)
HGCalGeometryESProducer(const edm::ParameterSet &iP)
T getUntrackedParameter(std::string const &, T const &) const
ReturnType produce(const IdealGeometryRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
std::unique_ptr< HGCalGeometry > ReturnType
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const