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 
19 // system include files
20 #include <memory>
21 
22 // user include files
31 
32 //#define EDM_ML_DEBUG
33 
34 //
35 // class decleration
36 //
37 
39 
40 public:
42  ~FastTimeGeometryESProducer() override ;
43 
44  using ReturnType = std::unique_ptr<FastTimeGeometry>;
45 
47 
48 private:
49  // ----------member data ---------------------------
51  int type_;
52 };
53 
54 
56 
57  name_ = iConfig.getUntrackedParameter<std::string>("Name");
58  type_ = iConfig.getUntrackedParameter<int>("Type");
59 #ifdef EDM_ML_DEBUG
60  std::cout <<"constructing FastTimeGeometry for " << name_ << " Type "
61  << type_ << std::endl;
62 #endif
63  setWhatProduced(this, name_);
64 }
65 
66 
68 
69 
70 //
71 // member functions
72 //
73 
74 // ------------ method called to produce the data ------------
77 
79  iRecord.get(name_,topo);
80 
81  FastTimeGeometryLoader builder;
82 #ifdef EDM_ML_DEBUG
83  std::cout << "Create FastTimeGeometry (*topo)" << std::endl;
84 #endif
85  return ReturnType(builder.build(*topo));
86 }
87 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
T getUntrackedParameter(std::string const &, T const &) const
ReturnType produce(const IdealGeometryRecord &)
std::unique_ptr< FastTimeGeometry > ReturnType
FastTimeGeometry * build(const FastTimeTopology &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
FastTimeGeometryESProducer(const edm::ParameterSet &iP)
bool get(HolderT &iHolder) const