Skip to content

Commit d212a5f

Browse files
committed
Remove template parameters from ZVertexHost and ZVertexDevice
1 parent 2aed8d0 commit d212a5f

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

DataFormats/VertexSoA/interface/ZVertexDevice.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@
99
#include "DataFormats/VertexSoA/interface/ZVertexHost.h"
1010
#include "DataFormats/Portable/interface/PortableDeviceCollection.h"
1111

12-
template <int32_t NVTX, int32_t NTRK, typename TDev>
13-
class ZVertexDeviceSoA : public PortableDeviceMultiCollection<TDev, reco::ZVertexSoA, reco::ZVertexTracksSoA> {
12+
template <typename TDev>
13+
class ZVertexDevice : public PortableDeviceMultiCollection<TDev, reco::ZVertexSoA, reco::ZVertexTracksSoA> {
1414
public:
15-
ZVertexDeviceSoA() = default; // necessary for ROOT dictionaries
15+
ZVertexDevice() = default; // necessary for ROOT dictionaries
1616

1717
// Constructor which specifies the queue
1818
template <typename TQueue>
19-
explicit ZVertexDeviceSoA(TQueue queue)
20-
: PortableDeviceMultiCollection<TDev, reco::ZVertexSoA, reco::ZVertexTracksSoA>({{NVTX, NTRK}}, queue) {}
19+
explicit ZVertexDevice(TQueue queue)
20+
: PortableDeviceMultiCollection<TDev, reco::ZVertexSoA, reco::ZVertexTracksSoA>(
21+
{{zVertex::MAXVTX, zVertex::MAXTRACKS}}, queue) {}
2122
};
2223

23-
template <typename TDev>
24-
using ZVertexDevice = ZVertexDeviceSoA<zVertex::MAXVTX, zVertex::MAXTRACKS, TDev>;
25-
2624
#endif // DataFormats_VertexSoA_interface_ZVertexDevice_h

DataFormats/VertexSoA/interface/ZVertexHost.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@
1111
#include "DataFormats/Portable/interface/PortableHostCollection.h"
1212

1313
// This alias is needed to call the SET_PORTABLEHOSTMULTICOLLECTION_READ_RULES macro without commas.
14-
using ZVertexHostSoABase = PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>;
14+
using ZVertexHostBase = PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>;
1515

16-
template <int32_t NVTX, int32_t NTRK>
17-
class ZVertexHostSoA : public ZVertexHostSoABase {
16+
class ZVertexHost : public ZVertexHostBase {
1817
public:
19-
ZVertexHostSoA() = default;
18+
ZVertexHost() = default; // necessary for ROOT dictionaries
2019

2120
// Constructor which specifies the queue
2221
template <typename TQueue>
23-
explicit ZVertexHostSoA(TQueue queue)
24-
: PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>({{NVTX, NTRK}}, queue) {}
22+
explicit ZVertexHost(TQueue queue)
23+
: PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>({{zVertex::MAXVTX, zVertex::MAXTRACKS}},
24+
queue) {}
2525

2626
// Constructor which specifies the DevHost
27-
explicit ZVertexHostSoA(alpaka_common::DevHost const& host)
28-
: PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>({{NVTX, NTRK}}, host) {}
27+
explicit ZVertexHost(alpaka_common::DevHost const& host)
28+
: PortableHostCollection2<reco::ZVertexSoA, reco::ZVertexTracksSoA>({{zVertex::MAXVTX, zVertex::MAXTRACKS}},
29+
host) {}
2930
};
3031

31-
using ZVertexHost = ZVertexHostSoA<zVertex::MAXVTX, zVertex::MAXTRACKS>;
32-
3332
#endif // DataFormats_VertexSoA_ZVertexHost_H

DataFormats/VertexSoA/src/classes.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include "DataFormats/Portable/interface/PortableHostCollectionReadRules.h"
22
#include "DataFormats/VertexSoA/interface/ZVertexHost.h"
33

4-
SET_PORTABLEHOSTMULTICOLLECTION_READ_RULES(ZVertexHostSoABase);
4+
SET_PORTABLEHOSTMULTICOLLECTION_READ_RULES(ZVertexHostBase);

DataFormats/VertexSoA/src/classes_def.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<class name="portablecollection::CollectionLeaf<1, reco::ZVertexTracksLayout<128, false>>"/>
1414

1515
<!-- Collection declaration for dictionary -->
16-
<class name="ZVertexHostSoABase"/>
16+
<class name="ZVertexHostBase"/>
1717
<class name="ZVertexHost"/>
1818
<class name="edm::Wrapper<ZVertexHost>" splitLevel="0"/>
1919
</lcgdict>

0 commit comments

Comments
 (0)