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  typedef std::shared_ptr<HGCalGeometry> ReturnType;
46 
47  ReturnType produce(const IdealGeometryRecord&);
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_ << std::endl;
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  ReturnType ct(builder.build(*topo));
85  return ct ;
86 }
87 
T getUntrackedParameter(std::string const &, T const &) const
HGCalGeometry * build(const HGCalTopology &)
HGCalGeometryESProducer(const edm::ParameterSet &iP)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::shared_ptr< HGCalGeometry > ReturnType
void get(HolderT &iHolder) const
ReturnType produce(const IdealGeometryRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
bool isValid() const
Definition: ESHandle.h:47