|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef XAODCORE_AUXCONTAINERBASE_H
6 #define XAODCORE_AUXCONTAINERBASE_H
22 #ifndef XAOD_STANDALONE
24 #endif // not XAOD_STANDALONE
34 namespace std {
namespace pmr {
35 class memory_resource;
56 #ifndef XAOD_STANDALONE
58 #endif // not XAOD_STANDALONE
71 bool allowDynamicVars =
true );
119 size_t capacity )
override;
122 virtual void lock()
override;
128 virtual size_t size()
const override;
143 size_t capacity )
override;
153 virtual void shift(
size_t pos, ptrdiff_t offs )
override;
187 const char*
name()
const;
194 template <
class T,
class ALLOC = std::allocator<T> >
196 template <
class T,
class ALLOC = std::allocator<T> >
200 template<
typename T,
typename ALLOC >
202 std::vector< T, ALLOC >& ,
205 const SG::auxid_t linkedVariable = SG::null_auxid );
207 template<
typename T >
212 const SG::auxid_t linkedVariable = SG::null_auxid );
214 template<
typename T,
typename ALLOC >
216 std::vector< T, ALLOC >&
vec );
219 template<
typename T >
224 friend class ::xAODAuxContainerBaseCnv;
227 template<
typename ELT,
typename CONT >
234 std::vector< SG::IAuxTypeVector* >
m_vecs;
247 typedef AthContainers_detail::lock_guard< mutex_t >
guard_t;
265 #include "xAODCore/BaseInfo.h"
272 #endif // XAODCORE_AUXCONTAINERBASE_H
std::string m_name
Name of the container in memory. Set externally.
virtual void lock() override
Lock the container.
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
SG_BASES3(xAOD::AuxContainerBase, SG::IAuxStore, SG::IAuxStoreIO, SG::IAuxStoreHolder)
virtual const std::type_info * getIOType(auxid_t auxid) const override
Return the type of the data to be stored for one aux data item.
const char * name() const
Get the name of the container instance.
Container to hold aux data to be stored in a packed form.
virtual bool clearDecorations() override
Clear all decorations.
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
std::pmr::memory_resource * memResource()
Return the memory resource to use.
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return interface for a linked variable.
AuxContainerBase & operator=(const AuxContainerBase &rhs)
Assignment operator.
AthContainers_detail::lock_guard< mutex_t > guard_t
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
virtual bool setOption(auxid_t id, const SG::AuxDataOption &option) override
Make an option setting on an aux variable.
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Interface to allow an object to lock itself when made const in SG.
Common base class for the auxiliary containers.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
std::vector< size_t > vec
POOL converter for the xAOD::AuxContainerBase class.
virtual AuxStoreType getStoreType() const override
Return the type of the store object.
virtual bool resize(size_t size) override
Resize the arrays to a given size.
~AuxContainerBase()
Destructor.
Cached pointer with atomic update.
Interface providing I/O for a generic auxiliary store.
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
virtual size_t size() const override
Get the size of the container.
AuxStoreType
Type of the auxiliary store.
void regAuxVar1(auxid_t auxid, const std::string &name, CONT &vec)
Common code between regAuxVar cases.
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
size_t auxid_t
Identifier for a particular aux data item.
void regAuxVar(auxid_t auxid, const std::string &name, SG::PackedContainer< T > &vec)
Register one of the persistent variables internally.
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
auxid_set_t m_auxids
Internal list of all available variables.
std::vector< SG::IAuxTypeVector * > m_vecs
Internal list of all managed variables.
void regAuxVar(auxid_t auxid, const std::string &name, std::vector< T, ALLOC > &vec)
Register one of the persistent variables internally.
Interface providing I/O for a generic auxiliary store.
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
Hold information about an option setting request.
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override final
Return vector interface for one aux data item.
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
File providing the different SG_BASE macros.
SG::auxid_t auxid_t
The aux ID type definition.
Interface for non-const operations on an auxiliary store.
CxxUtils::CachedPointer< std::pmr::memory_resource > m_memResource ATLAS_THREAD_SAFE
Memory resource to use for this container.
Container to hold aux data to be stored in a packed form.
AthContainers_detail::mutex mutex_t
Mutex for multithread synchronization.
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
bool m_locked
Has the container been locked?
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Abstract interface for manipulating vectors of arbitrary types.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
Handle mappings between names and auxid_t.
Interface for non-const operations on an auxiliary store.
Interface to allow an object to lock itself when made const in SG.
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
auxid_t getAuxID(const std::string &name, std::vector< T, ALLOC > &, SG::AuxVarFlags flags=SG::AuxVarFlags::None, const SG::auxid_t linkedVariable=SG::null_auxid)
Get the auxiliary ID for one of the persistent variables.
A set of aux data identifiers.
auxid_t getAuxID(const std::string &name, SG::PackedContainer< T > &, SG::AuxVarFlags flags=SG::AuxVarFlags::None, const SG::auxid_t linkedVariable=SG::null_auxid)
Get the auxiliary ID for one of the persistent variables.
void setName(const char *name)
Set the name of the container instance.
Define macros for attributes used to control the static checker.
Interface for objects taking part in direct ROOT I/O.
AuxVariable_t< T, ALLOC > LinkedVariable_t
std::vector< T, ALLOC > AuxVariable_t
Declare how to wrap variables for this sort of base.
@ AST_ContainerStore
The store describes a container.