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
31 
32 //#define EDM_ML_DEBUG
33 
34 //
35 // class decleration
36 //
37 
39 public:
41  ~FastTimeGeometryESProducer() override = default;
42 
43  using ReturnType = std::unique_ptr<FastTimeGeometry>;
44 
46 
47 private:
48  // ----------member data ---------------------------
50 };
51 
53  auto name = iConfig.getUntrackedParameter<std::string>("Name");
54 #ifdef EDM_ML_DEBUG
55  auto type = iConfig.getUntrackedParameter<int>("Type");
56  edm::LogVerbatim("HGCalGeom") << "constructing FastTimeGeometry for " << name << " Type " << type;
57 #endif
58  auto cc = setWhatProduced(this, name);
60 }
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  edm::LogVerbatim("HGCalGeom") << "Create FastTimeGeometry (topo)";
73 #endif
74  return ReturnType(builder.build(topo));
75 }
76 
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ReturnType produce(const IdealGeometryRecord &)
edm::ESGetToken< FastTimeTopology, IdealGeometryRecord > topologyToken_
~FastTimeGeometryESProducer() override=default
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< FastTimeGeometry > ReturnType
FastTimeGeometry * build(const FastTimeTopology &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
FastTimeGeometryESProducer(const edm::ParameterSet &iP)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const