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
PixelVertexFinding
plugins
PixelVertexSoAFromCUDA.cc
Go to the documentation of this file.
1
#include <cuda_runtime.h>
2
3
#include "
CUDADataFormats/Common/interface/Product.h
"
4
#include "
CUDADataFormats/Common/interface/HostProduct.h
"
5
#include "
CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h
"
6
#include "
DataFormats/Common/interface/Handle.h
"
7
#include "
FWCore/Framework/interface/ESHandle.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
12
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
13
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
15
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
16
#include "
FWCore/Utilities/interface/EDGetToken.h
"
17
#include "
FWCore/Utilities/interface/InputTag.h
"
18
#include "
HeterogeneousCore/CUDACore/interface/ScopedContext.h
"
19
20
class
PixelVertexSoAFromCUDA
:
public
edm::stream::EDProducer
<edm::ExternalWork> {
21
public
:
22
explicit
PixelVertexSoAFromCUDA
(
const
edm::ParameterSet
& iConfig);
23
~PixelVertexSoAFromCUDA
()
override
=
default
;
24
25
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
26
27
private
:
28
void
acquire
(
edm::Event
const
&
iEvent
,
29
edm::EventSetup
const
& iSetup,
30
edm::WaitingTaskWithArenaHolder
waitingTaskHolder)
override
;
31
void
produce
(
edm::Event
&
iEvent
,
edm::EventSetup
const
& iSetup)
override
;
32
33
edm::EDGetTokenT<cms::cuda::Product<ZVertexHeterogeneous>
>
tokenCUDA_
;
34
edm::EDPutTokenT<ZVertexHeterogeneous>
tokenSOA_
;
35
36
cms::cuda::host::unique_ptr<ZVertexSoA>
m_soa
;
37
};
38
39
PixelVertexSoAFromCUDA::PixelVertexSoAFromCUDA
(
const
edm::ParameterSet
& iConfig)
40
: tokenCUDA_(consumes<
cms
::
cuda
::Product<
ZVertexHeterogeneous
>>(iConfig.getParameter<
edm
::
InputTag
>(
"src"
))),
41
tokenSOA_(produces<
ZVertexHeterogeneous
>()) {}
42
43
void
PixelVertexSoAFromCUDA::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
44
edm::ParameterSetDescription
desc
;
45
46
desc
.add<
edm::InputTag
>(
"src"
,
edm::InputTag
(
"pixelVerticesCUDA"
));
47
descriptions.
add
(
"pixelVerticesSoA"
,
desc
);
48
}
49
50
void
PixelVertexSoAFromCUDA::acquire
(
edm::Event
const
&
iEvent
,
51
edm::EventSetup
const
& iSetup,
52
edm::WaitingTaskWithArenaHolder
waitingTaskHolder) {
53
auto
const
& inputDataWrapped =
iEvent
.get(
tokenCUDA_
);
54
cms::cuda::ScopedContextAcquire
ctx{inputDataWrapped,
std::move
(waitingTaskHolder)};
55
auto
const
& inputData = ctx.get(inputDataWrapped);
56
57
m_soa
= inputData.toHostAsync(ctx.stream());
58
}
59
60
void
PixelVertexSoAFromCUDA::produce
(
edm::Event
&
iEvent
,
edm::EventSetup
const
& iSetup) {
61
// No copies....
62
iEvent
.emplace(
tokenSOA_
,
ZVertexHeterogeneous
(
std::move
(
m_soa
)));
63
}
64
65
DEFINE_FWK_MODULE
(
PixelVertexSoAFromCUDA
);
ConfigurationDescriptions.h
PixelVertexSoAFromCUDA::m_soa
cms::cuda::host::unique_ptr< ZVertexSoA > m_soa
Definition:
PixelVertexSoAFromCUDA.cc:36
Handle.h
ESHandle.h
PixelVertexSoAFromCUDA::produce
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
Definition:
PixelVertexSoAFromCUDA.cc:60
edm::EDGetTokenT
Definition:
EDGetToken.h:33
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::EDPutTokenT
Definition:
EDPutToken.h:33
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
EDProducer.h
PixelVertexSoAFromCUDA::~PixelVertexSoAFromCUDA
~PixelVertexSoAFromCUDA() override=default
HostProduct.h
HeterogeneousSoA
Definition:
HeterogeneousSoA.h:13
edm::WaitingTaskWithArenaHolder
Definition:
WaitingTaskWithArenaHolder.h:34
MakerMacros.h
PixelVertexSoAFromCUDA::acquire
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
Definition:
PixelVertexSoAFromCUDA.cc:50
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
ParameterSetDescription.h
EDGetToken.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
ZVertexHeterogeneous
HeterogeneousSoA< ZVertexSoA > ZVertexHeterogeneous
Definition:
ZVertexHeterogeneous.h:8
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
ModuleDef.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
PixelVertexSoAFromCUDA::PixelVertexSoAFromCUDA
PixelVertexSoAFromCUDA(const edm::ParameterSet &iConfig)
Definition:
PixelVertexSoAFromCUDA.cc:39
edm::stream::EDProducer
Definition:
EDProducer.h:36
ZVertexHeterogeneous.h
PixelVertexSoAFromCUDA::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PixelVertexSoAFromCUDA.cc:43
edm::EventSetup
Definition:
EventSetup.h:58
InputTag.h
PixelVertexSoAFromCUDA
Definition:
PixelVertexSoAFromCUDA.cc:20
PixelVertexSoAFromCUDA::tokenCUDA_
edm::EDGetTokenT< cms::cuda::Product< ZVertexHeterogeneous > > tokenCUDA_
Definition:
PixelVertexSoAFromCUDA.cc:33
cms::cuda::ScopedContextAcquire
Definition:
ScopedContext.h:101
Product.h
PixelVertexSoAFromCUDA::tokenSOA_
edm::EDPutTokenT< ZVertexHeterogeneous > tokenSOA_
Definition:
PixelVertexSoAFromCUDA.cc:34
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
cms::cuda::host::unique_ptr
std::unique_ptr< T, impl::HostDeleter > unique_ptr
Definition:
host_unique_ptr.h:21
ScopedContext.h
ecalDigis_cff.cuda
cuda
Definition:
ecalDigis_cff.py:35
EventSetup.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
Generated for CMSSW Reference Manual by
1.8.16