Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
RecoPixelVertexing
PixelTrackFitting
plugins
PixelTrackDumpCUDA.cc
Go to the documentation of this file.
1
#include <cuda_runtime.h>
2
3
#include "
CUDADataFormats/Common/interface/Product.h
"
4
#include "
CUDADataFormats/Track/interface/PixelTrackHeterogeneous.h
"
5
#include "
CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DHeterogeneous.h
"
6
#include "
CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h
"
7
#include "
DataFormats/Common/interface/Handle.h
"
8
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/Framework/interface/EventSetup.h
"
12
#include "
FWCore/Framework/interface/MakerMacros.h
"
13
#include "
FWCore/Framework/interface/global/EDAnalyzer.h
"
14
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
17
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
18
#include "
FWCore/Utilities/interface/EDGetToken.h
"
19
#include "
FWCore/Utilities/interface/InputTag.h
"
20
#include "
FWCore/Utilities/interface/RunningAverage.h
"
21
#include "
HeterogeneousCore/CUDACore/interface/ScopedContext.h
"
22
#include "
RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h
"
23
24
class
PixelTrackDumpCUDA
:
public
edm::global::EDAnalyzer
<> {
25
public
:
26
explicit
PixelTrackDumpCUDA
(
const
edm::ParameterSet
& iConfig);
27
~PixelTrackDumpCUDA
()
override
=
default
;
28
29
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
30
31
private
:
32
void
analyze
(
edm::StreamID
streamID,
edm::Event
const
&
iEvent
,
const
edm::EventSetup
& iSetup)
const override
;
33
const
bool
m_onGPU
;
34
edm::EDGetTokenT<cms::cuda::Product<PixelTrackHeterogeneous>
>
tokenGPUTrack_
;
35
edm::EDGetTokenT<cms::cuda::Product<ZVertexHeterogeneous>
>
tokenGPUVertex_
;
36
edm::EDGetTokenT<PixelTrackHeterogeneous>
tokenSoATrack_
;
37
edm::EDGetTokenT<ZVertexHeterogeneous>
tokenSoAVertex_
;
38
};
39
40
PixelTrackDumpCUDA::PixelTrackDumpCUDA
(
const
edm::ParameterSet
& iConfig)
41
: m_onGPU(iConfig.getParameter<
bool
>(
"onGPU"
)) {
42
if
(
m_onGPU
) {
43
tokenGPUTrack_
=
44
consumes<cms::cuda::Product<PixelTrackHeterogeneous>>(iConfig.
getParameter
<
edm::InputTag
>(
"pixelTrackSrc"
));
45
tokenGPUVertex_
=
46
consumes<cms::cuda::Product<ZVertexHeterogeneous>>(iConfig.
getParameter
<
edm::InputTag
>(
"pixelVertexSrc"
));
47
}
else
{
48
tokenSoATrack_
= consumes<PixelTrackHeterogeneous>(iConfig.
getParameter
<
edm::InputTag
>(
"pixelTrackSrc"
));
49
tokenSoAVertex_
= consumes<ZVertexHeterogeneous>(iConfig.
getParameter
<
edm::InputTag
>(
"pixelVertexSrc"
));
50
}
51
}
52
53
void
PixelTrackDumpCUDA::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
54
edm::ParameterSetDescription
desc
;
55
56
desc
.add<
bool
>(
"onGPU"
,
true
);
57
desc
.add<
edm::InputTag
>(
"pixelTrackSrc"
,
edm::InputTag
(
"pixelTracksCUDA"
));
58
desc
.add<
edm::InputTag
>(
"pixelVertexSrc"
,
edm::InputTag
(
"pixelVerticesCUDA"
));
59
descriptions.
add
(
"pixelTrackDumpCUDA"
,
desc
);
60
}
61
62
void
PixelTrackDumpCUDA::analyze
(
edm::StreamID
streamID,
63
edm::Event
const
&
iEvent
,
64
const
edm::EventSetup
& iSetup)
const
{
65
if
(
m_onGPU
) {
66
auto
const
& hTracks =
iEvent
.get(
tokenGPUTrack_
);
67
cms::cuda::ScopedContextProduce
ctx{hTracks};
68
69
auto
const
&
tracks
= ctx.get(hTracks);
70
auto
const
* tsoa =
tracks
.get();
71
assert
(tsoa);
72
73
auto
const
&
vertices
= ctx.get(
iEvent
.get(
tokenGPUVertex_
));
74
auto
const
* vsoa =
vertices
.get();
75
assert
(vsoa);
76
77
}
else
{
78
auto
const
* tsoa =
iEvent
.get(
tokenSoATrack_
).get();
79
assert
(tsoa);
80
81
auto
const
* vsoa =
iEvent
.get(
tokenSoAVertex_
).get();
82
assert
(vsoa);
83
}
84
}
85
86
DEFINE_FWK_MODULE
(
PixelTrackDumpCUDA
);
ConfigurationDescriptions.h
RunningAverage.h
edm::StreamID
Definition:
StreamID.h:30
PixelTrackDumpCUDA::tokenSoAVertex_
edm::EDGetTokenT< ZVertexHeterogeneous > tokenSoAVertex_
Definition:
PixelTrackDumpCUDA.cc:37
Handle.h
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
PixelTrackDumpCUDA::~PixelTrackDumpCUDA
~PixelTrackDumpCUDA() override=default
ESHandle.h
cms::cuda::ScopedContextProduce
Definition:
ScopedContext.h:149
edm::EDGetTokenT
Definition:
EDGetToken.h:33
TrackingRecHit2DHeterogeneous.h
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
cms::cuda::assert
assert(be >=bs)
PixelTrackDumpCUDA::PixelTrackDumpCUDA
PixelTrackDumpCUDA(const edm::ParameterSet &iConfig)
Definition:
PixelTrackDumpCUDA.cc:40
PixelTrackDumpCUDA::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PixelTrackDumpCUDA.cc:53
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
PixelTrackDumpCUDA::tokenSoATrack_
edm::EDGetTokenT< PixelTrackHeterogeneous > tokenSoATrack_
Definition:
PixelTrackDumpCUDA.cc:36
PixelRecoUtilities.h
ParameterSetDescription.h
EDGetToken.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition:
CAHitNtupletGeneratorKernelsImpl.h:159
ModuleDef.h
PixelTrackDumpCUDA::m_onGPU
const bool m_onGPU
Definition:
PixelTrackDumpCUDA.cc:33
iEvent
int iEvent
Definition:
GenABIO.cc:224
PixelTrackDumpCUDA::tokenGPUVertex_
edm::EDGetTokenT< cms::cuda::Product< ZVertexHeterogeneous > > tokenGPUVertex_
Definition:
PixelTrackDumpCUDA.cc:35
ZVertexHeterogeneous.h
edm::EventSetup
Definition:
EventSetup.h:58
InputTag.h
Product.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
ScopedContext.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
PixelTrackHeterogeneous.h
ConsumesCollector.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
PixelTrackDumpCUDA::analyze
void analyze(edm::StreamID streamID, edm::Event const &iEvent, const edm::EventSetup &iSetup) const override
Definition:
PixelTrackDumpCUDA.cc:62
PixelTrackDumpCUDA
Definition:
PixelTrackDumpCUDA.cc:24
EDAnalyzer.h
edm::InputTag
Definition:
InputTag.h:15
edm::global::EDAnalyzer
Definition:
EDAnalyzer.h:32
pwdgSkimBPark_cfi.vertices
vertices
Definition:
pwdgSkimBPark_cfi.py:7
PixelTrackDumpCUDA::tokenGPUTrack_
edm::EDGetTokenT< cms::cuda::Product< PixelTrackHeterogeneous > > tokenGPUTrack_
Definition:
PixelTrackDumpCUDA.cc:34
Generated for CMSSW Reference Manual by
1.8.16