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