CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexAssociatorByTracksESProducer.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 #include "boost/shared_ptr.hpp"
4 
5 #include "SimTracker/VertexAssociatorESProducer/src/VertexAssociatorByTracksESProducer.hh"
6 // user include files
9 
11 
15 //#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
19 
20 //
21 // constants, enums and typedefs
22 //
23 
24 //
25 // static data member definitions
26 //
27 
28 //
29 // constructors and destructor
30 //
32 {
33  //the following line is needed to tell the framework what
34  // data is being produced
35  setWhatProduced(this,"VertexAssociatorByTracks");
36 
37  //now do what ever other initialization is needed
38  conf_=iConfig;
39 }
40 
41 
42 VertexAssociatorByTracksESProducer::~VertexAssociatorByTracksESProducer()
43 {
44 
45  // do anything here that needs to be done at desctruction time
46  // (e.g. close files, deallocate resources etc.)
47 
48 }
49 
50 
51 //
52 // member functions
53 //
54 
55 // ------------ method called to produce the data ------------
57 VertexAssociatorByTracksESProducer::produce(const VertexAssociatorRecord& iRecord)
58 {
59  using namespace edm::es;
61  iRecord.getRecord<IdealMagneticFieldRecord>().get(theMF);
62  std::auto_ptr<VertexAssociatorBase> pVertexAssociatorBase (new VertexAssociatorByTracks(conf_));
63  return pVertexAssociatorBase ;
64 }
65 
66 //define this as a plug-in
std::map< DetId, double > ReturnType