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 
19 // system include files
20 #include <memory>
21 
22 // user include files
32 
33 //#define EDM_ML_DEBUG
34 
35 //
36 // class decleration
37 //
38 
40 
41 public:
43  ~HGCalGeometryESProducer() override ;
44 
45  using ReturnType = std::unique_ptr<HGCalGeometry>;
46 
48 
49 private:
50  // ----------member data ---------------------------
52 };
53 
54 
56 
57  name_ = iConfig.getUntrackedParameter<std::string>("Name");
58 #ifdef EDM_ML_DEBUG
59  edm::LogVerbatim("HGCalGeom") << "Constructing HGCalGeometry for " << name_;
60 #endif
61  setWhatProduced(this, name_);
62 }
63 
64 
66 
67 
68 //
69 // member functions
70 //
71 
72 // ------------ method called to produce the data ------------
75 
77  iRecord.get(name_,topo);
78 #ifdef EDM_ML_DEBUG
79  edm::LogVerbatim("HGCalGeom") << "Create HGCalGeometry (*topo) with "
80  << topo.isValid();
81 #endif
82 
83  HGCalGeometryLoader builder;
84  return ReturnType(builder.build(*topo));
85 }
86 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
T getUntrackedParameter(std::string const &, T const &) const
HGCalGeometry * build(const HGCalTopology &)
HGCalGeometryESProducer(const edm::ParameterSet &iP)
ReturnType produce(const IdealGeometryRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::unique_ptr< HGCalGeometry > ReturnType
bool isValid() const
Definition: ESHandle.h:45
bool get(HolderT &iHolder) const