#include <RootAuxDynStore.h>
Definition at line 16 of file RootAuxDynStore.h.
◆ guard_t
◆ mutex_t
Mutex used to synchronize modifications to the cache vector.
Definition at line 69 of file RootAuxDynStore.h.
◆ RootAuxDynStore()
| RootAuxDynStore::RootAuxDynStore |
( |
RootAuxDynReader & | reader, |
|
|
long long | entry, |
|
|
bool | standalone, |
|
|
std::recursive_mutex * | iomtx = nullptr ) |
Definition at line 13 of file RootAuxDynStore.cxx.
17 m_ctx (Gaudi::Hive::currentContext()),
19{
20 for(
auto id :
reader.auxIDs() ) {
22 }
24}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
std::recursive_mutex * m_iomutex
Optional mutex used to serialize I/O with RootStorageSvc (not owned).
const EventContext & m_ctx
Event context associated with the event store.
void addAuxID(auxid_t auxid)
Add a new auxid to the set of those being managed by this store.
AuxStoreInternal(bool standalone=false)
An auxiliary data store that holds data internally.
reader
read the goodrunslist xml file(s)
◆ ~RootAuxDynStore()
| virtual RootAuxDynStore::~RootAuxDynStore |
( |
| ) |
|
|
inlinevirtual |
◆ getData() [1/2]
implementation of the IAuxStore interface
Definition at line 27 of file RootAuxDynStore.cxx.
28{
29 const SG::IAuxTypeVector*
v =
getVector( auxid );
30 if( v ) {
32 }
33 return nullptr;
34}
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
◆ getData() [2/2]
| void * RootAuxDynStore::getData |
( |
SG::auxid_t | auxid, |
|
|
size_t | size, |
|
|
size_t | capacity ) |
|
overridevirtual |
Definition at line 52 of file RootAuxDynStore.cxx.
53{
54
55 throw("Non-const access to RootAuxDynStore is not supported");
56}
◆ getDecoration()
| void * RootAuxDynStore::getDecoration |
( |
SG::auxid_t | auxid, |
|
|
size_t | size, |
|
|
size_t | capacity ) |
|
overridevirtual |
Return the data vector for one aux data decoration item.
- Parameters
-
| auxid | The identifier of the desired aux data item. |
| size | The current size of the container (in case the data item does not already exist). |
| capacity | The current capacity of the container (in case the data item does not already exist). |
| auxid | The identifier of the desired aux data item. |
| size | The current size of the container (in case the data item does not already exist). |
| capacity | The current capacity of the container (in case the data item does not already exist). |
Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.
The base class implementation works except for the case where we have not yet created a vector for an item in the root file. We need to detect that case and raise an exception.
Definition at line 89 of file RootAuxDynStore.cxx.
90{
92 if (SG::AuxStoreInternal::getIODataInternal (auxid, true) == 0 &&
93 SG::AuxStoreInternal::getAuxIDs().
count (auxid) > 0)
94 {
95 throw SG::ExcStoreLocked (auxid);
96 }
97 return SG::AuxStoreInternal::getDecoration (auxid,
size, capacity);
98}
AthContainers_detail::lock_guard< mutex_t > guard_t
virtual size_t size() const override
Return the number of elements in the store.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
◆ getIOData()
implementation of the IAuxStoreIO interface
Definition at line 59 of file RootAuxDynStore.cxx.
60{
62 const void* ret = SG::AuxStoreInternal::getIODataInternal (auxid, true);
63 if (!ret) {
65 if( this_nc->readData(auxid) ) {
66 ret = SG::AuxStoreInternal::getIOData (auxid);
67 }
68 }
69 return ret;
70}
#define ATLAS_THREAD_SAFE
RootAuxDynStore(RootAuxDynReader &reader, long long entry, bool standalone, std::recursive_mutex *iomtx=nullptr)
◆ getVector()
Definition at line 37 of file RootAuxDynStore.cxx.
38{
40
41 const SG::IAuxTypeVector* ret = SG::AuxStoreInternal::getVector (auxid);
42 if (!ret) {
44 if( this_nc->readData(auxid) ) {
45 ret = SG::AuxStoreInternal::getVector (auxid);
46 }
47 }
48 return ret;
49}
◆ isDecoration()
| bool RootAuxDynStore::isDecoration |
( |
SG::auxid_t | auxid | ) |
const |
|
overridevirtual |
Test if a particular variable is tagged as a decoration.
- Parameters
-
| auxid | The identifier of the desired aux data item. |
| auxid | The identifier of the desired aux data item. |
See getDecoration() above.
Definition at line 107 of file RootAuxDynStore.cxx.
108{
110 if (SG::AuxStoreInternal::getIODataInternal (auxid, true) == 0 &&
111 SG::AuxStoreInternal::getAuxIDs().
count (auxid) > 0)
112 {
113 return false;
114 }
115 return SG::AuxStoreInternal::isDecoration (auxid);
116}
◆ readData()
| virtual bool RootAuxDynStore::readData |
( |
SG::auxid_t | auxid | ) |
|
|
protectedpure virtual |
◆ size()
| size_t RootAuxDynStore::size |
( |
| ) |
const |
|
overridevirtual |
Return the number of elements in the store.
May return 0 for a store with no aux data.
NOTE: this method will attempt to read data if size unknown (0) May return 0 for a store with no aux data.
Definition at line 123 of file RootAuxDynStore.cxx.
124{
125 const std::size_t
s = SG::AuxStoreInternal::size();
126 if( s != 0 ) {
128 }
129
131 if(
getData(
id ) !=
nullptr ) {
132 return SG::AuxStoreInternal::size();
133 }
134 }
135
136 return 0;
137}
virtual const void * getData(SG::auxid_t auxid) const override
implementation of the IAuxStore interface
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
size_t auxid_t
Identifier for a particular aux data item.
◆ m_ctx
| const EventContext& RootAuxDynStore::m_ctx |
|
protected |
◆ m_entry
| long long RootAuxDynStore::m_entry |
|
protected |
◆ m_iomutex
| std::recursive_mutex* RootAuxDynStore::m_iomutex |
|
protected |
◆ m_mutex
The documentation for this class was generated from the following files: