ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthDevice
AthDeviceComps
src
MonitoredMemoryResourceTool.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
//
4
#ifndef ATHDEVICECOMPS_MONITOREDMEMORYRESOURCETOOL_H
5
#define ATHDEVICECOMPS_MONITOREDMEMORYRESOURCETOOL_H
6
7
// Framework include(s).
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "GaudiKernel/ToolHandle.h"
10
11
// AthDevice include(s).
12
#include "
AthDeviceInterfaces/IMemoryMonitorSvc.h
"
13
#include "
AthDeviceInterfaces/IMemoryResourceTool.h
"
14
15
namespace
AthDevice
{
16
22
class
MonitoredMemoryResourceTool
23
:
public
extends<AthAlgTool, AthDevice::IMemoryResourceTool> {
24
25
public
:
26
// Inherit the base class's constructor(s).
27
using
extends::extends;
28
31
33
virtual
StatusCode
initialize
()
override
;
34
36
39
41
virtual
std::pmr::memory_resource&
mr
()
const override
;
42
44
virtual
std::string_view
deviceName
()
const override
;
45
47
48
private
:
50
std::unique_ptr<std::pmr::memory_resource>
m_mr
;
51
54
56
ToolHandle<IMemoryResourceTool>
m_mrTool
{
57
this
,
"MRTool"
,
""
,
"Memory resource tool to use for allocations"
};
58
60
ServiceHandle<IMemoryMonitorSvc>
m_monitorSvc
{
61
this
,
"MonitorSvc"
,
"AthDevice::MemoryMonitorSvc"
,
62
"Memory monitor service to collect the monitoring information"
};
63
65
66
};
// class MonitoredMemoryResourceTool
67
68
}
// namespace AthDevice
69
70
#endif
// ATHDEVICECOMPS_MONITOREDMEMORYRESOURCETOOL_H
AthAlgTool.h
IMemoryMonitorSvc.h
IMemoryResourceTool.h
AthDevice::MonitoredMemoryResourceTool
Tool providing monitoring functionality for memory resources.
Definition
MonitoredMemoryResourceTool.h:23
AthDevice::MonitoredMemoryResourceTool::m_monitorSvc
ServiceHandle< IMemoryMonitorSvc > m_monitorSvc
Service collecting the memory monitoring information.
Definition
MonitoredMemoryResourceTool.h:60
AthDevice::MonitoredMemoryResourceTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
MonitoredMemoryResourceTool.cxx:12
AthDevice::MonitoredMemoryResourceTool::m_mr
std::unique_ptr< std::pmr::memory_resource > m_mr
The memory resource that this tool uses.
Definition
MonitoredMemoryResourceTool.h:50
AthDevice::MonitoredMemoryResourceTool::m_mrTool
ToolHandle< IMemoryResourceTool > m_mrTool
Underlying memory resource to use for allocations.
Definition
MonitoredMemoryResourceTool.h:56
AthDevice::MonitoredMemoryResourceTool::mr
virtual std::pmr::memory_resource & mr() const override
Get the provided std::pmr::memory_resource object.
Definition
MonitoredMemoryResourceTool.cxx:39
AthDevice::MonitoredMemoryResourceTool::deviceName
virtual std::string_view deviceName() const override
The name of the device for which the memory resource is provided.
Definition
MonitoredMemoryResourceTool.cxx:45
ServiceHandle
Definition
ClusterMakerTool.h:36
AthDevice
Definition
BinaryPageMemoryResourceSvc.cxx:15
Generated on
for ATLAS Offline Software by
1.17.0