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::IMemoryResourcesTool> m_mrTool{
68 this, "MemoryResourcesTool", "",
69 "Tool providing the memory resource(s) to use"};
70
72 ToolHandle<AthDevice::ICopyTool> m_hostCopyTool{this, "HostCopyTool", "",
73 "The host copy tool to use"};
74
75 ToolHandle<AthDevice::ICopyTool> m_deviceCopyTool{
76 this, "DeviceCopyTool", "", "The device copy tool to use"};
77
79 ToolHandle<AthCUDA::IStreamTool> m_streamTool{this, "StreamTool", "",
80 "The stream tool to use"};
81
83
84}; // class LinearTransformTaskExampleAlg
85
87StatusCode calibrateOnGPU(
88 cudaStream_t stream,
89 const traccc::edm::track_collection<traccc::default_algebra>::const_view&
90 input,
91 traccc::edm::track_collection<traccc::default_algebra>::view& output);
92
93} // namespace AthCUDAExamples
94
95#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".
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
ToolHandle< AthDevice::ICopyTool > m_deviceCopyTool
Device copy tool to use.
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Stream tool to use.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrTool
Host memory resource tool to use.
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.