#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 66 of file RootAuxDynStore.h.
◆ RootAuxDynStore()
| RootAuxDynStore::RootAuxDynStore |
( |
RootAuxDynReader & | reader, |
|
|
long long | entry, |
|
|
bool | standalone, |
|
|
std::recursive_mutex * | iomtx = nullptr ) |
Definition at line 12 of file RootAuxDynStore.cxx.
17{
18 for(
auto id :
reader.auxIDs() ) {
20 }
22}
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).
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 25 of file RootAuxDynStore.cxx.
26{
27 const SG::IAuxTypeVector*
v =
getVector( auxid );
28 if( v ) {
30 }
31 return nullptr;
32}
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 50 of file RootAuxDynStore.cxx.
51{
52
53 throw("Non-const access to RootAuxDynStore is not supported");
54}
◆ 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 87 of file RootAuxDynStore.cxx.
88{
90 if (SG::AuxStoreInternal::getIODataInternal (auxid, true) == 0 &&
91 SG::AuxStoreInternal::getAuxIDs().
count (auxid) > 0)
92 {
93 throw SG::ExcStoreLocked (auxid);
94 }
95 return SG::AuxStoreInternal::getDecoration (auxid,
size, capacity);
96}
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 57 of file RootAuxDynStore.cxx.
58{
60 const void* ret = SG::AuxStoreInternal::getIODataInternal (auxid, true);
61 if (!ret) {
63 if( this_nc->readData(auxid) ) {
64 ret = SG::AuxStoreInternal::getIOData (auxid);
65 }
66 }
67 return ret;
68}
#define ATLAS_THREAD_SAFE
RootAuxDynStore(RootAuxDynReader &reader, long long entry, bool standalone, std::recursive_mutex *iomtx=nullptr)
◆ getVector()
Definition at line 35 of file RootAuxDynStore.cxx.
36{
38
39 const SG::IAuxTypeVector* ret = SG::AuxStoreInternal::getVector (auxid);
40 if (!ret) {
42 if( this_nc->readData(auxid) ) {
43 ret = SG::AuxStoreInternal::getVector (auxid);
44 }
45 }
46 return ret;
47}
◆ 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 105 of file RootAuxDynStore.cxx.
106{
108 if (SG::AuxStoreInternal::getIODataInternal (auxid, true) == 0 &&
109 SG::AuxStoreInternal::getAuxIDs().
count (auxid) > 0)
110 {
111 return false;
112 }
113 return SG::AuxStoreInternal::isDecoration (auxid);
114}
◆ 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 121 of file RootAuxDynStore.cxx.
122{
123 const std::size_t
s = SG::AuxStoreInternal::size();
124 if( s != 0 ) {
126 }
127
129 if(
getData(
id ) !=
nullptr ) {
130 return SG::AuxStoreInternal::size();
131 }
132 }
133
134 return 0;
135}
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_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: