CMS 3D CMS Logo

HGCalTriggerGeometryESProducer.cc
Go to the documentation of this file.
1 
2 #include <memory>
3 
8 
10 
12 {
13  public:
16 
17  typedef std::unique_ptr<HGCalTriggerGeometryBase> ReturnType;
18 
19  ReturnType produce(const IdealGeometryRecord&);
20 
21  private:
24 };
25 
28  geometry_config_(iConfig.getParameterSet("TriggerGeometry")),
29  geometry_name_(geometry_config_.getParameter<std::string>("TriggerGeometryName"))
30 {
31  setWhatProduced(this);
32 }
33 
34 
37 {
38 
39  // do anything here that needs to be done at desctruction time
40  // (e.g. close files, deallocate resources etc.)
41 
42 }
43 
47 {
48  //using namespace edm::es;
50  geometry->reset();
52  const std::string& ee_sd_name = geometry->eeSDName();
53  const std::string& fh_sd_name = geometry->fhSDName();
54  const std::string& bh_sd_name = geometry->bhSDName();
55  iRecord.get(ee_sd_name, info.geom_ee);
56  iRecord.get(fh_sd_name, info.geom_fh);
57  iRecord.get(bh_sd_name, info.geom_bh);
58  iRecord.get(ee_sd_name, info.topo_ee);
59  iRecord.get(fh_sd_name, info.topo_fh);
60  iRecord.get(bh_sd_name, info.topo_bh);
61  geometry->initialize(info);
62  return geometry;
63 
64 }
65 
66 //define this as a plug-in
ReturnType produce(const IdealGeometryRecord &)
static const TGPicture * info(bool iBackgroundIsBlack)
def create(alignables, pedeDump, additionalData, outputFile, config)
HGCalTriggerGeometryESProducer(const edm::ParameterSet &)
edm::ESHandle< HGCalTopology > topo_ee
ParameterSet const & getParameterSet(ParameterSetID const &id)
edm::ESHandle< HGCalGeometry > geom_bh
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
edm::ESHandle< HGCalGeometry > geom_ee
void get(HolderT &iHolder) const
edm::ESHandle< HGCalGeometry > geom_fh
edm::ESHandle< HGCalTopology > topo_bh
edm::ESHandle< HGCalTopology > topo_fh
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