ATLAS Offline Software
Loading...
Searching...
No Matches
AthHIP::StreamSvcAdaptorTool Class Reference

Tool exposing a HIP stream service as a HIP stream tool. More...

#include <StreamSvcAdaptorTool.h>

Inheritance diagram for AthHIP::StreamSvcAdaptorTool:
Collaboration diagram for AthHIP::StreamSvcAdaptorTool:

Public Member Functions

Function(s) inherited from @c AthAlgTool
virtual StatusCode initialize () override
 Initialize the tool.
Function(s) inherited from @c IStreamTool
virtual hipStream_t stream (const EventContext &ctx) const override
 Get the HIP stream to use.

Private Attributes

ServiceHandle< IStreamSvcm_svc
 Handle to the service providing the HIP streams.

Detailed Description

Tool exposing a HIP stream service as a HIP stream tool.

Client components should ideally only use HIP streams through the AthHIP::IStreamTool interface. (For possible future flexibility.) But, at least initially, streams will just be provided by a relatively simple service.

This tool allows us to expose such services with a tool interface.

Definition at line 26 of file AthHIP/AthHIPComps/src/StreamSvcAdaptorTool.h.

Member Function Documentation

◆ initialize()

StatusCode AthHIP::StreamSvcAdaptorTool::initialize ( )
overridevirtual

Initialize the tool.

Definition at line 13 of file AthHIP/AthHIPComps/src/StreamSvcAdaptorTool.cxx.

13 {
14
15 // Retrieve the "wrapped" service.
16 ATH_CHECK(m_svc.retrieve());
17
18 // Return gracefully.
19 return StatusCode::SUCCESS;
20}
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< IStreamSvc > m_svc
Handle to the service providing the HIP streams.

◆ stream()

hipStream_t AthHIP::StreamSvcAdaptorTool::stream ( const EventContext & ctx) const
overridevirtual

Get the HIP stream to use.

Parameters
ctxThe event context for which the stream is requested
Returns
The HIP stream to use for the current event context

Definition at line 22 of file AthHIP/AthHIPComps/src/StreamSvcAdaptorTool.cxx.

22 {
23
24 // Just return the stream provided by the service.
25 assert(m_svc.isValid());
26 return m_svc->stream(ctx);
27}

Member Data Documentation

◆ m_svc

ServiceHandle<IStreamSvc> AthHIP::StreamSvcAdaptorTool::m_svc
private
Initial value:
{
this, "StreamSvc", "", "Service providing the 'adapted' HIP streams"}

Handle to the service providing the HIP streams.

Definition at line 54 of file AthHIP/AthHIPComps/src/StreamSvcAdaptorTool.h.

54 {
55 this, "StreamSvc", "", "Service providing the 'adapted' HIP streams"};

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