src
DataFormats
PortableTestObjects
interface
TestSoA.h
Go to the documentation of this file.
1
#ifndef DataFormats_PortableTestObjects_interface_TestSoA_h
2
#define DataFormats_PortableTestObjects_interface_TestSoA_h
3
4
#include <array>
5
6
#include <Eigen/Core>
7
#include <Eigen/Dense>
8
9
#include "
DataFormats/Common/interface/StdArray.h
"
10
#include "
DataFormats/SoATemplate/interface/SoACommon.h
"
11
#include "
DataFormats/SoATemplate/interface/SoALayout.h
"
12
#include "
DataFormats/SoATemplate/interface/SoAView.h
"
13
14
namespace
portabletest
{
15
16
// the type aliases are needed because commas confuse macros
17
using
Array
=
edm::StdArray<short, 4>
;
18
//using Array = std::array<short, 4>;
19
using
Matrix
= Eigen::Matrix<double, 3, 6>;
20
21
// SoA layout with x, y, z, id fields
22
GENERATE_SOA_LAYOUT
(
TestSoALayout
,
23
// columns: one value per element
24
SOA_COLUMN
(
double
, x),
25
SOA_COLUMN
(
double
, y),
26
SOA_COLUMN
(
double
, z),
27
SOA_COLUMN
(int32_t,
id
),
28
// scalars: one value for the whole structure
29
SOA_SCALAR
(
double
, r),
30
// column of arrays: one fixed-size array per element
31
SOA_COLUMN
(
Array
,
flags
),
32
// Eigen columns: each matrix element is stored in a separate column
33
SOA_EIGEN_COLUMN
(
Matrix
,
m
))
34
35
using
TestSoA
=
TestSoALayout<>
;
36
37
GENERATE_SOA_LAYOUT
(
TestSoALayout2
,
38
// columns: one value per element
39
SOA_COLUMN
(
double
, x2),
40
SOA_COLUMN
(
double
,
y2
),
41
SOA_COLUMN
(
double
,
z2
),
42
SOA_COLUMN
(int32_t,
id2
),
43
// scalars: one value for the whole structure
44
SOA_SCALAR
(
double
,
r2
),
45
// Eigen columns
46
// the typedef is needed because commas confuse macros
47
SOA_EIGEN_COLUMN
(
Matrix
,
m2
))
48
49
using
TestSoA2
=
TestSoALayout2<>
;
50
51
GENERATE_SOA_LAYOUT
(
TestSoALayout3
,
52
// columns: one value per element
53
SOA_COLUMN
(
double
, x3),
54
SOA_COLUMN
(
double
, y3),
55
SOA_COLUMN
(
double
, z3),
56
SOA_COLUMN
(int32_t, id3),
57
// scalars: one value for the whole structure
58
SOA_SCALAR
(
double
, r3),
59
// Eigen columns
60
// the typedef is needed because commas confuse macros
61
SOA_EIGEN_COLUMN
(
Matrix
, m3))
62
63
using
TestSoA3
=
TestSoALayout3<>
;
64
65
}
// namespace portabletest
66
67
#endif // DataFormats_PortableTestObjects_interface_TestSoA_h
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition:
testProducerWithPsetDescEmpty_cfi.py:41
portabletest
Definition:
TestHostCollection.h:7
portabletest::Matrix
Eigen::Matrix< double, 3, 6 > Matrix
Definition:
TestSoA.h:19
diffTwoXMLs.r2
r2
Definition:
diffTwoXMLs.py:73
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition:
testProducerWithPsetDescEmpty_cfi.py:30
SoAView.h
StdArray.h
GENERATE_SOA_LAYOUT
#define GENERATE_SOA_LAYOUT(CLASS,...)
Definition:
SoALayout.h:431
portabletest::TestSoALayout
Definition:
TestSoA.h:33
SOA_SCALAR
#define SOA_SCALAR(TYPE, NAME)
Definition:
SoACommon.h:563
HLT_2024v13_cff.flags
flags
Definition:
HLT_2024v13_cff.py:10333
portabletest::TestSoALayout2
Definition:
TestSoA.h:45
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:84
edm::StdArray
Definition:
StdArray.h:39
SoALayout.h
globals_cff.id2
id2
Definition:
globals_cff.py:54
callgraph.m2
m2
Definition:
callgraph.py:57
SOA_EIGEN_COLUMN
#define SOA_EIGEN_COLUMN(TYPE, NAME)
Definition:
SoACommon.h:565
SoACommon.h
SOA_COLUMN
#define SOA_COLUMN(TYPE, NAME)
Definition:
SoACommon.h:564
portabletest::TestSoALayout3
Definition:
TestSoA.h:57
Generated for CMSSW Reference Manual by
1.8.14