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
CondFormats
EcalObjects
src
EcalRecHitParametersGPU.cc
Go to the documentation of this file.
1
#include "
CondFormats/EcalObjects/interface/EcalRecHitParametersGPU.h
"
2
3
#include "
FWCore/Utilities/interface/typelookup.h
"
4
#include "
HeterogeneousCore/CUDAUtilities/interface/copyAsync.h
"
5
#include "
CondFormats/EcalObjects/interface/EcalRechitChannelStatusGPU.h
"
6
#include "
DataFormats/EcalRecHit/interface/EcalRecHit.h
"
7
8
EcalRecHitParametersGPU::EcalRecHitParametersGPU
(std::vector<int>
const
& channelStatusToBeExcluded,
9
std::vector<DBStatus>
const
&
flagsMapDBReco
) {
10
channelStatusToBeExcluded_
.resize(channelStatusToBeExcluded.size());
11
std::copy
(channelStatusToBeExcluded.begin(), channelStatusToBeExcluded.end(),
channelStatusToBeExcluded_
.begin());
12
13
for
(
auto
const
& flagInfo :
flagsMapDBReco
) {
14
EcalRecHit::Flags
recoflagbit = static_cast<EcalRecHit::Flags>(flagInfo.recoflagbit);
15
for
(
auto
v
: flagInfo.dbstatus) {
16
EcalChannelStatusCode::Code
dbstatus = static_cast<EcalChannelStatusCode::Code>(
v
);
17
expanded_v_DB_reco_flags_
.push_back(dbstatus);
18
}
19
20
expanded_Sizes_v_DB_reco_flags_
.push_back(flagInfo.dbstatus.size());
21
expanded_flagbit_v_DB_reco_flags_
.push_back(recoflagbit);
22
}
23
}
24
25
EcalRecHitParametersGPU::Product
const
&
EcalRecHitParametersGPU::getProduct
(cudaStream_t cudaStream)
const
{
26
auto
const
& product =
product_
.dataForCurrentDeviceAsync(
27
cudaStream, [
this
](
EcalRecHitParametersGPU::Product
& product, cudaStream_t cudaStream) {
28
// allocate
29
product.
channelStatusToBeExcluded
=
30
cms::cuda::make_device_unique<int[]>(
channelStatusToBeExcluded_
.size(), cudaStream);
31
product.
expanded_v_DB_reco_flags
=
32
cms::cuda::make_device_unique<int[]>(
expanded_v_DB_reco_flags_
.size(), cudaStream);
33
product.
expanded_Sizes_v_DB_reco_flags
=
34
cms::cuda::make_device_unique<uint32_t[]>(
expanded_Sizes_v_DB_reco_flags_
.size(), cudaStream);
35
product.
expanded_flagbit_v_DB_reco_flags
=
36
cms::cuda::make_device_unique<uint32_t[]>(
expanded_flagbit_v_DB_reco_flags_
.size(), cudaStream);
37
// transfer
38
cms::cuda::copyAsync
(product.
channelStatusToBeExcluded
,
channelStatusToBeExcluded_
, cudaStream);
39
cms::cuda::copyAsync
(product.
expanded_v_DB_reco_flags
,
expanded_v_DB_reco_flags_
, cudaStream);
40
cms::cuda::copyAsync
(product.
expanded_Sizes_v_DB_reco_flags
,
expanded_Sizes_v_DB_reco_flags_
, cudaStream);
41
cms::cuda::copyAsync
(product.
expanded_flagbit_v_DB_reco_flags
,
expanded_flagbit_v_DB_reco_flags_
, cudaStream);
42
});
43
return
product;
44
}
45
46
TYPELOOKUP_DATA_REG
(
EcalRecHitParametersGPU
);
EcalRecHitParametersGPU::channelStatusToBeExcluded_
std::vector< int, cms::cuda::HostAllocator< int > > channelStatusToBeExcluded_
Definition:
EcalRecHitParametersGPU.h:48
EcalRecHitParametersGPU::Product::expanded_flagbit_v_DB_reco_flags
edm::propagate_const_array< cms::cuda::device::unique_ptr< uint32_t[]> > expanded_flagbit_v_DB_reco_flags
Definition:
EcalRecHitParametersGPU.h:20
filterCSVwithJSON.copy
copy
Definition:
filterCSVwithJSON.py:36
EcalRecHitParametersGPU::Product::expanded_Sizes_v_DB_reco_flags
edm::propagate_const_array< cms::cuda::device::unique_ptr< uint32_t[]> > expanded_Sizes_v_DB_reco_flags
Definition:
EcalRecHitParametersGPU.h:19
EcalRecHitParametersGPU::expanded_v_DB_reco_flags_
std::vector< int, cms::cuda::HostAllocator< int > > expanded_v_DB_reco_flags_
Definition:
EcalRecHitParametersGPU.h:49
EcalRecHit::Flags
Flags
Definition:
EcalRecHit.h:20
EcalRecHitParametersGPU
Definition:
EcalRecHitParametersGPU.h:14
EcalRecHitParametersGPU::expanded_Sizes_v_DB_reco_flags_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > expanded_Sizes_v_DB_reco_flags_
Definition:
EcalRecHitParametersGPU.h:50
typelookup.h
EcalRecHitParametersGPU::getProduct
Product const & getProduct(cudaStream_t) const
Definition:
EcalRecHitParametersGPU.cc:25
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
EcalRecHitParametersGPU::product_
cms::cuda::ESProduct< Product > product_
Definition:
EcalRecHitParametersGPU.h:53
EcalRecHitParametersGPU::EcalRecHitParametersGPU
EcalRecHitParametersGPU(std::vector< int > const &channelStatusToBeExcluded, std::vector< DBStatus > const &flagsMapDBReco)
channelStatusToBeExcluded must contain EcalChannelStatusCode::Code
Definition:
EcalRecHitParametersGPU.cc:8
EcalRecHitParametersGPU::Product
Definition:
EcalRecHitParametersGPU.h:16
EcalRecHit.h
HLT_FULL_cff.flagsMapDBReco
flagsMapDBReco
Definition:
HLT_FULL_cff.py:8306
EcalRecHitParametersGPU::expanded_flagbit_v_DB_reco_flags_
std::vector< uint32_t, cms::cuda::HostAllocator< uint32_t > > expanded_flagbit_v_DB_reco_flags_
Definition:
EcalRecHitParametersGPU.h:50
copyAsync.h
EcalRecHitParametersGPU.h
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition:
typelookup.h:102
EcalRecHitParametersGPU::Product::channelStatusToBeExcluded
edm::propagate_const_array< cms::cuda::device::unique_ptr< int[]> > channelStatusToBeExcluded
Definition:
EcalRecHitParametersGPU.h:17
EcalRechitChannelStatusGPU.h
EcalChannelStatusCode::Code
Code
Definition:
EcalChannelStatusCode.h:20
EcalRecHitParametersGPU::Product::expanded_v_DB_reco_flags
edm::propagate_const_array< cms::cuda::device::unique_ptr< int[]> > expanded_v_DB_reco_flags
Definition:
EcalRecHitParametersGPU.h:18
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition:
copyAsync.h:20
Generated for CMSSW Reference Manual by
1.8.16