CMS 3D CMS Logo

FastTimeGeometryESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HGCalGeometry
4 // Class: FastTimeGeometryESProducer
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 //
16 //
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
29 
30 //#define EDM_ML_DEBUG
31 
32 //
33 // class decleration
34 //
35 
37 public:
39  ~FastTimeGeometryESProducer() override;
40 
41  using ReturnType = std::unique_ptr<FastTimeGeometry>;
42 
44 
45 private:
46  // ----------member data ---------------------------
48 };
49 
51  auto name = iConfig.getUntrackedParameter<std::string>("Name");
52 #ifdef EDM_ML_DEBUG
53  auto type = iConfig.getUntrackedParameter<int>("Type");
54  std::cout << "constructing FastTimeGeometry for " << name << " Type " << type << std::endl;
55 #endif
56  auto cc = setWhatProduced(this, name);
58 }
59 
61 
62 //
63 // member functions
64 //
65 
66 // ------------ method called to produce the data ------------
68  const auto& topo = iRecord.get(topologyToken_);
69 
70  FastTimeGeometryLoader builder;
71 #ifdef EDM_ML_DEBUG
72  std::cout << "Create FastTimeGeometry (topo)" << std::endl;
73 #endif
74  return ReturnType(builder.build(topo));
75 }
76 
type
Definition: HCALResponse.h:21
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
T getUntrackedParameter(std::string const &, T const &) const
ReturnType produce(const IdealGeometryRecord &)
edm::ESGetToken< FastTimeTopology, IdealGeometryRecord > topologyToken_
std::unique_ptr< FastTimeGeometry > ReturnType
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
FastTimeGeometry * build(const FastTimeTopology &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
FastTimeGeometryESProducer(const edm::ParameterSet &iP)