ATLAS Offline Software
Control
AthenaKernel
AthenaKernel
ILockableTool.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
* Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4
*/
13
#ifndef ATHENAKERNEL_ILOCKABLETOOL_H
14
#define ATHENAKERNEL_ILOCKABLETOOL_H
15
16
24
class
ILockableTool
25
{
26
public
:
28
virtual
void
lock_shared
()
const
= 0;
29
31
virtual
void
unlock_shared
()
const
= 0;
32
};
33
34
35
namespace
Athena
{
36
37
42
class
ToolLock
43
{
44
public
:
46
ToolLock
(
ILockableTool
&
tool
)
47
:
m_tool
(
tool
)
48
{
49
m_tool
.
lock_shared
();
50
}
51
53
~ToolLock
()
54
{
55
m_tool
.
unlock_shared
();
56
}
57
58
59
private
:
60
ILockableTool
&
m_tool
;
61
};
62
63
64
}
// namespace Athena
65
66
67
68
#endif // not ATHENAKERNEL_ILOCKABLETOOL_H
Athena::ToolLock::ToolLock
ToolLock(ILockableTool &tool)
Acquire the lock of tool.
Definition:
ILockableTool.h:46
ILockableTool::lock_shared
virtual void lock_shared() const =0
Lock the tool.
Athena::ToolLock::m_tool
ILockableTool & m_tool
Definition:
ILockableTool.h:60
ILockableTool::unlock_shared
virtual void unlock_shared() const =0
Unlock the tool.
Athena
Some weak symbol referencing magic...
Definition:
AthLegacySequence.h:21
ILockableTool
Provide an interface for locking and unlocking a tool externally.
Definition:
ILockableTool.h:25
Athena::ToolLock
RAII helper for acquiring the lock of an ILockableTool.
Definition:
ILockableTool.h:43
AtlCoolConsole.tool
tool
Definition:
AtlCoolConsole.py:453
Athena::ToolLock::~ToolLock
~ToolLock()
Release the lock.
Definition:
ILockableTool.h:53
Generated on Tue Jul 2 2024 21:17:10 for ATLAS Offline Software by
1.8.18