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  virtual ~FastTimeGeometryESProducer() ;
43 
44  typedef std::shared_ptr<FastTimeGeometry> ReturnType;
45 
46  ReturnType produce(const IdealGeometryRecord&);
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  ReturnType ct(builder.build(*topo));
83 #ifdef EDM_ML_DEBUG
84  std::cout << "Create FastTimeGeometry (*topo)" << std::endl;
85 #endif
86  return ct ;
87 }
88 
T getUntrackedParameter(std::string const &, T const &) const
ReturnType produce(const IdealGeometryRecord &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
std::shared_ptr< FastTimeGeometry > ReturnType
FastTimeGeometry * build(const FastTimeTopology &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
FastTimeGeometryESProducer(const edm::ParameterSet &iP)