CMS 3D CMS Logo

FastTimeTopologyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CaloEventSetup
4 // Class: FastTimeTopologyBuilder
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 //
16 //
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
24 
33 
34 //#define EDM_ML_DEBUG
35 
36 //
37 // class decleration
38 //
39 
41 public:
43  ~FastTimeTopologyBuilder() override;
44 
45  using ReturnType = std::unique_ptr<FastTimeTopology>;
46 
48 
49 private:
50  // ----------member data ---------------------------
52  int type_;
54 };
55 
57  auto name = iConfig.getUntrackedParameter<std::string>("Name");
58  type_ = iConfig.getUntrackedParameter<int>("Type");
59  subdet_ = FastTime;
60 #ifdef EDM_ML_DEBUG
61  std::cout << "constructing FastTimeTopology for " << name << " Type " << type_ << std::endl;
62 #endif
64 }
65 
67 
68 //
69 // member functions
70 //
71 
72 // ------------ method called to produce the data ------------
74  const FastTimeDDDConstants& hgdc = iRecord.get(ftlToken_);
75 
76 #ifdef EDM_ML_DEBUG
77  std::cout << "Create FastTimeTopology(hgdc,subdet,type)" << std::endl;
78 #endif
79  return std::make_unique<FastTimeTopology>(hgdc, subdet_, type_);
80 }
81 
FastTimeTopologyBuilder(const edm::ParameterSet &iP)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ESGetToken< FastTimeDDDConstants, IdealGeometryRecord > ftlToken_
ForwardSubdetector
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< FastTimeTopology > ReturnType
ReturnType produce(const IdealGeometryRecord &)