Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimTracker
VertexAssociatorESProducer
src
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
7
#include "
FWCore/Framework/interface/ModuleFactory.h
"
8
#include "
FWCore/Framework/interface/ESProducer.h
"
9
10
#include "
FWCore/Framework/interface/ESHandle.h
"
11
12
#include "
SimTracker/VertexAssociation/interface/VertexAssociatorByTracks.h
"
13
#include "
SimTracker/Records/interface/VertexAssociatorRecord.h
"
14
#include "
MagneticField/Engine/interface/MagneticField.h
"
15
//#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
16
#include "
FWCore/Framework/interface/EventSetupRecordIntervalFinder.h
"
17
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
18
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
19
20
//
21
// constants, enums and typedefs
22
//
23
24
//
25
// static data member definitions
26
//
27
28
//
29
// constructors and destructor
30
//
31
VertexAssociatorByTracksESProducer::VertexAssociatorByTracksESProducer
(
const
edm::ParameterSet
& iConfig)
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 ------------
56
VertexAssociatorByTracksESProducer::ReturnType
57
VertexAssociatorByTracksESProducer::produce(
const
VertexAssociatorRecord
& iRecord)
58
{
59
using namespace
edm::es;
60
edm::ESHandle<MagneticField>
theMF;
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
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:12
MagneticField.h
ParameterSet.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
ecaldqm::ReturnType
std::map< DetId, double > ReturnType
Definition:
DBReaderWorkers.cc:55
edm::ESHandle< MagneticField >
ESHandle.h
VertexAssociatorRecord
Definition:
VertexAssociatorRecord.h:9
VertexAssociatorByTracks
Definition:
VertexAssociatorByTracks.h:11
ESProducer.h
EventSetupRecordIntervalFinder.h
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
VertexAssociatorByTracks.h
VertexAssociatorByTracks_cfi.VertexAssociatorByTracksESProducer
tuple VertexAssociatorByTracksESProducer
Definition:
VertexAssociatorByTracks_cfi.py:3
IdealMagneticFieldRecord.h
VertexAssociatorRecord.h
Generated for CMSSW Reference Manual by
1.8.5