ATLAS Offline Software
Loading...
Searching...
No Matches
AuxStoreConstMem.cxx
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 */
11
12
14
15
16namespace SG {
17
18
27
28
40void AuxStoreConstMem::addBuffer (SG::auxid_t auxid, const void* buf)
41{
42 if (m_buffers.size() <= auxid)
43 m_buffers.resize (auxid+1);
44 m_buffers[auxid] = buf;
45 m_auxids.insert (auxid);
46}
47
48
59const void* AuxStoreConstMem::getData (SG::auxid_t auxid) const
60{
61 if (auxid < m_buffers.size()) {
62 return m_buffers[auxid];
63 }
64 return nullptr;
65}
66
67
75{
76 std::abort();
77}
78
79
90void* AuxStoreConstMem::getDecoration (auxid_t /*auxid*/, size_t /*size*/, size_t /*capacity*/)
91{
92 return nullptr;
93}
94
95
104{
105 return m_auxids;
106}
107
108
113{
114 static const auxid_set_t empty;
115 return empty;
116}
117
118
126{
127 return false;
128}
129
130
139{
140}
141
142
149{
150 return false;
151}
152
153
160{
161 return m_size;
162}
163
164
174
175
176} // namespace SG
IConstAuxStore implementation referencing external buffers.
static const Attributes_t empty
virtual bool clearDecorations() override
Clear all decorations.
AuxStoreConstMem(size_t size)
Constructor.
virtual const SG::auxid_set_t & getAuxIDs() const override
Return a set of identifiers for existing data items in this store.
virtual void lock() override
Lock the container.
SG::auxid_set_t m_auxids
Set of auxid's for which we've added a buffer.
virtual const SG::auxid_set_t & getDecorIDs() const override
Return a set of identifiers for decorations in this store.
virtual size_t size() const override
Return the number of elements in the store.
std::vector< const void * > m_buffers
void addBuffer(SG::auxid_t auxid, const void *buf)
Add a new, external buffer.
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual const void * getData(SG::auxid_t auxid) const override
Return the data vector for one aux data item.
virtual const IAuxTypeVector * getVector(SG::auxid_t) const override
Return vector interface for one aux data item.
Abstract interface for manipulating vectors of arbitrary types.
A set of aux data identifiers.
Definition AuxTypes.h:47
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27