ATLAS Offline Software
RootAuxDynStore.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ROOTAUXDYNSTORE_H
6 #define ROOTAUXDYNSTORE_H
7 
9 
10 #include <string>
11 #include <mutex>
12 
13 namespace RootAuxDynIO { class IRootAuxDynReader; }
14 
16 {
17 public:
19  bool standalone, std::recursive_mutex* iomtx = nullptr);
20 
21  virtual ~RootAuxDynStore() {}
22 
24  virtual const void* getData(SG::auxid_t auxid) const override;
25  virtual const SG::IAuxTypeVector* getVector (SG::auxid_t auxid) const override;
26  virtual void* getData(SG::auxid_t auxid, size_t size, size_t capacity) override;
27 
29  virtual const void* getIOData(SG::auxid_t auxid) const override;
30 
31 
40  virtual void* getDecoration (SG::auxid_t auxid, size_t size, size_t capacity) override;
41 
42 
47  virtual bool isDecoration (SG::auxid_t auxid) const override;
48 
54  virtual size_t size() const override;
55 
56 
57 protected:
59  virtual bool readData(SG::auxid_t auxid) = 0;
60 
61 protected:
62  long long m_entry;
63 
66  typedef AthContainers_detail::lock_guard<mutex_t> guard_t;
67  mutable mutex_t m_mutex;
68 
70  std::recursive_mutex *m_iomutex;
71 };
72 
73 #endif
RootAuxDynStore::isDecoration
virtual bool isDecoration(SG::auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
Definition: RootAuxDynStore.cxx:105
RootAuxDynStore::m_mutex
mutex_t m_mutex
Definition: RootAuxDynStore.h:67
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
SG::AuxStoreInternal::standalone
bool standalone() const
Return the standalone flag.
Definition: AuxStoreInternal.cxx:67
RootAuxDynStore::size
virtual size_t size() const override
Return the number of elements in the store.
Definition: RootAuxDynStore.cxx:121
SG::AuxStoreInternal::mutex_t
AthContainers_detail::mutex mutex_t
Mutex used to synchronize modifications to the cache vector.
Definition: AuxStoreInternal.h:460
RootAuxDynStore::getDecoration
virtual void * getDecoration(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
Definition: RootAuxDynStore.cxx:87
RootAuxDynStore::mutex_t
AthContainers_detail::mutex mutex_t
Mutex used to synchronize modifications to the cache vector.
Definition: RootAuxDynStore.h:65
RootAuxDynStore
Definition: RootAuxDynStore.h:16
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
RootAuxDynStore::m_entry
long long m_entry
Definition: RootAuxDynStore.h:62
RootAuxDynStore::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: RootAuxDynStore.h:66
RootAuxDynStore::~RootAuxDynStore
virtual ~RootAuxDynStore()
Definition: RootAuxDynStore.h:21
RootAuxDynStore::getData
virtual const void * getData(SG::auxid_t auxid) const override
implementation of the IAuxStore interface
Definition: RootAuxDynStore.cxx:25
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
RootAuxDynIO::IRootAuxDynReader
Definition: RootAuxDynIO.h:65
RootAuxDynIO
Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.
Definition: RNTupleContainer.h:26
SG::AuxStoreInternal
An auxiliary data store that holds data internally.
Definition: AuxStoreInternal.h:43
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
RootAuxDynStore::getVector
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
Return vector interface for one aux data item.
Definition: RootAuxDynStore.cxx:35
RootAuxDynStore::readData
virtual bool readData(SG::auxid_t auxid)=0
read data from ROOT and store it in m_vecs. Returns False on error
RootAuxDynStore::getIOData
virtual const void * getIOData(SG::auxid_t auxid) const override
implementation of the IAuxStoreIO interface
Definition: RootAuxDynStore.cxx:57
collisions.reader
reader
read the goodrunslist xml file(s)
Definition: collisions.py:22
RootAuxDynStore::RootAuxDynStore
RootAuxDynStore(RootAuxDynIO::IRootAuxDynReader &reader, long long entry, bool standalone, std::recursive_mutex *iomtx=nullptr)
Definition: RootAuxDynStore.cxx:12
AuxStoreInternal.h
An auxiliary data store that holds data internally.
RootAuxDynStore::m_iomutex
std::recursive_mutex * m_iomutex
Optional mutex used to serialize I/O with RootStorageSvc (not owned)
Definition: RootAuxDynStore.h:70