ATLAS Offline Software
Loading...
Searching...
No Matches
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).
7#include "GaudiKernel/ToolHandle.h"
10
11// AthDevice include(s).
14
15// Data model include(s).
17
18// Local include(s).
20
21namespace AthExDevice {
22
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
47 this, "InputContainer", "InDetTrackParticles",
48 "The input track particle container"};
49
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
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 for how "device agnostic" event data copies should be done.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputKey
The input container.
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrs
The memory resources tool to use for allocating memory on the device.
ToolHandle< AthDevice::ICopiesTool > m_copies
The copies tool to use for copying data to/from the device.
virtual StatusCode initialize() override
Function initialising the algorithm.
SG::WriteHandleKey< DeviceObjectCollection::buffer > m_outputKey
The output container.
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.