|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHCONTAINERS_AUXVECTORDATA_H
14 #define ATHCONTAINERS_AUXVECTORDATA_H
22 #include "AthLinks/DataLink.h"
23 #ifndef XAOD_STANDALONE
25 #endif // not XAOD_STANDALONE
165 #ifndef XAOD_STANDALONE
167 #endif // not XAOD_STANDALONE
295 const std::string& clsname,
324 const std::string& optname,
327 const std::string& optname,
330 const std::string& optname,
347 const std::string& clsname,
348 const std::string& optname,
645 #ifndef XAOD_STANDALONE
647 #endif // not XAOD_STANDALONE
649 #ifndef XAOD_STANDALONE
651 #endif // not XAOD_STANDALONE
959 auxid,
bool allowMissing)
const ;
989 typedef AthContainers_detail::lock_guard<mutex_t>
guard_t;
1003 #endif // not ATHCONTAINERS_AUXVECTORDATA_H
const SG::IAuxStore * getStore() const
Return the current store, as a non-const interface.
bool setOption(const std::string &name, const std::string &optname, float arg)
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
bool isAvailableOol(auxid_t id) const
Out-of-line portion of isAvailable.
element_type & reference_type
Reference types returned by aux data accessors.
bool setOption(auxid_t id, const std::string &optname, T arg)
Set an option for an auxiliary data variable.
const void * getDataArray(SG::auxid_t auxid) const
Return a const pointer to the start of an aux data vector.
virtual void lock() override
Lock the container.
const void * getDataArray(SG::auxid_t auxid, const AuxVectorData &parent)
Return a const pointer to the start of an aux data vector.
const AuxDataSpanBase * getDataSpan(SG::auxid_t auxid) const
Return a reference to a description of this vector's start+size.
void * getDataOol(SG::auxid_t auxid, bool allowMissing)
Out-of-line portion of data access.
DataLink< SG::IConstAuxStore > m_constStoreLink
Associated store link, const.
static size_t s_minCacheLen ATLAS_THREAD_SAFE
Minimum length to use for the cache vector.
void clearDecorCache(SG::auxid_t auxid)
Clear the cached decoration pointer for a single variable.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
const SG::auxid_set_t & getWritableAuxIDs() const
Return a set of identifiers for writable data items in this store.
AthContainers_detail::lock_guard< mutex_t > guard_t
Base class for elements of a container that can have aux data.
const element_type & const_reference_type
void * getDecorationOol(SG::auxid_t auxid) const
Out-of-line portion of data access (decorator version).
const AuxDataSpanBase * getDataSpanOol(SG::auxid_t auxid, bool allowMissing) const
Return a reference to a description of this vector's start+size, out-of-line portion.
Interface to allow an object to lock itself when made const in SG.
void ** m_cache[2]
Pointer to the cache vector.
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
Describe a range over an auxiliary variable, for low-overhead access.
AuxVectorData & operator=(AuxVectorData &&rhs)
Move assignment.
void * cachePtr(SG::auxid_t auxid)
Test to see if auxid is valid in the cache.
std::vector< void ** > m_allcache
All cache vectors that have been allocated.
void * getDataArray(SG::auxid_t auxid, AuxVectorData &parent)
Return a pointer to the start of an aux data vector.
const AuxDataSpanBase * getDataSpan(SG::auxid_t auxid, const AuxVectorData &parent)
Return a reference to a description of this vector's start+size.
Manage cache of pointers to aux element vectors.
const SG::IConstAuxStore * getConstStoreOol() const
Same as getConstStore.
Cache()
Cache manager constructor.
void lockDecoration(SG::auxid_t auxid)
Explicitly lock a decoration.
Define likely/unlikely macros for branch prediction.
void swap(AuxVectorData &other)
Swap this instance with another.
bool isAvailableWritableAsDecorationOol(auxid_t id) const
Out-of-line portion of isAvailableWritableAsDecoration.
bool isAvailableWritable(auxid_t id)
Test to see if a variable is available for writing.
Cache m_cache ATLAS_THREAD_SAFE
Cached pointers to the start of aux data vectors, non-const.
void * getDecorationArray(SG::auxid_t auxid) const
Return a pointer to the start of an aux data vector for a decoration.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
Hold information about an option setting request.
bool isAvailable(auxid_t id) const
Test to see if a variable exists in the store.
const SG::IConstAuxStore * m_constStore
Associated store, const.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
void clearCache(SG::auxid_t auxid)
Clear the cached aux data pointers for a single variable.
size_t auxid_t
Identifier for a particular aux data item.
void setNonConstStore(SG::IAuxStore *store)
Set the store associated with this object.
virtual ~AuxVectorData()
Destructor.
static const SG::auxid_set_t s_emptySet
Empty auxid set, used for a return value when we have no associated store.
size_t m_cache_len
Length of the cache vector.
AthContainers_detail::mutex mutex_t
Mutex used to synchronize modifications to the cache vector.
AuxDataTraits< T >::reference_type getData(SG::auxid_t auxid, size_t ndx)
Return reference to an aux data item.
void setCache(SG::auxid_t auxid, void *ptr)
Explicitly set a cache pointer.
Cache & operator=(Cache &&rhs)
Cache manager move assignment.
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
AuxDataTraits< T >::reference_type getDecoration(SG::auxid_t auxid, size_t ndx) const
Return reference to an aux decoration item.
Allow customizing how aux data types are treated.
const void * getDataArrayAllowMissing(SG::auxid_t auxid) const
Return a const pointer to the start of an aux data vector.
bool hasStore() const
Return true if this object has an associated store.
AuxVectorData()
Constructor.
Cache m_constCache ATLAS_THREAD_SAFE
Cached pointers to the start of aux data vectors, const.
Hold information about an option setting request.
Macro to provide hints for optimization.
Minimal span-like object describing the range of an auxiliary variable.
void * getDecorationArray(SG::auxid_t auxid, const AuxVectorData &parent)
Return a pointer to the start of an aux decoration vector.
void clearCache()
Clear the cached aux data pointers.
const void * getDataArrayAllowMissing(SG::auxid_t auxid, const AuxVectorData &parent)
Return a const pointer to the start of an aux data vector.
void clear()
Clear the cache (and free any old cache vectors).
SG::IAuxStore * m_store
Associated store, non-const.
Cache m_decorCache ATLAS_THREAD_SAFE
Cached pointers to the start of aux data vectors, decorations.
Basic definitions for auxiliary types.
Interface for non-const operations on an auxiliary store.
bool clearDecorations() const
Clear all decorations.
Cache m_spanCache ATLAS_THREAD_SAFE
Cached pointers to span descriptors.
void swap(Cache &other)
Swap this cache object with another.
AuxDataTraits< T >::const_reference_type getData(SG::auxid_t auxid, size_t ndx) const
Return const reference to an aux data item.
bool setOption(const std::string &name, const std::string &optname, int arg)
Set an option for an auxiliary data variable.
~Cache()
Cache manager destructor.
void store(SG::auxid_t auxid, void *ptr)
Store a pointer for auxid in the cache.
void * getDataArray(SG::auxid_t auxid)
Return a pointer to the start of an aux data vector.
const DataLink< SG::IConstAuxStore > getConstStoreLink() const
Return the data link to the current store, as a const interface.
Interface to allow an object to lock itself when made const in SG.
bool isAvailableWritableOol(auxid_t id)
Out-of-line portion of isAvailableWritable.
A set of aux data identifiers.
bool isAvailableWritableAsDecoration(auxid_t id) const
Test to see if a variable is available for writing as a decoration.
Manage lookup of vectors of auxiliary data.
bool setOption(const std::string &name, const std::string &clsname, const std::string &optname, T arg)
Set an option for an auxiliary data variable.
AuxVectorData(const AuxVectorData &)
Copy not allowed.
Interface for const operations on an auxiliary store.
Interface for const operations on an auxiliary store.
Define macros for attributes used to control the static checker.
void setCache(SG::auxid_t auxid, const void *ptr)
Explicitly set a cache pointer.
virtual size_t capacity_v() const =0
Return the capacity of the container.
virtual size_t size_v() const =0
Return the size of the container.
bool setOption(auxid_t id, const AuxDataOption &option)
Set an option for an auxiliary data variable.
bool setOption(const std::string &name, const std::string &optname, double arg)