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 
19 // system include files
20 #include <memory>
21 
22 // user include files
25 
34 
35 //#define EDM_ML_DEBUG
36 
37 //
38 // class decleration
39 //
40 
42 
43 public:
46 
47  typedef std::shared_ptr< FastTimeTopology > ReturnType;
48 
49  ReturnType produce(const IdealGeometryRecord&);
50 
51 private:
52  // ----------member data ---------------------------
54  int type_;
56 };
57 
58 
60 
61  name_ = iConfig.getUntrackedParameter<std::string>("Name");
62  type_ = iConfig.getUntrackedParameter<int>("Type");
63  subdet_ = FastTime;
64 #ifdef EDM_ML_DEBUG
65  std::cout <<"constructing FastTimeTopology for " << name_ << " Type "
66  << type_ << std::endl;
67 #endif
68  setWhatProduced(this, name_);
69 }
70 
71 
73 
74 
75 //
76 // member functions
77 //
78 
79 // ------------ method called to produce the data ------------
82 
84  iRecord.get(pHGDC) ;
85  const FastTimeDDDConstants & hgdc = (*pHGDC);
86 
87  ReturnType ct ( new FastTimeTopology(hgdc, subdet_, type_) ) ;
88 #ifdef EDM_ML_DEBUG
89  std::cout << "Create FastTimeTopology(hgdc,subdet,type)" << std::endl;
90 #endif
91  return ct ;
92 }
93 
FastTimeTopologyBuilder(const edm::ParameterSet &iP)
T getUntrackedParameter(std::string const &, T const &) const
ForwardSubdetector
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::shared_ptr< FastTimeTopology > ReturnType
void get(HolderT &iHolder) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ReturnType produce(const IdealGeometryRecord &)