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::IMemoryResourceTool>
m_hostMR{
68 this,
"HostMR",
"",
"The host memory resource tool to use"};
71 this,
"DeviceMR",
"",
"The device memory resource tool to use"};
75 "The host copy tool to use"};
78 this,
"DeviceCopyTool",
"",
"The device copy tool to use"};
81 ToolHandle<AthCUDA::IStreamTool>
m_streamTool{
this,
"StreamTool",
"",
82 "The stream tool to use"};
91 const traccc::edm::track_collection<traccc::default_algebra>::const_view&
93 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".
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.