ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KitManagerBase Class Reference

#include <KitManager.h>

Inheritance diagram for KitManagerBase:
Collaboration diagram for KitManagerBase:

Public Member Functions

void dumpKits (std::ostream &out) const
 

Protected Member Functions

 KitManagerBase ()
 
virtual ~KitManagerBase ()
 
const void * kitPtr (const std::string &name) const
 
bool registerKit (const std::string &name, const void *a_kit)
 

Protected Attributes

std::mutex m_mutex
 
std::map< std::string, const void * > m_registry
 

Detailed Description

Definition at line 13 of file KitManager.h.

Constructor & Destructor Documentation

◆ KitManagerBase()

KitManagerBase::KitManagerBase ( )
protecteddefault

◆ ~KitManagerBase()

KitManagerBase::~KitManagerBase ( )
protectedvirtualdefault

Member Function Documentation

◆ dumpKits()

void KitManagerBase::dumpKits ( std::ostream &  out) const

Definition at line 27 of file KitManager.cxx.

27  {
28  std::lock_guard<std::mutex> lock (m_mutex);
29  for(const std::pair<const std::string, const void *> &elm: m_registry) {
30  out << " " << elm.first;
31  }
32 }

◆ kitPtr()

const void * KitManagerBase::kitPtr ( const std::string &  name) const
protected

Definition at line 11 of file KitManager.cxx.

11  {
12  std::lock_guard<std::mutex> lock (m_mutex);
13  return m_registry.at(name);
14 }

◆ registerKit()

bool KitManagerBase::registerKit ( const std::string &  name,
const void *  a_kit 
)
protected

Definition at line 16 of file KitManager.cxx.

16  {
17  std::lock_guard<std::mutex> lock (m_mutex);
18  std::pair<std::string, const void *> elm = std::make_pair(name, a_kit);
19  if (!m_registry.insert(elm).second) {
20  std::stringstream message;
21  message << "Failed to register kit " << elm.first;
22  throw std::runtime_error(message.str());
23  }
24  return true;
25 }

Member Data Documentation

◆ m_mutex

std::mutex KitManagerBase::m_mutex
mutableprotected

Definition at line 23 of file KitManager.h.

◆ m_registry

std::map<std::string, const void * > KitManagerBase::m_registry
protected

Definition at line 24 of file KitManager.h.


The documentation for this class was generated from the following files:
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ReweightUtils.message
message
Definition: ReweightUtils.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
KitManagerBase::m_mutex
std::mutex m_mutex
Definition: KitManager.h:23
KitManagerBase::m_registry
std::map< std::string, const void * > m_registry
Definition: KitManager.h:24