CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
30 
31 //#define EDM_ML_DEBUG
32 
33 //
34 // class decleration
35 //
36 
38 public:
40  ~FastTimeGeometryESProducer() override;
41 
42  using ReturnType = std::unique_ptr<FastTimeGeometry>;
43 
45 
46 private:
47  // ----------member data ---------------------------
49 };
50 
52  auto name = iConfig.getUntrackedParameter<std::string>("Name");
53 #ifdef EDM_ML_DEBUG
54  auto type = iConfig.getUntrackedParameter<int>("Type");
55  std::cout << "constructing FastTimeGeometry for " << name << " Type " << type << std::endl;
56 #endif
57  auto cc = setWhatProduced(this, name);
59 }
60 
62 
63 //
64 // member functions
65 //
66 
67 // ------------ method called to produce the data ------------
69  const auto& topo = iRecord.get(topologyToken_);
70 
71  FastTimeGeometryLoader builder;
72 #ifdef EDM_ML_DEBUG
73  std::cout << "Create FastTimeGeometry (topo)" << std::endl;
74 #endif
75  return ReturnType(builder.build(topo));
76 }
77 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
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
tuple cout
Definition: gather_cfg.py:144
FastTimeGeometryESProducer(const edm::ParameterSet &iP)