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