ATLAS Offline Software
Loading...
Searching...
No Matches
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 */
11
12
13#ifndef ATHENAKERNEL_ILOCKABLETOOL_H
14#define ATHENAKERNEL_ILOCKABLETOOL_H
15
16
25{
26public:
28 virtual void lock_shared() const = 0;
29
31 virtual void unlock_shared() const = 0;
32};
33
34
35namespace Athena {
36
37
43{
44public:
47 : m_tool (tool)
48 {
49 m_tool.lock_shared();
50 }
51
54 {
55 m_tool.unlock_shared();
56 }
57
58
59private:
61};
62
63
64} // namespace Athena
65
66
67
68#endif // not ATHENAKERNEL_ILOCKABLETOOL_H
ILockableTool & m_tool
ToolLock(ILockableTool &tool)
Acquire the lock of tool.
~ToolLock()
Release the lock.
Provide an interface for locking and unlocking a tool externally.
virtual void lock_shared() const =0
Lock the tool.
virtual void unlock_shared() const =0
Unlock the tool.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....