ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExCUDA
src
AthExCUDA/src/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).
9
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
10
#include "GaudiKernel/ToolHandle.h"
11
#include "
StoreGate/ReadHandleKey.h
"
12
#include "
StoreGate/WriteHandleKey.h
"
13
14
// Device include(s).
15
#include "
AthCUDAInterfaces/IStreamTool.h
"
16
#include "
AthDeviceInterfaces/ICopyTool.h
"
17
#include "
AthDeviceInterfaces/IMemoryResourcesTool.h
"
18
19
// xAOD include(s).
20
#include "
xAODTracking/TrackParticleContainer.h
"
21
22
// Traccc include(s).
23
#include <traccc/edm/track_collection.hpp>
24
25
// CUDA include(s).
26
#include <cuda_runtime_api.h>
27
28
namespace
AthCUDAExamples
{
29
39
class
TrackParticleCalibratorExampleAlg
:
public
AthReentrantAlgorithm
{
40
41
public
:
42
// Inherit the base class's constructor(s).
43
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
44
47
49
virtual
StatusCode
initialize
()
override
;
50
52
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
53
55
56
private
:
59
61
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_inputKey
{
62
this
,
"InputContainer"
,
"InDetTrackParticles"
,
63
"The input track particle container"
};
64
65
SG::WriteHandleKey<xAOD::TrackParticleContainer>
m_outputKey
{
66
this
,
"OutputContainer"
,
"CalibratedInDetTrackParticles"
,
67
"The output track particle container"
};
68
70
ToolHandle<AthDevice::IMemoryResourcesTool>
m_mrTool
{
71
this
,
"MemoryResourcesTool"
,
""
,
72
"Tool providing the memory resource(s) to use"
};
73
75
ToolHandle<AthDevice::ICopyTool>
m_hostCopyTool
{
this
,
"HostCopyTool"
,
""
,
76
"The host copy tool to use"
};
77
78
ToolHandle<AthDevice::ICopyTool>
m_deviceCopyTool
{
79
this
,
"DeviceCopyTool"
,
""
,
"The device copy tool to use"
};
80
82
ToolHandle<AthCUDA::IStreamTool>
m_streamTool
{
this
,
"StreamTool"
,
""
,
83
"The stream tool to use"
};
84
86
87
};
// class LinearTransformTaskExampleAlg
88
90
StatusCode
calibrateOnGPU
(
91
cudaStream_t stream,
92
const
traccc::edm::track_collection<traccc::default_algebra>::const_view&
93
input,
94
traccc::edm::track_collection<traccc::default_algebra>::view& output);
95
96
}
// namespace AthCUDAExamples
97
98
#endif
// ATHEXCUDA_TRACKPARTICLECALIBRATOREXAMPLEALG_H
AthReentrantAlgorithm.h
IStreamTool.h
TrackParticleContainer.h
ICopyTool.h
IMemoryResourcesTool.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthCUDAExamples::TrackParticleCalibratorExampleAlg
Example algorithm performing "track particle calibration".
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:39
AthCUDAExamples::TrackParticleCalibratorExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
TrackParticleCalibratorExampleAlg.cxx:39
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_deviceCopyTool
ToolHandle< AthDevice::ICopyTool > m_deviceCopyTool
Device copy tool to use.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:78
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_streamTool
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Stream tool to use.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:82
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_inputKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:61
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_mrTool
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrTool
Host memory resource tool to use.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:70
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_hostCopyTool
ToolHandle< AthDevice::ICopyTool > m_hostCopyTool
Host copy tool to use.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:75
AthCUDAExamples::TrackParticleCalibratorExampleAlg::m_outputKey
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outputKey
The output container.
Definition
AthExCUDA/src/TrackParticleCalibratorExampleAlg.h:65
AthCUDAExamples::TrackParticleCalibratorExampleAlg::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition
TrackParticleCalibratorExampleAlg.cxx:19
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
AthCUDAExamples
Definition
cudaMultiply.h:11
AthCUDAExamples::calibrateOnGPU
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.
Generated on
for ATLAS Offline Software by
1.17.0