CMS 3D CMS Logo

HGCalTBTopologyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CaloEventSetup
4 // Class: HGCalTBTopologyBuilder
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  ~HGCalTBTopologyBuilder() override;
46 
47  using ReturnType = std::unique_ptr<HGCalTBTopology>;
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 HGCalTBTopology 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 HGCalTBDDDConstants& hgdc = iRecord.get(hgcToken_);
75 
76 #ifdef EDM_ML_DEBUG
77  edm::LogVerbatim("HGCalGeom") << "Create HGCalTBTopology(hgdc,det)";
78 #endif
79  return std::make_unique<HGCalTBTopology>(&hgdc, det_);
80 }
81 
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< HGCalTBTopology > ReturnType
HGCalTBTopologyBuilder(const edm::ParameterSet &iP)
ReturnType produce(const IdealGeometryRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
edm::ESGetToken< HGCalTBDDDConstants, IdealGeometryRecord > hgcToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const