ATLAS Offline Software
Loading...
Searching...
No Matches
CondContainer::CondContFactory Class Reference

#include <CondContFactory.h>

Collaboration diagram for CondContainer::CondContFactory:

Public Member Functions

void regMaker (const CLID &clid, ICondContMaker *maker)
SG::DataObjectSharedPtr< DataObject > Create (Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const

Static Public Member Functions

static CondContFactoryInstance ()

Private Member Functions

 CondContFactory ()
 CondContFactory (const CondContFactory &)
CondContFactoryoperator= (const CondContFactory &)

Private Attributes

std::map< CLID, ICondContMaker * > m_makers
std::mutex m_mapMutex

Detailed Description

Definition at line 20 of file CondContFactory.h.

Constructor & Destructor Documentation

◆ CondContFactory() [1/2]

CondContainer::CondContFactory::CondContFactory ( )
inlineprivate

Definition at line 27 of file CondContFactory.h.

27{}

◆ CondContFactory() [2/2]

CondContainer::CondContFactory::CondContFactory ( const CondContFactory & )
private

Member Function Documentation

◆ Create()

SG::DataObjectSharedPtr< DataObject > CondContFactory::Create ( Athena::IRCUSvc & rcusvc,
const CLID & clid,
const std::string & key ) const

Definition at line 28 of file CondContFactory.cxx.

28 {
29 std::lock_guard<std::mutex> guard(m_mapMutex);
30 auto i = m_makers.find(clid);
31 if ( i == m_makers.end()) {
33 }
34 ICondContMaker* maker = i->second;
35 return maker->Create(rcusvc, clid,key);
36}
std::map< CLID, ICondContMaker * > m_makers
virtual SG::DataObjectSharedPtr< DataObject > Create(Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const =0
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr

◆ Instance()

CondContFactory & CondContFactory::Instance ( )
static

Definition at line 14 of file CondContFactory.cxx.

14 {
16 return factory;
17}
#define ATLAS_THREAD_SAFE

◆ operator=()

CondContFactory & CondContainer::CondContFactory::operator= ( const CondContFactory & )
private

◆ regMaker()

void CondContFactory::regMaker ( const CLID & clid,
ICondContMaker * maker )

Definition at line 19 of file CondContFactory.cxx.

19 {
20 std::lock_guard<std::mutex> guard(m_mapMutex);
21 if (m_makers.find(key) != m_makers.end()) {
22 // std::cerr << "multiple makers for CLID " << key << std::endl;
23 } else {
24 m_makers[key] = maker;
25 }
26}

Member Data Documentation

◆ m_makers

std::map<CLID, ICondContMaker*> CondContainer::CondContFactory::m_makers
private

Definition at line 32 of file CondContFactory.h.

◆ m_mapMutex

std::mutex CondContainer::CondContFactory::m_mapMutex
mutableprivate

Definition at line 33 of file CondContFactory.h.


The documentation for this class was generated from the following files: