CMS 3D CMS Logo

HGCalTopologyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CaloEventSetup
4 // Class: HGCalTopologyBuilder
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 //
16 //
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
24 
28 
35 
36 //#define EDM_ML_DEBUG
37 
38 //
39 // class decleration
40 //
41 
43 public:
45  ~HGCalTopologyBuilder() override;
46 
47  using ReturnType = std::unique_ptr<HGCalTopology>;
48 
50 
51 private:
52  // ----------member data ---------------------------
54  int det_;
55 };
56 
58  auto name = iConfig.getParameter<std::string>("Name");
59  det_ = iConfig.getParameter<int>("Type");
60 #ifdef EDM_ML_DEBUG
61  edm::LogVerbatim("HGCalGeom") << "constructing HGCalTopology for " << name << " and det " << det_;
62 #endif
64 }
65 
67 
68 //
69 // member functions
70 //
71 
72 // ------------ method called to produce the data ------------
74  const HGCalDDDConstants& hgdc = iRecord.get(hgcToken_);
75 
76 #ifdef EDM_ML_DEBUG
77  edm::LogVerbatim("HGCalGeom") << "Create HGCalTopology(hgdc,det)";
78 #endif
79  return std::make_unique<HGCalTopology>(hgdc, det_);
80 }
81 
HGCalTopologyBuilder::hgcToken_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hgcToken_
Definition: HGCalTopologyBuilder.cc:53
HGCalTopologyBuilder::ReturnType
std::unique_ptr< HGCalTopology > ReturnType
Definition: HGCalTopologyBuilder.cc:47
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
HGCalTopologyBuilder::produce
ReturnType produce(const IdealGeometryRecord &)
Definition: HGCalTopologyBuilder.cc:73
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESProducer.h
ESGetToken.h
HGCalTopologyBuilder
Definition: HGCalTopologyBuilder.cc:42
HGCalDDDConstants
Definition: HGCalDDDConstants.h:27
ForwardSubdetector.h
HGCalTopologyBuilder::~HGCalTopologyBuilder
~HGCalTopologyBuilder() override
Definition: HGCalTopologyBuilder.cc:66
HGCalTopology.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
HGCalTopologyBuilder::HGCalTopologyBuilder
HGCalTopologyBuilder(const edm::ParameterSet &iP)
Definition: HGCalTopologyBuilder.cc:57
IdealGeometryRecord.h
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord >
CaloSubdetectorTopology.h
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
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HGCalTopologyBuilder::det_
int det_
Definition: HGCalTopologyBuilder.cc:54
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESProducer
Definition: ESProducer.h:104
HGCalDDDConstants.h
ParameterSet.h
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25