CMS 3D CMS Logo

HGCalTBGeometryESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HGCalGeometry
4 // Class: HGCalTBGeometryESProducer
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  ~HGCalTBGeometryESProducer() override;
42 
43  using ReturnType = std::unique_ptr<HGCalTBGeometry>;
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 HGCalTBGeometry 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 HGCalTBGeometry (*topo) for " << name_;
72 
73  HGCalTBGeometryLoader 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
HGCalTBGeometry * build(const HGCalTBTopology &)
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
HGCalTBGeometryESProducer(const edm::ParameterSet &iP)
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
edm::ESGetToken< HGCalTBTopology, IdealGeometryRecord > topologyToken_
std::unique_ptr< HGCalTBGeometry > ReturnType
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ReturnType produce(const IdealGeometryRecord &)