ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExDevice
src
EventDataCopyExampleAlg.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
#ifndef ATHEXDEVICE_EVENTDATACOPYEXAMPLEALG_H
3
#define ATHEXDEVICE_EVENTDATACOPYEXAMPLEALG_H
4
5
// Framework include(s).
6
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
7
#include "GaudiKernel/ToolHandle.h"
8
#include "
StoreGate/ReadHandleKey.h
"
9
#include "
StoreGate/WriteHandleKey.h
"
10
11
// AthDevice include(s).
12
#include "
AthDeviceInterfaces/ICopiesTool.h
"
13
#include "
AthDeviceInterfaces/IMemoryResourcesTool.h
"
14
15
// Data model include(s).
16
#include "
xAODTracking/TrackParticleContainer.h
"
17
18
// Local include(s).
19
#include "
DeviceObjectCollection.h
"
20
21
namespace
AthExDevice
{
22
24
class
EventDataCopyExampleAlg
:
public
AthReentrantAlgorithm
{
25
26
public
:
27
// Inherit the base class's constructor(s).
28
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
29
32
34
virtual
StatusCode
initialize
()
override
;
35
37
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
38
40
41
private
:
44
46
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_inputKey
{
47
this
,
"InputContainer"
,
"InDetTrackParticles"
,
48
"The input track particle container"
};
49
50
SG::WriteHandleKey<DeviceObjectCollection::buffer>
m_outputKey
{
51
this
,
"OutputContainer"
,
"InDetTrackParticlesCopy"
,
52
"The output track particle container"
};
53
55
ToolHandle<AthDevice::ICopiesTool>
m_copies
{
56
this
,
"CopiesTool"
,
""
,
57
"The copies tool to use for copying data to/from the device"
};
58
59
ToolHandle<AthDevice::IMemoryResourcesTool>
m_mrs
{
60
this
,
"MemoryResourcesTool"
,
""
,
61
"The memory resources tool to use for allocating memory on the device"
};
62
64
65
};
// class EventDataCopyExampleAlg
66
67
}
// namespace AthExDevice
68
69
#endif
// ATHEXDEVICE_EVENTDATACOPYEXAMPLEALG_H
AthReentrantAlgorithm.h
DeviceObjectCollection.h
TrackParticleContainer.h
ICopiesTool.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.
AthExDevice::EventDataCopyExampleAlg
Example for how "device agnostic" event data copies should be done.
Definition
EventDataCopyExampleAlg.h:24
AthExDevice::EventDataCopyExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
EventDataCopyExampleAlg.cxx:26
AthExDevice::EventDataCopyExampleAlg::m_inputKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
Definition
EventDataCopyExampleAlg.h:46
AthExDevice::EventDataCopyExampleAlg::m_mrs
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrs
The memory resources tool to use for allocating memory on the device.
Definition
EventDataCopyExampleAlg.h:59
AthExDevice::EventDataCopyExampleAlg::m_copies
ToolHandle< AthDevice::ICopiesTool > m_copies
The copies tool to use for copying data to/from the device.
Definition
EventDataCopyExampleAlg.h:55
AthExDevice::EventDataCopyExampleAlg::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition
EventDataCopyExampleAlg.cxx:12
AthExDevice::EventDataCopyExampleAlg::m_outputKey
SG::WriteHandleKey< DeviceObjectCollection::buffer > m_outputKey
The output container.
Definition
EventDataCopyExampleAlg.h:50
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
AthExDevice
Definition
DeviceObjectCollection.h:11
Generated on
for ATLAS Offline Software by
1.17.0