5#ifndef ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
6#define ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
10#include "GaudiKernel/ToolHandle.h"
23#include <traccc/edm/track_collection.hpp>
40 using AthReentrantAlgorithm::AthReentrantAlgorithm;
49 virtual StatusCode
execute(
const EventContext& ctx)
const override;
59 this,
"InputContainer",
"InDetTrackParticles",
60 "The input track particle container"};
63 this,
"OutputContainer",
"CalibratedInDetTrackParticles",
64 "The output track particle container"};
67 ToolHandle<AthDevice::IMemoryResourcesTool>
m_mrTool{
68 this,
"MemoryResourcesTool",
"",
69 "Tool providing the memory resource(s) to use"};
73 "The host copy tool to use"};
76 this,
"DeviceCopyTool",
"",
"The device copy tool to use"};
79 ToolHandle<AthCUDA::IStreamTool>
m_streamTool{
this,
"StreamTool",
"",
80 "The stream tool to use"};
89 const traccc::edm::track_collection<traccc::default_algebra>::const_view&
91 traccc::edm::track_collection<traccc::default_algebra>::view& output);
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.