CMS 3D CMS Logo

DetIdAssociatorESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetIdAssociatorESProducer
4 // Class: DetIdAssociatorESProducer
5 //
13 //
14 // Original Author: Jean-Roch Vlimant
15 // Created: Thu Oct 4 02:28:48 CEST 2007
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
28 #include "DetIdAssociatorFactory.h"
29 
31 
32 
33 //
34 // class decleration
35 //
36 
38 public:
40  ~DetIdAssociatorESProducer() override;
41 
42  typedef std::shared_ptr<DetIdAssociator> ReturnType;
43 
44  ReturnType produce(const DetIdAssociatorRecord&);
45 private:
48 };
49 
50 //
51 // constants, enums and typedefs
52 //
53 
54 //
55 // static data member definitions
56 //
57 
58 //
59 // constructors and destructor
60 //
62 {
63  cName =iConfig.getParameter<std::string>("ComponentName");
64  pSet = iConfig;
65  setWhatProduced(this, cName);
66 }
67 
68 
70 {
71 }
72 
73 
74 //
75 // member functions
76 //
77 
78 // ------------ method called to produce the data ------------
81 {
82  using namespace edm::es;
83  LogTrace("TrackAssociator") << "Making DetIdAssociatorRecord with label: " << cName;
85  dia->setGeometry(iRecord);
86  dia->setConditions(iRecord);
87  dia->buildMap();
88  LogTrace("TrackAssociator") << "Map id built for DetIdAssociatorRecord with label: " << cName;
89  return dia;
90 }
91 
92 //define this as a plug-in
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
std::shared_ptr< DetIdAssociator > ReturnType
DetIdAssociatorESProducer(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnType produce(const DetIdAssociatorRecord &)
#define LogTrace(id)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
T get(const Candidate &c)
Definition: component.h:55