ATLAS Offline Software
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 
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:
47  : m_tool (tool)
48  {
50  }
51 
54  {
56  }
57 
58 
59 private:
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