ATLAS Offline Software
Loading...
Searching...
No Matches
AthDevice::CopiesAdaptorTool Class Reference

Tool implementing AthDevice::ICopiesTool using two tools. More...

#include <CopiesAdaptorTool.h>

Inheritance diagram for AthDevice::CopiesAdaptorTool:
Collaboration diagram for AthDevice::CopiesAdaptorTool:

Public Member Functions

Function(s) inherited from @c AthAlgTool
virtual StatusCode initialize () override
 Initialize the tool.
Function(s) inherited from @c ICopiesTool
virtual std::shared_ptr< const vecmem::copy > hostCopy (const EventContext &ctx) const override
 Get the "host" copy object.
virtual std::shared_ptr< const vecmem::copy > deviceCopy (const EventContext &ctx) const override
 Get the "device" copy object.

Private Attributes

ToolHandle< ICopyToolm_hostCopyTool
 Handle to the "host" copy tool.
ToolHandle< ICopyToolm_deviceCopyTool
 Handle to the "device" copy tool.

Detailed Description

Tool implementing AthDevice::ICopiesTool using two tools.

This is the simplest way of implementing the AthDevice::ICopiesTool interface. By making use of two individual AthDevice::ICopyTool tools.

Definition at line 22 of file CopiesAdaptorTool.h.

Member Function Documentation

◆ deviceCopy()

std::shared_ptr< const vecmem::copy > AthDevice::CopiesAdaptorTool::deviceCopy ( const EventContext & ctx) const
overridevirtual

Get the "device" copy object.

Definition at line 26 of file CopiesAdaptorTool.cxx.

27 {
28
29 return m_deviceCopyTool->copy(ctx);
30}
ToolHandle< ICopyTool > m_deviceCopyTool
Handle to the "device" copy tool.

◆ hostCopy()

std::shared_ptr< const vecmem::copy > AthDevice::CopiesAdaptorTool::hostCopy ( const EventContext & ctx) const
overridevirtual

Get the "host" copy object.

Definition at line 20 of file CopiesAdaptorTool.cxx.

21 {
22
23 return m_hostCopyTool->copy(ctx);
24}
ToolHandle< ICopyTool > m_hostCopyTool
Handle to the "host" copy tool.

◆ initialize()

StatusCode AthDevice::CopiesAdaptorTool::initialize ( )
overridevirtual

Initialize the tool.

Definition at line 10 of file CopiesAdaptorTool.cxx.

10 {
11
12 // Retrieve the sub-tool(s).
13 ATH_CHECK(m_hostCopyTool.retrieve());
14 ATH_CHECK(m_deviceCopyTool.retrieve());
15
16 // Return gracefully.
17 return StatusCode::SUCCESS;
18}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_deviceCopyTool

ToolHandle<ICopyTool> AthDevice::CopiesAdaptorTool::m_deviceCopyTool
private
Initial value:
{
this, "DeviceCopyTool", "", "Tool providing the 'device' copy object"}

Handle to the "device" copy tool.

Definition at line 54 of file CopiesAdaptorTool.h.

54 {
55 this, "DeviceCopyTool", "", "Tool providing the 'device' copy object"};

◆ m_hostCopyTool

ToolHandle<ICopyTool> AthDevice::CopiesAdaptorTool::m_hostCopyTool
private
Initial value:
{this, "HostCopyTool", "",
"Tool providing the 'host' copy object"}

Handle to the "host" copy tool.

Definition at line 51 of file CopiesAdaptorTool.h.

51 {this, "HostCopyTool", "",
52 "Tool providing the 'host' copy object"};

The documentation for this class was generated from the following files: