CMS 3D CMS Logo

HGCalTriggerGeometryESProducer.cc
Go to the documentation of this file.
1 
2 #include <memory>
3 
8 
10 
12 
14 {
15  public:
18 
19  typedef std::unique_ptr<HGCalTriggerGeometryBase> ReturnType;
20 
21  ReturnType produce(const CaloGeometryRecord&);
22 
23  private:
26 };
27 
30  geometry_config_(iConfig.getParameterSet("TriggerGeometry")),
31  geometry_name_(geometry_config_.getParameter<std::string>("TriggerGeometryName"))
32 {
33  setWhatProduced(this);
34 }
35 
36 
39 {
40 
41  // do anything here that needs to be done at desctruction time
42  // (e.g. close files, deallocate resources etc.)
43 
44 }
45 
48 produce(const CaloGeometryRecord& iRecord)
49 {
50  //using namespace edm::es;
52  geometry->reset();
53  edm::ESHandle<CaloGeometry> calo_geometry;
54  iRecord.get(calo_geometry);
55  geometry->initialize(calo_geometry);
56  return geometry;
57 
58 }
59 
60 //define this as a plug-in
ReturnType produce(const CaloGeometryRecord &)
def create(alignables, pedeDump, additionalData, outputFile, config)
HGCalTriggerGeometryESProducer(const edm::ParameterSet &)
ParameterSet const & getParameterSet(ParameterSetID const &id)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
std::unique_ptr< HGCalTriggerGeometryBase > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ESHandle< TrackerGeometry > geometry
T get(const Candidate &c)
Definition: component.h:55