Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimTracker
TrackAssociatorESProducer
src
TrackAssociatorByHitsESProducer.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/TrackAssociatorESProducer/src/TrackAssociatorByHitsESProducer.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/TrackAssociation/interface/TrackAssociatorByHits.h
"
13
#include "
SimTracker/Records/interface/TrackAssociatorRecord.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
TrackAssociatorByHitsESProducer::TrackAssociatorByHitsESProducer(
const
edm::ParameterSet
& iConfig)
32
{
33
//the following line is needed to tell the framework what
34
// data is being produced
35
std::string
myName=iConfig.
getParameter
<
std::string
>(
"ComponentName"
);
36
setWhatProduced(
this
,myName);
37
38
//now do what ever other initialization is needed
39
conf_=iConfig;
40
}
41
42
43
TrackAssociatorByHitsESProducer::~TrackAssociatorByHitsESProducer()
44
{
45
46
// do anything here that needs to be done at desctruction time
47
// (e.g. close files, deallocate resources etc.)
48
49
}
50
51
52
//
53
// member functions
54
//
55
56
// ------------ method called to produce the data ------------
57
TrackAssociatorByHitsESProducer::ReturnType
58
TrackAssociatorByHitsESProducer::produce(
const
TrackAssociatorRecord
& iRecord)
59
{
60
using namespace
edm::es;
61
edm::ESHandle<MagneticField>
theMF;
62
iRecord.
getRecord
<
IdealMagneticFieldRecord
>().
get
(theMF);
63
std::auto_ptr<TrackAssociatorBase> pTrackAssociatorBase (
new
TrackAssociatorByHits
(conf_));
64
return
pTrackAssociatorBase ;
65
}
66
67
//define this as a plug-in
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TrackAssociatorRecord.h
TrackAssociatorByHits_cfi.TrackAssociatorByHits
tuple TrackAssociatorByHits
Definition:
TrackAssociatorByHits_cfi.py:3
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
MagneticField.h
ParameterSet.h
TrackAssociatorByHits.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
TrackAssociatorRecord
Definition:
TrackAssociatorRecord.h:18
ESProducer.h
EventSetupRecordIntervalFinder.h
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.5