ATLAS Offline Software
IConstAuxStore.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 ATHCONTAINERSINTERFACES_ICONSTAUXSTORE_H
14 #define ATHCONTAINERSINTERFACES_ICONSTAUXSTORE_H
15 
16 
18 #include <cstddef>
19 
20 
21 namespace SG {
22 
23 
24 class IAuxTypeVector;
25 
26 
64 {
65 public:
67  virtual ~IConstAuxStore() = default;
68 
69 
80  virtual const void* getData (SG::auxid_t auxid) const = 0;
81 
82 
89  virtual const IAuxTypeVector* getVector (SG::auxid_t auxid) const = 0;
90 
91 
113  virtual void* getDecoration (auxid_t auxid, size_t size, size_t capacity) = 0;
114 
115 
123  virtual const SG::auxid_set_t& getAuxIDs() const = 0;
124 
125 
129  virtual const SG::auxid_set_t& getDecorIDs() const = 0;
130 
131 
136  virtual bool isDecoration (auxid_t auxid) const = 0;
137 
138 
145  virtual void lock() = 0;
146 
147 
158  virtual bool clearDecorations() = 0;
159 
160 
166  virtual size_t size() const = 0;
167 
168 
177  virtual void lockDecoration (SG::auxid_t auxid) = 0;
178 
179 
189  virtual const IAuxTypeVector* linkedVector (SG::auxid_t /*auxid*/) const
190  { return nullptr; }
191 };
192 
193 
194 } // namespace SG
195 
196 
197 
198 #ifndef XAOD_STANDALONE
199 #include "AthenaKernel/CLASS_DEF.h"
200 CLASS_DEF( SG::IConstAuxStore , 187169987 , 1 )
201 #endif // not XAOD_STANDALONE
202 
203 
204 #endif // not ATHCONTAINERSINTERFACES_ICONSTAUXSTORE_H
SG::IConstAuxStore::getData
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
SG::IConstAuxStore::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid)=0
Lock a decoration.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::IConstAuxStore::getVector
virtual const IAuxTypeVector * getVector(SG::auxid_t auxid) const =0
Return vector interface for one aux data item.
SG::IConstAuxStore::size
virtual size_t size() const =0
Return the number of elements in the store.
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::IConstAuxStore::clearDecorations
virtual bool clearDecorations()=0
Clear all decorations.
SG::IConstAuxStore::~IConstAuxStore
virtual ~IConstAuxStore()=default
Destructor.
SG::IConstAuxStore::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data decoration item.
SG::IConstAuxStore::linkedVector
virtual const IAuxTypeVector * linkedVector(SG::auxid_t) const
Return interface for a linked variable.
Definition: IConstAuxStore.h:189
AuxTypes.h
Basic definitions for auxiliary types.
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
SG::IConstAuxStore::getDecorIDs
virtual const SG::auxid_set_t & getDecorIDs() const =0
Return a set of identifiers for decorations in this store.
SG::IConstAuxStore::lock
virtual void lock()=0
Lock the container.
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
SG::IConstAuxStore::isDecoration
virtual bool isDecoration(auxid_t auxid) const =0
Test if a particular variable is tagged as a decoration.
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
CLASS_DEF.h
macros to associate a CLID to a type
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.