ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleCalibratorExampleAlg.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
6#define ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
7
8// Framework include(s).
10#include "GaudiKernel/ToolHandle.h"
13
14// Device include(s).
18
19// xAOD include(s).
21
22// Traccc include(s).
23#include <traccc/edm/track_collection.hpp>
24
25namespace AthCUDAExamples {
26
37
38 public:
39 // Inherit the base class's constructor(s).
40 using AthReentrantAlgorithm::AthReentrantAlgorithm;
41
44
46 virtual StatusCode initialize() override;
47
49 virtual StatusCode execute(const EventContext& ctx) const override;
50
52
53 private:
56
59 this, "InputContainer", "InDetTrackParticles",
60 "The input track particle container"};
61
63 this, "OutputContainer", "CalibratedInDetTrackParticles",
64 "The output track particle container"};
65
67 ToolHandle<AthDevice::IMemoryResourceTool> m_hostMR{
68 this, "HostMR", "", "The host memory resource tool to use"};
69
70 ToolHandle<AthDevice::IMemoryResourceTool> m_deviceMR{
71 this, "DeviceMR", "", "The device memory resource tool to use"};
72
74 ToolHandle<AthDevice::ICopyTool> m_hostCopyTool{this, "HostCopyTool", "",
75 "The host copy tool to use"};
76
77 ToolHandle<AthDevice::ICopyTool> m_deviceCopyTool{
78 this, "DeviceCopyTool", "", "The device copy tool to use"};
79
81 ToolHandle<AthCUDA::IStreamTool> m_streamTool{this, "StreamTool", "",
82 "The stream tool to use"};
83
85
86}; // class LinearTransformTaskExampleAlg
87
89StatusCode calibrateOnGPU(
90 cudaStream_t stream,
91 const traccc::edm::track_collection<traccc::default_algebra>::const_view&
92 input,
93 traccc::edm::track_collection<traccc::default_algebra>::view& output);
94
95} // namespace AthCUDAExamples
96
97#endif // ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Example algorithm performing "track particle calibration".
ToolHandle< AthDevice::IMemoryResourceTool > m_deviceMR
Device memory resource tool to use.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
ToolHandle< AthDevice::ICopyTool > m_deviceCopyTool
Device copy tool to use.
ToolHandle< AthDevice::IMemoryResourceTool > m_hostMR
Host memory resource tool to use.
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Stream tool to use.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
ToolHandle< AthDevice::ICopyTool > m_hostCopyTool
Host copy tool to use.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outputKey
The output container.
virtual StatusCode initialize() override
Function initialising the algorithm.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
StatusCode calibrateOnGPU(cudaStream_t stream, const traccc::edm::track_collection< traccc::default_algebra >::const_view &input, traccc::edm::track_collection< traccc::default_algebra >::view &output)
Perform the transformation on an NVIDIA GPU.