ATLAS Offline Software
Classes | Static Public Member Functions | Static Private Attributes | List of all members
SG::CurrentEventStore Class Reference

Hold a pointer to the current event store. More...

#include <CurrentEventStore.h>

Collaboration diagram for SG::CurrentEventStore:

Classes

class  Push
 Temporarily change the current store. More...
 

Static Public Member Functions

static IProxyDictstore ()
 Fetch the current store. More...
 
static IProxyDictstoreOol ()
 Fetch the current store (out-of-line version). More...
 
static IProxyDictsetStore (IProxyDict *store)
 Set the current store. More...
 

Static Private Attributes

static thread_local IProxyDictm_curStore = nullptr
 The current event store. More...
 

Detailed Description

Hold a pointer to the current event store.

Athena has a notion of a ‘current’ event store. This is used, for example, when ElementLinks are initialized without explicitly specifying the store.

Be aware that the current event store is thread-specific and thus fetching it is relatively expensive. It would be better to move calls to store() outside of loops.

Definition at line 36 of file SGTools/SGTools/CurrentEventStore.h.

Member Function Documentation

◆ setStore()

IProxyDict * SG::CurrentEventStore::setStore ( IProxyDict store)
static

Set the current store.

Returns the previous store.

Definition at line 36 of file CurrentEventStore.cxx.

37 {
38  IProxyDict* oldstore = m_curStore;
39  m_curStore = store;
40  return oldstore;
41 }

◆ store()

static IProxyDict* SG::CurrentEventStore::store ( )
static

Fetch the current store.

◆ storeOol()

IProxyDict * SG::CurrentEventStore::storeOol ( )
static

Fetch the current store (out-of-line version).

Definition at line 26 of file CurrentEventStore.cxx.

27 {
28  return m_curStore;
29 }

Member Data Documentation

◆ m_curStore

thread_local IProxyDict * SG::CurrentEventStore::m_curStore = nullptr
staticprivate

The current event store.

Definition at line 70 of file SGTools/SGTools/CurrentEventStore.h.


The documentation for this class was generated from the following files:
SG::CurrentEventStore::store
static IProxyDict * store()
Fetch the current store.
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
SG::CurrentEventStore::m_curStore
static thread_local IProxyDict * m_curStore
The current event store.
Definition: SGTools/SGTools/CurrentEventStore.h:70