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
31 
32 //#define EDM_ML_DEBUG
33 
34 //
35 // class decleration
36 //
37 
39 
40 public:
42  virtual ~HGCalGeometryESProducer() ;
43 
44  typedef std::shared_ptr<HGCalGeometry> ReturnType;
45 
46  ReturnType produce(const IdealGeometryRecord&);
47 
48 private:
49  // ----------member data ---------------------------
51 };
52 
53 
55 
56  name_ = iConfig.getUntrackedParameter<std::string>("Name");
57 #ifdef EDM_ML_DEBUG
58  std::cout <<"constructing HGCalGeometry for " << name_ << std::endl;
59 #endif
60  setWhatProduced(this, name_);
61 }
62 
63 
65 
66 
67 //
68 // member functions
69 //
70 
71 // ------------ method called to produce the data ------------
74 
76  iRecord.get(name_,topo);
77 
78  HGCalGeometryLoader builder;
79  ReturnType ct(builder.build(*topo));
80 #ifdef EDM_ML_DEBUG
81  std::cout << "Create HGCalGeometry (*topo)" << std::endl;
82 #endif
83  return ct ;
84 }
85 
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