ATLAS Offline Software
AuxStoreConstMem.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef ATHCONTAINERS_AUXSTORECONSTMEM_H
14 #define ATHCONTAINERS_AUXSTORECONSTMEM_H
15 
16 
18 
19 
20 namespace SG {
21 
22 
37  : public IConstAuxStore
38 {
39 public:
44  AuxStoreConstMem (size_t size);
45 
46 
58  void addBuffer (SG::auxid_t auxid, const void* buf);
59 
60 
71  virtual const void* getData (SG::auxid_t auxid) const override;
72 
73 
80  virtual const IAuxTypeVector* getVector (SG::auxid_t /*auxid*/) const override;
81 
82 
93  virtual void* getDecoration (auxid_t auxid, size_t size, size_t capacity) override;
94 
95 
103  virtual const SG::auxid_set_t& getAuxIDs() const override;
104 
105 
109  virtual const SG::auxid_set_t& getDecorIDs() const override;
110 
111 
118  virtual bool isDecoration (auxid_t auxid) const override;
119 
120 
128  virtual void lock() override;
129 
130 
136  virtual bool clearDecorations() override;
137 
138 
144  virtual size_t size() const override;
145 
146 
153  virtual void lockDecoration (SG::auxid_t auxid) override;
154 
155 
156 private:
157  size_t m_size;
158  std::vector<const void*> m_buffers;
159 
162 };
163 
164 
165 } // namespace SG
166 
167 #endif // not ATHCONTAINERS_AUXSTORECONSTMEM_H
SG::AuxStoreConstMem::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
Definition: AuxStoreConstMem.cxx:90
SG::AuxStoreConstMem::m_size
size_t m_size
Definition: AuxStoreConstMem.h:157
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::AuxStoreConstMem::getDecorIDs
virtual const SG::auxid_set_t & getDecorIDs() const override
Return a set of identifiers for decorations in this store.
Definition: AuxStoreConstMem.cxx:112
SG::AuxStoreConstMem::lock
virtual void lock() override
Lock the container.
Definition: AuxStoreConstMem.cxx:138
SG::AuxStoreConstMem::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const override
Return a set of identifiers for existing data items in this store.
Definition: AuxStoreConstMem.cxx:103
SG::AuxStoreConstMem::size
virtual size_t size() const override
Return the number of elements in the store.
Definition: AuxStoreConstMem.cxx:159
SG::AuxStoreConstMem::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
Definition: AuxStoreConstMem.cxx:125
SG::AuxStoreConstMem
IConstAuxStore implementation referencing external buffers.
Definition: AuxStoreConstMem.h:38
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::AuxStoreConstMem::clearDecorations
virtual bool clearDecorations() override
Clear all decorations.
Definition: AuxStoreConstMem.cxx:148
SG::AuxStoreConstMem::addBuffer
void addBuffer(SG::auxid_t auxid, const void *buf)
Add a new, external buffer.
Definition: AuxStoreConstMem.cxx:40
SG::AuxStoreConstMem::getData
virtual const void * getData(SG::auxid_t auxid) const override
Return the data vector for one aux data item.
Definition: AuxStoreConstMem.cxx:59
SG::AuxStoreConstMem::m_auxids
SG::auxid_set_t m_auxids
Set of auxid's for which we've added a buffer.
Definition: AuxStoreConstMem.h:161
SG::AuxStoreConstMem::m_buffers
std::vector< const void * > m_buffers
Definition: AuxStoreConstMem.h:158
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
SG::AuxStoreConstMem::AuxStoreConstMem
AuxStoreConstMem(size_t size)
Constructor.
Definition: AuxStoreConstMem.cxx:23
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
SG::AuxStoreConstMem::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: AuxStoreConstMem.cxx:171
IConstAuxStore.h
Interface for const operations on an auxiliary store.
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SG::AuxStoreConstMem::getVector
virtual const IAuxTypeVector * getVector(SG::auxid_t) const override
Return vector interface for one aux data item.
Definition: AuxStoreConstMem.cxx:74