CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: DetIdAssociatorESProducer.cc,v 1.5 2011/04/21 10:49:56 innocent Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
28 
30 #include "DetIdAssociatorFactory.h"
31 
33 
34 
35 //
36 // class decleration
37 //
38 
40 public:
43 
44  typedef boost::shared_ptr<DetIdAssociator> ReturnType;
45 
47 private:
48  std::string cName;
50 };
51 
52 //
53 // constants, enums and typedefs
54 //
55 
56 //
57 // static data member definitions
58 //
59 
60 //
61 // constructors and destructor
62 //
64 {
65  cName =iConfig.getParameter<std::string>("ComponentName");
66  pSet = iConfig;
67  setWhatProduced(this, cName);
68 }
69 
70 
72 {
73 }
74 
75 
76 //
77 // member functions
78 //
79 
80 // ------------ method called to produce the data ------------
83 {
84  using namespace edm::es;
85  LogTrace("TrackAssociator") << "Making DetIdAssociatorRecord with label: " << cName;
87  dia->setGeometry(iRecord);
88  dia->setConditions(iRecord);
89  dia->buildMap();
90  LogTrace("TrackAssociator") << "Map id built for DetIdAssociatorRecord with label: " << cName;
91  return dia;
92 }
93 
94 //define this as a plug-in
T getParameter(std::string const &) const
boost::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:56
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:56