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 // system include files
19 #include <memory>
20 
21 // user include files
30 
31 //#define EDM_ML_DEBUG
32 
33 //
34 // class decleration
35 //
36 
38 public:
40  ~HGCalGeometryESProducer() override;
41 
42  using ReturnType = std::unique_ptr<HGCalGeometry>;
43 
45 
46 private:
47  // ----------member data ---------------------------
50 };
51 
53  name_ = iConfig.getUntrackedParameter<std::string>("Name");
54 #ifdef EDM_ML_DEBUG
55  edm::LogVerbatim("HGCalGeom") << "Constructing HGCalGeometry for " << name_;
56 #endif
57  auto cc = setWhatProduced(this, name_);
59 }
60 
62 
63 //
64 // member functions
65 //
66 
67 // ------------ method called to produce the data ------------
69  const auto& topo = iRecord.get(topologyToken_);
70  edm::LogVerbatim("HGCalGeom") << "Create HGCalGeometry (*topo) for " << name_;
71 
72  HGCalGeometryLoader builder;
73  return ReturnType(builder.build(topo));
74 }
75 
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
HGCalGeometryESProducer::HGCalGeometryESProducer
HGCalGeometryESProducer(const edm::ParameterSet &iP)
Definition: HGCalGeometryESProducer.cc:52
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ESProducer.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HGCalGeometryLoader::build
HGCalGeometry * build(const HGCalTopology &)
Definition: HGCalGeometryLoader.cc:23
HGCalGeometryESProducer
Definition: HGCalGeometryESProducer.cc:37
HGCalTopology.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
HGCalGeometryLoader.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloSubdetectorGeometry.h
HGCalGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogVerbatim
Definition: MessageLogger.h:297
HGCalGeometryESProducer::name_
std::string name_
Definition: HGCalGeometryESProducer.cc:49
HGCalGeometryESProducer::ReturnType
std::unique_ptr< HGCalGeometry > ReturnType
Definition: HGCalGeometryESProducer.cc:42
cc
edm::ESGetToken< HGCalTopology, IdealGeometryRecord >
HGCalTopology
Definition: HGCalTopology.h:12
HGCalGeometryESProducer::produce
ReturnType produce(const IdealGeometryRecord &)
Definition: HGCalGeometryESProducer.cc:68
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
HGCalGeometryLoader
Definition: HGCalGeometryLoader.h:11
HGCalGeometryESProducer::~HGCalGeometryESProducer
~HGCalGeometryESProducer() override
Definition: HGCalGeometryESProducer.cc:61
edm::ESProducer
Definition: ESProducer.h:101
ParameterSet.h
HGCalGeometryESProducer::topologyToken_
edm::ESGetToken< HGCalTopology, IdealGeometryRecord > topologyToken_
Definition: HGCalGeometryESProducer.cc:48
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27