File indexing completed on 2024-04-06 12:05:23
0001 #ifndef DataFormats_Track_TracksHost_H
0002 #define DataFormats_Track_TracksHost_H
0003
0004 #include <cstdint>
0005 #include <alpaka/alpaka.hpp>
0006 #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h"
0007 #include "DataFormats/TrackSoA/interface/TracksSoA.h"
0008 #include "DataFormats/TrackSoA/interface/TrackDefinitions.h"
0009 #include "DataFormats/Portable/interface/PortableHostCollection.h"
0010
0011
0012
0013
0014 template <typename TrackerTraits>
0015 class TracksHost : public PortableHostCollection<reco::TrackLayout<TrackerTraits>> {
0016 public:
0017 static constexpr int32_t S = TrackerTraits::maxNumberOfTuples;
0018 TracksHost() = default;
0019
0020 using PortableHostCollection<reco::TrackLayout<TrackerTraits>>::view;
0021 using PortableHostCollection<reco::TrackLayout<TrackerTraits>>::const_view;
0022 using PortableHostCollection<reco::TrackLayout<TrackerTraits>>::buffer;
0023
0024
0025 template <typename TQueue>
0026 explicit TracksHost<TrackerTraits>(TQueue& queue)
0027 : PortableHostCollection<reco::TrackLayout<TrackerTraits>>(S, queue) {}
0028
0029
0030 explicit TracksHost(alpaka_common::DevHost const& host)
0031 : PortableHostCollection<reco::TrackLayout<TrackerTraits>>(S, host) {}
0032 };
0033
0034 namespace pixelTrack {
0035
0036 using TracksHostPhase1 = TracksHost<pixelTopology::Phase1>;
0037 using TracksHostPhase2 = TracksHost<pixelTopology::Phase2>;
0038 using TracksHostHIonPhase1 = TracksHost<pixelTopology::HIonPhase1>;
0039
0040 }
0041
0042 #endif