ATLAS Offline Software
Loading...
Searching...
No Matches
SG Namespace Reference

Forward declaration. More...

Namespaces

namespace  ArenaBlockAlignDetail
namespace  detail
namespace  JaggedVecVectorFactoryFuncs
namespace  CondHandleDefault

Classes

struct  DataBucketTrait< CaloConstCellContainer, U >
class  BaseInfo< CaloConstCellContainer >
class  ArenaAllocatorBase
 Common base class for arena allocator classes. More...
class  ArenaAllocatorCreator
 Provide an interface for creating an arena Allocator. More...
class  ArenaAllocatorRegistry
 Registry of allocator factories. More...
class  ArenaBase
 Part of Arena dealing with the list of allocators. More...
class  ArenaBlock
 A large memory block that gets carved into smaller uniform elements. More...
class  ArenaBlockAllocatorBase
 Common functionality for block-oriented allocators. More...
class  ArenaCachingHandle
 User interface for allocating memory that caches constructed objects. More...
class  ArenaHandle
 User interface for allocating memory. More...
class  ArenaHandleBase
 Base class for all Handle classes, containing parts that do not depend on the referenced type. More...
class  ArenaHandleBaseAllocT
 Base class for Handle classes, containing parts that depend only on the Allocator. More...
class  ArenaHandleBaseT
 Base class for Handle classes, containing parts that are independent of how the Allocator gets created. More...
class  ArenaHeader
 Proxy for a group of Arenas. More...
struct  initParams
 Heap-based allocator. More...
class  ArenaHeapSTLAllocator_initParams
 Initializer for pool allocator parameters. More...
class  ArenaHeapSTLAllocator
 STL-style allocator wrapper for ArenaHeapAllocator. More...
class  ArenaNonConstHeapSTLAllocator
 Forward declaration. More...
class  ArenaHeapSTLAllocator< T, T >
 STL-style allocator wrapper for ArenaHeapAllocator. More...
class  ArenaPoolAllocator
 Pool-based allocator. More...
class  ArenaPoolSTLAllocator_initParams
 Initializer for pool allocator parameters. More...
class  ArenaPoolSTLAllocator
 STL-style allocator wrapper for ArenaPoolAllocator. More...
class  ArenaPoolSTLAllocator< T *, VETO >
 STL-style allocator wrapper for ArenaPoolAllocator. More...
class  ArenaNonConstPoolSTLAllocator
 Forward declaration. More...
class  ArenaPoolSTLAllocator< T, typename std::enable_if<!std::is_pointer_v< T >, T >::type >
 STL-style allocator wrapper for ArenaPoolAllocator. More...
class  ArenaSharedHeapSTLAllocator
 Forward declaration. More...
class  ArenaSharedHeapSTLHeader
 Common header class for ArenaSharedHeapSTLAllocator. More...
class  DataPoolNullClear
 Null cleanup functional — does no actual cleanup. More...
class  ExcDifferentArenas
 Exception — Attempt to assign between ArenaSharedHeapSTLAllocators for different arenas. More...
class  ExcProtection
 Exception — Attempt to change memory protection failed. More...
class  ExcProtected
 Exception — Attempt to change protected arena. More...
class  LockedAllocator
 A pointer type that holds a lock on an allocator object. More...
class  ArenaAllocatorRegistryImpl
 ArenaAllocatorRegistry implementation class. More...
class  Accessor
 Helper class to provide type-safe access to aux data. More...
class  ConstAuxElement
 Const part of AuxElement. More...
class  AuxElementComplete
 Wrapper to automatically create a private store for an element. More...
class  AuxStoreConstMem
 IConstAuxStore implementation referencing external buffers. More...
class  AuxStoreStandalone
 Auxiliary data store for standalone objects. More...
class  AuxTypeRegistry
 Handle mappings between names and auxid_t. More...
class  AuxVectorBase
 Manage index tracking and synchronization of auxiliary data. More...
class  AuxVectorData
 Manage lookup of vectors of auxiliary data. More...
class  ConstAccessor
 Helper class to provide constant type-safe access to aux data. More...
class  DVLConstDataVectorBucket
 DataBucket class for ConstDataVector. More...
struct  DataBucketTrait< ConstDataVector< DV >, U >
 Metafunction to find the proper DataBucket class for the first template argument. More...
class  BaseInfo< ConstDataVector< DV > >
 Let the BaseInfo for ConstDataVector forward to that of the base DataVector. More...
struct  DataBucketTrait< DataVector< T >, U >
 Metafunction to find the proper DataBucket class for T. More...
struct  Bases< DataVector< T, DataModel_detail::NoBase > >
 Declare DataVector base class. More...
struct  TopBase< DataVector< T, DataModel_detail::NoBase > >
class  DVLDataVectorWithAllocBucket
 DataBucket class for DataVectorWithAlloc. More...
struct  DataBucketTrait< DataVectorWithAlloc< DV, ALLOC >, U >
 Metafunction to find the proper DataBucket class for the first template argument. More...
class  BaseInfo< DataVectorWithAlloc< DV, ALLOC > >
 Let the BaseInfo for DataVectorWithAlloc forward to that of the base DataVector. More...
class  ExcNoAuxStore
 Exception — Aux data requested from object with no store. More...
class  ExcBadAuxVar
 Exception — Attempt to retrieve nonexistent aux data item. More...
class  ExcConstAuxData
 Exception — Non-const operation performed on const aux data. More...
class  ExcUntrackedSetStore
 Exception — Attempt to set aux data store on container that doesn't track indices, or disable index tracking for a container with aux data. More...
class  ExcBadPrivateStore
 Exception — Bad use of private store. More...
class  ExcAuxTypeMismatch
 Exception — Type mismatch for aux variable. More...
class  ExcInsertionInBaseClass
 Exception — Attempted to do OP on a BASE base class of COMPLETE; can only be done on the most-derived class. More...
class  ExcStoreLocked
 Exception — Attempted to modify auxiliary data in a locked store. More...
class  ExcNonowningContainer
 Exception — Attempted to insert a unique_ptr to a non-owning container. More...
class  ExcUnknownAuxItem
 Exception — Unknown aux data item. More...
class  ExcDVToELV
 Exception — Can't convert DataVector to vector of ElementLinks. More...
class  ExcViewVectorNotView
 Exception — ViewVector not in view mode. More...
class  ExcMissingViewVectorCLID
 Exception — Missing CLID for ViewVector. More...
class  ExcMissingBaseInfo
 Exception — Missing BaseInfo. More...
class  ExcInsertMoveOwnershipMismatch
 Exception — Ownership mismatch for insertMove. More...
class  ExcFlagMismatch
 Exception — Flag mismatch for aux variable. More...
class  ExcLinkMismatch
 Exception — Linked variable mismatch. More...
class  ExcNoLinkedVar
 Exception — Linked variable not found. More...
class  ExcInvalidThinningTarget
 Exception — ThinningHandle target does not exist. More...
class  ExcBadIterSwap
 Exception — Bad iter_swap. More...
class  ExcAllocOwnership
 Exception — Bad allocation ownership. More...
class  ExcBadVarName
 Exception — Bad name for auxiliary variable. More...
class  ExcJaggedVecOverlappingCopy
 Exception — Overlapping copies not implemented for jagged vectors. More...
class  Accessor< JaggedVecElt< PAYLOAD_T >, ALLOC >
 Helper class to provide type-safe access to aux data, specialized for JaggedVecElt. More...
class  ConstAccessor< SG::JaggedVecElt< PAYLOAD_T >, ALLOC >
 Helper class to provide constant type-safe access to aux data, specialized for JaggedVecElt. More...
class  JaggedVecEltBase
 Describe one element of a jagged vector (base class). More...
class  JaggedVecElt
 Describe one element of a jagged vector. More...
class  PackedContainer
 Container to hold aux data to be stored in a packed form. More...
class  PackedConverter
 Helper for packing/unpacking a PackedContainer to/from a stream. More...
 Helper class to provide constant type-safe access to aux data, specialized for PackedLink. More...
 Helper class to provide constant type-safe access to aux data, specialized for a vector of PackedLink. More...
 Helper class to provide constant type-safe access to aux data, specialized for PackedLink. More...
 Helper class to provide constant type-safe access to aux data, specialized for a vector of PackedLink. More...
struct  PackedLinkBase
 A packed version of ElementLink. More...
 A packed version of ElementLink. More...
class  PackedParameters
 Describe how the contents of a PackedContainer are to be saved. More...
class  ThinningDecision
 Hold thinning decisions for one container. More...
class  AtomicConstAccessor
 Access an auxiliary variable atomically. More...
class  AtomicDecorator
 Access an auxiliary variable atomically. More...
class  AuxDataTraits
 Allow customizing how aux data types are treated. More...
class  AuxDataTraits< bool, ALLOC >
 Allow customizing how aux data types are treated. More...
struct  Zero
 Helper to specialize how to make an initialized instance of T. More...
class  AuxTypeVectorHolder
 Implementation of IAuxTypeVector for specific types. More...
class  AuxTypeVectorT
 Implementation of IAuxTypeVector holding a vector instance. More...
class  AuxTypeVectorFactoryImpl
 Factory object that creates vectors using AuxTypeVector. More...
class  AuxTypeVectorFactory
 Factory object that creates vectors using AuxTypeVector. More...
class  AuxVectorInterface
 Make an AuxVectorData object from either a raw array or an aux store. More...
class  DVLDataBucket
 A DataBucket specialized for DataVector/DataList. More...
class  IsMostDerivedFlag
 Holder for the is-most-derived flag. More...
class  JaggedVecVectorHolder
 Implementation of IAuxTypeVector for JaggedVec types. More...
class  JaggedVecVectorT
 Implementation of IAuxTypeVector holding a vector of JaggedVec. More...
class  JaggedVecVectorFactory
 Factory objects that creates vectors for packed links. More...
class  AuxTypeVectorFactory< JaggedVecElt< T >, ALLOC >
 Factory object that creates vectors using AuxTypeVector. More...
class  PackedLinkVectorHolder
 Implementation of IAuxTypeVector for PackedLink types. More...
class  PackedLinkVVectorHolder
 Implementation of IAuxTypeVector for a vector of PackedLink. More...
class  PackedLinkVectorT
 Implementation of IAuxTypeVector holding a vector of PackedLink. More...
class  PackedLinkVectorFactory
 Factory object that creates vectors for packed links. More...
 Factory object that creates vectors for packed links. More...
class  PackedLinkVVectorFactory
 Factory object that creates vectors of vectors of packed links. More...
 Factory object that creates vectors of vectors of packed links. More...
class  TypelessConstAccessor
 Helper class to provide const generic access to aux data. More...
struct  Bases< ViewVector< DV > >
class  ViewVectorBase
 Hold the persistent representation for a ViewVector. More...
class  AuxElementData
 Internal data container. More...
class  AuxElementPrivateData
 Internal data container for private store. More...
class  AuxTypeRegistryImpl
 @Brief Implementation class for AuxTypeRegistry. More...
class  PackedContainerStreamer
 Streamer for reading/writing SG::PackedContainer instances. More...
struct  InstallPackedContainerStreamer
struct  InstallViewVectorBaseStreamer
class  AuxDataOption
 Hold information about an option setting request. More...
struct  AuxDataSpanBase
 Minimal span-like object describing the range of an auxiliary variable. More...
class  NoAuxStore
 Mark that there's no associated AuxStore class. More...
struct  AuxStore_traits_AuxDefault
 Default traits values for aux data case. More...
struct  AuxStore_traits_NoAuxDefault
 Default traits values for no-aux data case. More...
struct  AuxStore_traits1
 Helper for the case where DOBJ::base_value_type does not derive from SG::IAuxElement. More...
struct  AuxStore_traits1< DOBJ, typename std::is_base_of< IAuxElement, typename DOBJ::base_value_type >::type >
 Helper for the case where DOBJ::base_value_type does derive from SG::IAuxElement. More...
struct  AuxStore_traits
 Associate AuxStore classes with EDM container classes (default implementation). More...
struct  AuxStore_traits< DOBJ * >
 Associate AuxStore classes with EDM container classes. More...
class  AuxTypePlaceholder
 Used as type_info when we read an aux data item but it doesn't exist in the registry. More...
class  auxid_set_t
 A set of aux data identifiers. More...
class  IAuxSetOption
 Abstract interface for setting a option on a aux data container. More...
class  IAuxStore
 Interface for non-const operations on an auxiliary store. More...
class  IAuxStoreHolder
 Interface for objects taking part in direct ROOT I/O. More...
class  IAuxStoreIO
 Interface providing I/O for a generic auxiliary store. More...
class  IAuxTypeVector
 Abstract interface for manipulating vectors of arbitrary types. More...
class  IAuxTypeVectorFactory
 Interface for factory objects that create vectors. More...
class  ToTransient
 Define a hook for running code after an object has been read. More...
class  RootAuxVector
 Dynamic implementation of IAuxTypeVector, relying on root vector proxy. More...
class  RootAuxVectorFactory
 Dynamic implementation of IAuxVectorFactory, relying on root's vector proxy. More...
class  VarHandleType
class  VarHandleKeyType
class  VarHandleKeyArrayType
class  NotHandleType
struct  HandleClassifier
 Helper to classify the type of a handle property. More...
struct  IsThreadSafeForUH< int, std::true_type >
struct  BaseType
 Helper metafunction to get base class types. More...
class  BaseInfoImpl
class  CopyConversionBase
 Base class for copy conversions. More...
class  CopyConversion
 Base class for copy conversions, templated on source and destination classes. More...
struct  RegisterAddBaseInit
struct  RegisterAddCopyConversionInit
class  BaseInfoBase
 The non-template portion of the BaseInfo implementation. More...
class  BaseInfo
 Provide an interface for finding inheritance information at run time. More...
struct  Bases< CondCont< T > >
struct  Bases< CondContMixed< T > >
class  DataBucket
struct  DataBucketTrait
 Metafunction to find the proper DataBucket class for T. More...
class  IRegisterTransient
 Interface for registering a transient object in t2p map. More...
class  ReadMetaHandle
struct  DataBucketTrait< MetaCont< T >, U >
 Metafunction to find the proper DataBucket class for T. More...
class  MetaContDataBucket
 Allow converting MetaCont<T> to T. More...
class  SlotSpecificObj
 Maintain a set of objects, one per slot. More...
class  ThinningCache
 Cache thinning decisions for converters. More...
class  ThinningDecisionBase
 Hold thinning decisions for one container. More...
class  ThinningInfo
 Hold thinning/slimming information for a given object. More...
struct  TopBase
 Calculate topmost base accessible via SG_BASES that also has a defined CLID. More...
struct  TopBase< SG::NoBase >
struct  BaseInfoBaseImpl
class  GenericElementLinkBase
 Generic base class for ElementLinks. More...
class  ExcPointerNotInSG
 Exception — The object referenced by a DataLink / ElementLink is not registered in SG. More...
class  ExcCLIDMismatch
 Exception — Attempt to set DataLink / ElementLink with CLID <clid> to object with CLID <clid>. More...
 Exception — Attempt to dereference invalid DataLink / ElementLink ". More...
 Exception — ForwardIndexingPolicy: internal link state is invalid. More...
class  ExcElementNotFound
 Exception — element not found. More...
class  ExcInvalidIndex
 Exception — invalid index. More...
class  ExcIndexNotFound
 Exception — index not found. More...
class  ExcIncomparableEL
 Exception — incomparable ElementLink. More...
class  ExcBadToTransient
 Exception — bad toTransient. More...
class  ExcConstStorable
 Exception – Tried to retrieve const storable as a non-const pointer. More...
class  ExcBadThinning
 Exception – Bad thinning request. More...
class  DataProxyHolder
 Manage DataProxy reference in ElementLink/DataLink. More...
class  ElementLinkTraits1
 ElementLink classes for the generic case. More...
class  ElementLinkTraits1< STORABLE, BASE_VALUE_TYPE *, true >
 ElementLink classes for the case of a vector-like container of pointers. More...
class  ElementLinkTraits
 ElementLinkTraits class to specialize. More...
class  ForwardIndexingPolicy
 Indexing policy for a vector-like container. More...
struct  GenerateIndexingPolicy
class  IdentContIndexingPolicy
 Indexing policy for an IdentifiableContainer. More...
class  IndexHolder
 Store an ElementLink index for non-vector containers. More...
struct  TestSequenceTag
struct  TestSequenceTag< CONTAINER, typename CONTAINER::isSequence >
struct  IsSTLSequence
class  MapIndexingPolicy
 Indexing policy for a map-like container. More...
class  SetIndexingPolicy
 Indexing policy for a set-like container. More...
class  ELVRef
 a short ref to an ElementLink into an ElementLinkVector. More...
class  View
 A "view" of the event store (IProxyDict). More...
class  Folder
 a run-time configurable list of data objects More...
struct  SGKeyHash
 Hash functional for sgkey_t. More...
struct  SGKeyEqual
 Comparison functional for sgkey_t. More...
class  Push
 Hold a pointer to the current event store. More...
class  DataProxy
class  DataStore
 Hold DataProxy instances associated with a store. More...
class  ExcBadDataProxyCast
 Exception — Bad cast of DataProxy with CLID. More...
class  ExcProxyCollision
 Exception — Proxy collision for clid/key. More...
class  ExcSgkeyCollision
 Exception — sgkey hash collision. More...
struct  ptrhash
 Improved hash function for pointers. More...
class  FolderItem
 a Folder item (data object) is identified by the clid/key pair More...
class  IFolder
 a run-time configurable list of data objects More...
class  ObjectWithVersion
 associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retrieval in case the user is interested only in the versionedKey More...
class  VersionedKey
 a StoreGateSvc key with a version number. More...
class  T2pMap
class  TransientAddress
class  StringPoolImpl
struct  RemapImpl
class  SymlinkDataObject
 Helper for symLink_impl. More...
class  CondHandleKey
class  ExcNullHandleKey
 Exception — Attempt to dereference a Read/Write/UpdateHandle with a null key. More...
class  ExcBadHandleKey
 Exception — Bad key format for VarHandleKey. More...
class  ExcForbiddenMethod
 Exception — Forbidden method called. More...
class  ExcHandleInitError
 Exception — Error initializing VarHandle from VarHandleKey. More...
class  ExcUninitKey
 Exception — Tried to create a handle from an uninitialized key. More...
class  ExcConstObject
 Exception — Tried to retrieve non-const pointer to const object. More...
class  ExcNullWriteHandle
 Exception — Attempt to dereference write handle before record. More...
class  ExcNullReadHandle
 Exception — Deference of read handle failed. More...
class  ExcNullUpdateHandle
 Exception — Deference of update handle failed. More...
class  ExcNonConstHandleKey
 Exception — Attempt to get non-const VarHandleKey from non-owning VarHandle. More...
class  ExcInvalidIterator
 Exception — Deference invalid SG::Iterator. More...
class  ExcBadInitializedReadHandleKey
 Exception — Initialization of InitializedReadHandleKey failed. More...
class  ExcBadContext
 Exception — Bad EventContext extension while building ReadCondHandle. More...
class  ExcNoCondCont
 Exception — Can't retrieve CondCont from ReadCondHandle. More...
class  ExcBadReadCondHandleInit
 Exception — ReadCondHandle didn't initialize in getRange(). More...
class  ExcNoRange
 Exception — Range not set in ReadCondHandle::getRange(). More...
class  ExcBadDecorElement
 Exception — DecorHandle given an element not in the requested container. More...
class  HandleKeyArray
class  MetaHandleKey
class  ReadCondHandle
class  ReadCondHandleKey
class  ReadDecorHandle
 Handle class for reading a decoration on an object. More...
class  ReadDecorHandleKey
 Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made. More...
class  ReadHandle
class  ReadHandleKey
 Property holding a SG store/key/clid from which a ReadHandle is made. More...
class  InitializedReadHandleKey
 ReadHandleKey that initializes during construction. More...
class  ReadMetaHandleKey
struct  HiveEventSlot
class  HiveMgrSvc
class  ConstIterator
 a const_iterator facade to DataHandle. More...
class  Iterator
 an iterator facade to DataHandle. More...
class  ShallowCopyDecorDeps
 Helper to propagate decoration dependencies to a shallow copy. More...
class  ThinningHandle
 Handle for requesting thinning for a data object. More...
class  ThinningHandleBase
 Handle for requesting thinning: factor out type-independent code. More...
class  ThinningHandleKey
 HandleKey object for adding thinning to an object. More...
class  TypelessWriteHandle
 Handle allowing writes to the event store with a configurable type. More...
class  TypelessWriteHandleKey
 Property holding a write key for which the type can be configured. More...
struct  IsThreadSafeForUH
struct  IsThreadSafeForUH< T, typename T::thread_safe >
class  UpdateHandle
class  UpdateHandleKey
 Property holding a SG store/key/clid from which an UpdateHandle is made. More...
class  VarHandleBase
 Base class for VarHandle types. More...
class  VarHandleKey
 A property holding a SG store/key/clid from which a VarHandle is made. More...
class  VarHandleKeyArray
class  VarHandleKeyArrayCommon
class  VarHandleKeyArrayProperty
class  VarHandleKeyProperty
 VarHandleKeyProperty is the class which wraps a SG::VarHandleKey. More...
class  WriteCondHandle
class  WriteCondHandleKey
class  WriteDecorHandle
 Handle class for adding a decoration to an object. More...
class  WriteDecorHandleKey
 Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made. More...
class  WriteHandle
class  WriteHandleKey
 Property holding a SG store/key/clid from which a WriteHandle is made. More...
class  PyDataBucket
 Concrete DataBucket that holds the object via a void* and uses the Root dictionary to do conversions. More...
struct  PyProxyMgr
 A helper class to manage accesses to PyProxies. More...
struct  PyProxyDict
 a python front-end to the IProxyDict interface PyProxyDict encapsulates getting python objects from the raw C++ ones ones gets from the C++ store. More...
class  ToTransient< xAOD::ShallowAuxInfo >
struct  Zero< Eigen::Matrix< SCALAR, ROWS, COLS, OPTIONS, MAXROWS, MAXCOLS > >
struct  Bases< TileContainer< T > >

Concepts

concept  IsConstAuxElement
 Test if T is compatible with ConstAuxElement.
concept  IsAuxElement
 Test if T is compatible with AuxElement.
concept  IsAuxDataVector
 Concept for "xAOD style" DataVector interface containers.

Typedefs

typedef void iterator
typedef void const_iterator
using TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
template<class T, class ALLOC = AuxAllocator_t<T>>
using ConstAccessor = SG::ConstAccessor<T, ALLOC>
template<class T, class ALLOC = AuxAllocator_t<T>>
using Accessor = SG::Accessor<T, ALLOC>
template<class T, class ALLOC = AuxAllocator_t<T>>
using Decorator = SG::Decorator<T, ALLOC>
 Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
typedef AthContainers_detail::mutex mutex_t
 Mutex used to synchronize modifications to the cache vector.
typedef AthContainers_detail::lock_guard< mutex_tguard_t
using const_span
 Helper class to provide constant type-safe access to aux data, specialized for a vector of PackedLink.
using elt_span = detail::ELSpanProxy<CONT, VALLOC>
 Presents a vector of PackedLink as a range of ElementLink proxies.
using ELSpanConverter = detail::ELSpanConverter<CONT, VALLOC>
 Transform a span over vector of PackedLink to a span over span over ElementLink proxies.
using span
using element_type = elt_span
 Type the user sees.
using reference_type = elt_span
 Type referencing an item.
using container_pointer_type = void
 Not supported.
using const_container_pointer_type = void
template<class T>
using AuxAllocator_t = std::allocator<T>
 The default allocator type to use for auxiliary variables.
template<class T, class ALLOC = AuxAllocator_t<T>, class CONT = typename AuxDataTraits<T, ALLOC>::vector_type>
using AuxTypeVector = AuxTypeVectorT<AuxTypeVectorHolder<T, CONT> >
 Default type derives directly from AuxTypeVectorHolder.
template<class T, class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using JaggedVecVector = JaggedVecVectorT<JaggedVecVectorHolder<T, ALLOC> >
template<class CONT, class ALLOC = AuxAllocator_t<PackedLink<CONT> >>
using PackedLinkVector = PackedLinkVectorT<PackedLinkVectorHolder<CONT, ALLOC> >
template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using PackedLinkVVector = PackedLinkVectorT<PackedLinkVVectorHolder<CONT, VALLOC, VELT, ALLOC> >
typedef size_t auxid_t
 Identifier for a particular aux data item.
template<CxxUtils::detail::RefCounted T>
using DataObjectSharedPtr = CxxUtils::RefCountedPtr<T>
typedef std::string SourceID
using CompressionInfo = std::unordered_map<std::string, SG::ThinningInfo::compression_map_t>
 Map of compressed variables and their compression levels.
typedef ExcElementNotFound maybe_thinning_error
 Backwards compatibility.
template<class T>
using ConcurrentSGKeyMap
 A concurrent map using sgkey_t as key.
typedef uint32_t sgkey_t
 Type used for hashed StoreGate key+CLID pairs.
template<class T>
using SGKeyMap = std::unordered_map<sgkey_t, T>
 A map using sgkey_t as a key.
using SGKeySet = std::unordered_set<sgkey_t>
 A set of sgkey_t values.
typedef std::map< std::string, DataProxy * > ProxyMap
typedef ProxyMap::iterator ProxyIterator
typedef ProxyMap::const_iterator ConstProxyIterator
typedef IProxyDict ** getDataSourcePointerFunc_t(const std::string &)
template<class T>
using ReadCondHandleKeyArray = HandleKeyArray<ReadCondHandle<T>, CondHandleDefault::Key<ReadCondHandleKey<T> >, Gaudi::DataHandle::Reader >
template<class T>
using WriteCondHandleKeyArray = HandleKeyArray<WriteCondHandle<T>,CondHandleDefault::Key<WriteCondHandleKey<T> >, Gaudi::DataHandle::Writer >
template<class T_Handle, class T_HandleKey, Gaudi::DataHandle::Mode MODE>
using DecorHandleKeyArray = HandleKeyArray< T_Handle, T_HandleKey, MODE>
template<class T, class S = float>
using ReadDecorHandleKeyArray = DecorHandleKeyArray<ReadDecorHandle<T, S>, ReadDecorHandleKey<T>, Gaudi::DataHandle::Reader >
template<class T>
using ReadHandleKeyArray = HandleKeyArray<ReadHandle<T>, ReadHandleKey<T>, Gaudi::DataHandle::Reader >
template<class T>
using WPtr = T*
template<class T>
using ThinningHandleKeyArray = HandleKeyArray<ThinningHandle<T>,ThinningHandleKey<T>, Gaudi::DataHandle::Reader >
template<class T, class S = float>
using WriteDecorHandleKeyArray = DecorHandleKeyArray<WriteDecorHandle<T, S>,WriteDecorHandleKey<T>, Gaudi::DataHandle::Writer >
template<class T>
using WriteHandleKeyArray = HandleKeyArray<WriteHandle<T>,WriteHandleKey<T>, Gaudi::DataHandle::Writer >

Enumerations

enum  IndexTrackingPolicy { DEFAULT_TRACK_INDICES , ALWAYS_TRACK_INDICES , NEVER_TRACK_INDICES }
enum  OwnershipPolicy { OWN_ELEMENTS , VIEW_ELEMENTS }
enum  AuxVarFlags { None = 0x00 , Atomic = 0x01 }
 Additional flags to qualify an auxiliary variable. More...
enum class  PrivateStoreState : uint8_t { NO_PRIVATE = 0 , HAVE_PRIVATE = 1 , HAD_PRIVATE = 2 }
 The current private data state. More...
enum class  InvalidSlot { Enabled , Disabled }
 Support of the invalid EventContext in SlotSpecificObj. More...
enum  AllowEmptyEnum { AllowEmpty = 1 }

Functions

template<>
bool findInContainer (const CaloCellContainer &data, CaloCell const *const &element, CaloCellContainer::size_type &index)
template<>
bool findInContainer (const CaloConstCellContainer &data, CaloCell const *const &element, CaloConstCellContainer::size_type &index)
template<>
bool findInContainer (const CaloCellContainer &data, CaloCell const *const &element, CaloCellContainer::size_type &index)
std::ostream & operator<< (std::ostream &os, const ArenaAllocatorBase::Stats::Stat &stat)
 Format a statistic structure.
std::ostream & operator<< (std::ostream &os, const ArenaAllocatorBase::Stats &stats)
 Format a complete statistics structure.
 ArenaHeapAllocator (const Params &params)
 Constructor.
virtual ~ArenaHeapAllocator ()
 Destructor.
 ArenaHeapAllocator (const ArenaHeapAllocator &)=delete
 Don't allow copy construction or assignment.
ArenaHeapAllocatoroperator= (const ArenaHeapAllocator &)=delete
 ArenaHeapAllocator (ArenaHeapAllocator &&other)
 Move constructor.
ArenaHeapAllocatoroperator= (ArenaHeapAllocator &&other)
 Move assignment.
void swap (ArenaHeapAllocator &other)
 Swap.
pointer allocate ()
 Allocate a new element.
void free (pointer p)
 Free an element.
virtual void reset () override
 Free all allocated elements.
virtual void erase () override final
 Free all allocated elements and release memory back to the system.
void slowClear ()
 Call clear() for all allocated elements.
pointer refill ()
 Add more free elements to the pool, and allocate a new element.
pointer & link (pointer p) const
 Return a reference to the link for an element.
template<class T, class VETO>
void maybeUnprotect (ArenaHeapSTLAllocator< T, VETO > &a)
 Hook for unprotecting an arena.
template<class T, class VETO>
void maybeUnprotect (ArenaPoolSTLAllocator< T, VETO > &a)
 Hook for unprotecting an arena.
template<class T>
void swap (ArenaSharedHeapSTLAllocator< T > &a, ArenaSharedHeapSTLAllocator< T > &b)
template<class T>
void maybeUnprotect (ArenaSharedHeapSTLAllocator< T > &a)
 Hook for unprotecting an arena.
template<class ALLOC>
void maybeUnprotect (ALLOC &)
 Hook for unprotecting an arena.
void null_arena_deleter (ArenaBase *)
ArenaPoolAllocator::pointer ArenaPoolAllocator_iterator_increment (ArenaPoolAllocator::pointer base, ArenaBlock *&block)
 Helper: common code for advancing an iterator.
ArenaPoolAllocator::const_pointer ArenaPoolAllocator_iterator_increment (ArenaPoolAllocator::const_pointer base, const ArenaBlock *&block)
 Helper: common code for advancing an iterator.
std::string excProtection_format (int errnum)
 AuxElement (SG::AuxVectorData *container, size_t index)
 Base class for elements of a container that can have aux data.
 AuxElement (const AuxElement &other)
 Copy Constructor.
AuxElementoperator= (const AuxElement &other)
 Assignment.
void assign (const AuxElement &other, bool warnUnlocked=false)
 Assignment.
 ~AuxElement ()
 Destructor.
const SG::AuxVectorDatacontainer () const
 Return the container holding this element.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name)
 Fetch an aux data variable, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name, const std::string &clsname)
 Fetch an aux data variable, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailable (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for reading.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Check if an aux variable is available for writing.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for writing as a decoration.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name) const
 Fetch an aux decoration, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name, const std::string &clsname) const
 Fetch an aux decoration, as a non-const reference.
void makePrivateStore ()
 Create a new (empty) private store for this object.
template<class U1>
void makePrivateStore (const U1 &other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
template<class U1>
void makePrivateStore (const U1 *other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
void releasePrivateStore ()
 Release and free any private store associated with this object.
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object.
void setStore (SG::IAuxStore *store)
 Set the store associated with this object.
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object.
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore.
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore.
bool usingPrivateStore () const
 Test to see if this object is currently using a private store.
bool usingStandaloneStore () const
 Test to see if this object is currently using a standalone store.
const SG::IConstAuxStore * getConstStore () const
 Return the current store, as a const interface.
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface.
void clearCache ()
 Clear the cached aux data pointers.
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items for this object.
const SG::auxid_set_tgetDecorIDs () const
 Return a set of identifiers for decorations for this object.
bool hasStore () const
 Return true if this object has an associated store.
bool hasNonConstStore () const
 Return true if this object has an associated non-const store.
bool clearDecorations () const
 Clear all decorations.
bool trackIndices () const
 Return true if index tracking is enabled for this object.
void releasePrivateStoreForDtor ()
 Out-of-line portion of destructor.
void setIndex (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element.
bool setIndexPrivate (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element.
void makePrivateStore1 (const void *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data.
void makePrivateStore1 (const AuxElement *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data.
AuxElementStandaloneData * setStore1 (const SG::IConstAuxStore *store)
 Set the store associated with this object.
void clearAux ()
 Clear all aux data associated with this element.
void copyAux (const ConstAuxElement &other, bool warnUnlocked=false)
 Copy aux data from another object.
static void clearAuxHelper (AuxVectorData &container, size_t index)
 Clear all aux data associated with an element.
static void copyAuxHelper (AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
 Copy aux data from another object.
 AuxStoreInternal (bool standalone=false)
 An auxiliary data store that holds data internally.
virtual ~AuxStoreInternal ()
 Destructor.
 AuxStoreInternal (const AuxStoreInternal &orig)
 Copy constructor.
AuxStoreInternaloperator= (const AuxStoreInternal &)=delete
 Don't allow assignment.
bool standalone () const
 Return the standalone flag.
virtual const void * getData (SG::auxid_t auxid) const override
 Return the data vector for one aux data item.
virtual const IAuxTypeVectorgetVector (SG::auxid_t auxid) const override
 Return vector interface for one aux data item.
virtual void * getData (SG::auxid_t auxid, size_t size, size_t capacity) override
 Return the data vector for one aux data item.
virtual void * getDecoration (auxid_t auxid, size_t size, size_t capacity) override
 Return the data vector for one aux data decoration item.
virtual bool resize (size_t sz) override
 Change the size of all aux data vectors.
virtual void reserve (size_t sz) override
 Change the capacity of all aux data vectors.
virtual void shift (size_t pos, ptrdiff_t offs) override
 Shift the elements of the container.
virtual bool insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t(0)) override
 Move all elements from other to this store.
virtual SG::auxid_set_t getCopyIDs (bool warnUnlocked=false) const override
 Return the set of variables to copy in a deep copy.
virtual bool isDecoration (auxid_t auxid) const override
 Test if a particular variable is tagged as a decoration.
virtual const SG::auxid_set_tgetWritableAuxIDs () const override
 Return a set of identifiers for writable data items in this store.
virtual const void * getIOData (SG::auxid_t auxid) const override
 Return a pointer to the data to be stored for one aux data item.
virtual const std::type_info * getIOType (SG::auxid_t auxid) const override
 Return the type of the data to be stored for one aux data item.
virtual const SG::auxid_set_tgetDynamicAuxIDs () const override
 Get the list of all variables that need to be handled.
virtual void lock () override
 Lock the container.
virtual size_t size () const override
 Return the number of elements in the store.
virtual bool setOption (auxid_t id, const AuxDataOption &option) override
 Set an option for an auxiliary data variable.
virtual void lockDecoration (SG::auxid_t auxid) override
 Lock a decoration.
virtual IAuxTypeVectorlinkedVector (SG::auxid_t auxid) override
 Return interface for a linked variable.
void toTransient (const EventContext &ctx, SG::auxid_t auxid)
 Perform post-read processing for a single variable.
virtual void toTransient (const EventContext &ctx) override
 Perform post-read processing on this store.
const void * getIODataInternal (auxid_t auxid, bool quiet) const
 Return a pointer to the data to be stored for one aux data item.
void addAuxID (auxid_t auxid)
 Add a new auxid to the set of those being managed by this store.
virtual void * getDataInternal (SG::auxid_t auxid, size_t size, size_t capacity, bool no_lock_check)
 Return the data vector for one aux data item.
IAuxTypeVectoraddVector (std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
 Explicitly add a vector to the store.
virtual IAuxTypeVectorgetVectorInternal_noLock (SG::auxid_t auxid, size_t size, size_t capacity, bool no_lock_check)
 Implementation of getVectorInternal; no locking.
size_t size_noLock () const
 Return the number of elements in the store; no locking.
SG::auxid_set_t getCopyIDs (const SG::auxid_set_t &auxids, const SG::auxid_set_t &decors, bool warnUnlocked, std::span< const std::string > noWarn)
 Compute the set of variables to copy in a deep copy.
template<class DV>
void dataVectorViewAsELV (const std::true_type &, const DV &v, std::vector< ElementLink< DV > > &ret, IProxyDict *store)
 Helper for dataVectorViewAsELV.
template<class DV>
void dataVectorViewAsELV (const std::false_type &, const DV &, std::vector< ElementLink< DV > > &, IProxyDict *)
 Helper for dataVectorViewAsELV.
template<class DV>
std::vector< ElementLink< DV > > dataVectorAsELV (const DV &v, IProxyDict *store=0)
 Helper to make a vector<EL> from a DataVector.
 Decorator (const std::string &name)
 Helper class to provide type-safe access to aux data.
 Decorator (const std::string &name, const std::string &clsname)
 Constructor.
 Decorator (const SG::auxid_t auxid)
 Constructor taking an auxid directly.
template<IsConstAuxElement ELT>
reference_type operator() (const ELT &e) const
 Fetch the variable for one element, as a non-const reference.
reference_type operator() (const AuxVectorData &container, size_t index) const
 Fetch the variable for one element, as a non-const reference.
template<IsConstAuxElement ELT>
void set (const ELT &e, const element_type &x) const
 Set the variable for one element.
const_container_pointer_type getDataArray (const AuxVectorData &container) const
 Get a pointer to the start of the auxiliary data array.
container_pointer_type getDecorationArray (const AuxVectorData &container) const
 Get a pointer to the start of the auxiliary data array.
const_span getDataSpan (const AuxVectorData &container) const
 Get a span over the auxiliary data array.
span getDecorationSpan (const AuxVectorData &container) const
 Get a span over the auxiliary data array.
template<IsConstAuxElement ELT>
bool isAvailable (const ELT &e) const
 Test to see if this variable exists in the store.
template<IsConstAuxElement ELT>
bool isAvailableWritable (const ELT &e) const
 Test to see if this variable exists in the store and is writable.
bool isAvailable (const AuxVectorData &c) const
 Test to see if this variable exists in the store.
bool isAvailableWritable (const AuxVectorData &c) const
 Test to see if this variable exists in the store and is writable.
SG::auxid_t auxid () const
 Return the aux id for this variable.
 Decorator (const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
 Constructor.
 Decorator (const SG::auxid_t auxid, const SG::AuxVarFlags flags)
 Constructor taking an auxid directly.
void throwExcNonowningContainer ()
 Throw a SG::ExcNonowningContainer exception.
void throwExcUnknownAuxItem (const std::string &name, const std::string &clsname="", const std::type_info *typ=0)
 Throw a SG::ExcUnknownAuxItem exception.
void throwExcViewVectorNotView ()
 Throw a SG::ExcViewVectorNotView exception.
void throwExcMissingViewVectorCLID (const std::type_info &ti)
 Throw a SG::ExcMissingViewVectorCLID exception.
void throwExcMissingBaseInfo (const std::type_info &ti)
 Throw a SG::ExcMissingBaseInfo exception.
void throwExcAllocOwnership ()
 Throw a SG::ExcAllocOwnership exception.
void throwJaggedVecOverlappingCopy ()
 Throw a SG::ExcJaggedVecOverlappingCopy exception.
template<IsConstAuxElement ELT, CxxUtils::InputRangeOverT< PAYLOAD_T > RANGE>
void set (const ELT &e, const RANGE &x) const
 Set the variable for one element.
template<CxxUtils::InputRangeOverT< PAYLOAD_T > RANGE>
void set (const AuxVectorData &container, size_t index, const RANGE &x) const
 Set the variable for one element.
const Elt_t * getEltArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of JaggedVecElt objects.
const Payload_t * getPayloadArray (const AuxVectorData &container) const
 Get a pointer to the start of the payload array.
Elt_t * getEltDecorArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of JaggedVecElt objects, as a decoration.
Payload_t * getPayloadDecorArray (const AuxVectorData &container) const
 Get a pointer to the start of the payload array, as a decoration.
const_Elt_span getEltSpan (const AuxVectorData &container) const
 Get a span over the array of JaggedVecElt objects.
const_Payload_span getPayloadSpan (const AuxVectorData &container) const
 Get a span over the payload vector.
Elt_span getEltDecorSpan (const AuxVectorData &container) const
 Get a span over the array of JaggedVecElt objects, as a decoration.
Payload_span getPayloadDecorSpan (const AuxVectorData &container) const
 Get a span over the payload vector, as a decoration.
std::string normalizedTypeinfoName (const std::type_info &info)
 Convert a type_info to a normalized string representation (matching the names used in the root dictionary).
template<IsConstAuxElement ELT>
ELProxy operator() (const ELT &e) const
 Fetch the variable for one element.
void set (const AuxVectorData &container, size_t index, const Link_t &x) const
 Set the variable for one element.
const PLink_t * getPackedLinkArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of PackedLinks.
const DLink_t * getDataLinkArray (const AuxVectorData &container) const
 Get a pointer to the start of the linked array of DataLinks.
PLink_t * getPackedLinkDecorArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of PackedLinks, as a decoration.
DLink_t * getDataLinkDecorArray (const AuxVectorData &container) const
 Get a pointer to the start of the linked array of DataLinks, as a decoration.
const_PackedLink_span getPackedLinkSpan (const AuxVectorData &container) const
 Get a span over the array of PackedLinks.
const_DataLink_span getDataLinkSpan (const AuxVectorData &container) const
 Get a span over the array of DataLinks.
PackedLink_span getPackedLinkDecorSpan (const AuxVectorData &container) const
 Get a span over the array of PackedLinks, as a decoration.
DataLink_span getDataLinkDecorSpan (const AuxVectorData &container) const
 Get a span over the array of DataLinks, as a decoration.
template<IsConstAuxElement ELT>
elt_span operator() (const ELT &e) const
 Fetch the variable for one element.
template<IsConstAuxElement ELT, detail::ElementLinkRange< CONT > RANGE>
void set (const ELT &e, const RANGE &x) const
 Set the variable for one element.
template<detail::ElementLinkRange< CONT > RANGE>
void set (const AuxVectorData &container, size_t index, const RANGE &r) const
 Set the variable for one element.
const VElt_t * getPackedLinkVectorArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of vectors of PackedLinks.
VElt_t * getPackedLinkVectorDecorArray (const AuxVectorData &container) const
 Get a pointer to the start of the array of vectors of PackedLinks, as a decoration.
template<IsConstAuxElement ELT>
const_PackedLink_span getPackedLinkSpan (const ELT &e) const
 Get a span over the vector of PackedLinks for a given element.
const_PackedLink_span getPackedLinkSpan (const AuxVectorData &container, size_t index) const
 Get a span over the vector of PackedLinks for a given element.
PackedLink_span getPackedLinkSpan (AuxVectorData &container, size_t index) const
 Get a span over the vector of PackedLinks for a given element.
const_PackedLinkVector_span getPackedLinkVectorSpan (const AuxVectorData &container) const
 Get a span over the vectors of PackedLinks.
template<IsConstAuxElement ELT>
PackedLink_span getPackedLinkDecorSpan (const ELT &e) const
 Get a span over the vector of PackedLinks for a given element, as a decoration.
PackedLink_span getPackedLinkDecorSpan (const AuxVectorData &container, size_t index) const
 Get a span over the vector of PackedLinks for a given element, as a decoration.
PackedLinkVector_span getPackedLinkVectorDecorSpan (const AuxVectorData &container) const
 Get a span over the vectors of PackedLinks, as a decoration.
void copyAuxStoreThinned (const SG::IConstAuxStore &orig, SG::IAuxStore &copy, const SG::ThinningInfo *info)
 Helper to copy an aux store while applying thinning.
void lossyFloatCompress (void *dst, const std::size_t dst_index, const std::size_t n, const std::size_t eltSize, const std::string &typeName, const unsigned int nmantissa)
 Helper method to apply lossy float compression.
template<class CONTAINER>
std::unique_ptr< CONTAINER > copyThinned (CONTAINER &orig, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning.
template<class CONTAINER>
std::unique_ptr< const CONTAINER > copyThinnedConst (const CONTAINER &orig, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning, const version.
template<class CONTAINER>
std::unique_ptr< CONTAINER > copyThinned1 (const CONTAINER &orig, const void *dummy, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning.
template<class CONTAINER>
std::unique_ptr< CONTAINER > copyThinned1 (CONTAINER &orig, DataVector< typename CONTAINER::base_value_type > *, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning.
template<class CONTAINER>
std::unique_ptr< const CONTAINER > copyThinned1 (const CONTAINER &orig, const DataVector< typename CONTAINER::base_value_type > *dummy, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning.
template<class CONTAINER>
std::unique_ptr< CONTAINER > copyThinned1 (const CONTAINER &orig, const SG::IAuxStore *dummy, const SG::ThinningInfo *info)
 Helper to copy an object while applying thinning.
template<class T>
bool constexpr xAODInterfaceSupportingThinning ()
 Test for an xAOD interface class supporting thinning.
template<class T, typename std::enable_if_t< is_xAODStoreObject_v< T > > * = nullptr>
bool constexpr xAODStoreSupportingThinning ()
void writePackedParameters (TBuffer &b, const SG::PackedParameters &parms)
 Write a set of packed parameters to a buffer.
SG::PackedParameters readPackedParameters (TBuffer &b)
 Read a set of packed parameters from a buffer.
void ViewVectorBaseStreamerFunc (TBuffer &b, void *p)
std::string excFormatName (SG::auxid_t auxid)
 Helper: format an aux data item name.
std::string excNoAuxStore_format (SG::auxid_t auxid)
 Helper: format exception error string.
std::string excNoAuxStore_format (const char *op)
 Helper: format exception error string.
std::string excBadAuxVar_format (SG::auxid_t auxid)
 Helper: format exception error string.
std::string excConstAuxData_format (const std::string &op, SG::auxid_t auxid)
 Helper: format exception error string.
std::string excAuxTypeMismatch_format (SG::auxid_t auxid, const std::type_info &new_type, const std::type_info &old_type, const std::string &new_alloc_type, const std::string &old_alloc_type)
 Helper: format exception error string.
std::string excInsertionInBaseClass_format (const char *op, const std::type_info &base_type, const std::type_info &complete_type)
 Helper: format exception error string.
std::string excStoreLocked_format (SG::auxid_t auxid)
 Helper: format exception error string.
std::string excStoreLocked_format (const char *op)
 Helper: format exception error string.
std::string excUnknownAuxItem_format (const std::string &name, const std::string &clsname, const std::type_info *typ)
 Helper: format exception error string.
std::string excDVToELV_format (const std::string &detail)
 Helper: format exception error string.
std::string excFormatFlags (SG::AuxVarFlags flags)
 Helper: format flags.
std::string excFlagMismatch_format (SG::auxid_t auxid, const std::type_info &type, SG::AuxVarFlags existing_flags, SG::AuxVarFlags requested_flags)
 Helper: format exception error string.
std::string excLinkMismatch_format (SG::auxid_t auxid, const std::type_info &type, SG::auxid_t existing_linked_id, SG::auxid_t requested_linked_id)
 Helper: format exception error string.
std::string excNoLinkedVar_format (SG::auxid_t auxid, const std::type_info &type)
 Helper: format exception error string.
std::string excInvalidThinningTarget_format (unsigned int clid, const std::string &key)
 Helper: format exception error string.
std::string excBadVarName_format (const std::string &name)
 Helper: format exception error string.
std::string excJaggedVecOverlappingCopy_format ()
 Helper: format exception error string.
void copyAuxStoreThinned NO_SANITIZE_UNDEFINED (const SG::IConstAuxStore &orig, SG::IAuxStore &copy, const SG::ThinningInfo *info)
 Helper to copy an aux store while applying thinning.
 IAuxElement ()
 Flag that a class may have auxiliary data associated with it.
 IAuxElement (size_t index)
 Constructor.
size_t index () const
 Return the index of this element within its container.
bool noPrivateData () const
 True if this element has no private data.
bool havePrivateData () const
 True if this element currently has private data.
bool hadPrivateData () const
 True if this element had private data before it was added to its current container.
void setIndex (size_t index)
 Set the index of this element within its container.
void setNoPrivateData ()
 Record that this element does not have private data.
void setHavePrivateData ()
 Record that this element currently has private data.
void setHadPrivateData ()
 Record that this element used to have private data.
template<class T, class U>
constexpr bool noToTransient1 (U)
template<class T>
constexpr bool noToTransient1 (int, typename T::noToTransient=typename T::noToTransient())
template<class T>
constexpr bool noToTransient ()
 Helper to test if T::noToTransient exists as a typedef.
SG::auxid_t getDynamicAuxID (const std::type_info &ti, const std::string &name, const std::string &elementTypeName, const std::string &branch_type_name, bool standalone, SG::auxid_t linked_auxid)
 Find the auxid for a dynamic branch.
TClass * getClassIfDictionaryExists (const std::string &cname)
 Look up a TClass given a name.
template<typename T>
DataObject * asStorable (SG::DataObjectSharedPtr< T > pObject)
const SG::ThinningCachegetThinningCache (const EventContext &ctx)
 Retrieve the current thinning cache from the event context.
const SG::ThinningCachegetThinningCache ()
 Retrieve the current thinning cache from the current event context.
const SG::ThinningInfogetThinningInfo (const EventContext &ctx, const std::string &key)
 Retrieve the current thinning information for key.
const SG::ThinningInfogetThinningInfo (const std::string &key)
 Retrieve the current thinning information for key.
const SG::ThinningDecisionBasegetThinningDecision (const EventContext &ctx, const std::string &key)
 Retrieve the current thinning decision for key.
const SG::ThinningDecisionBasegetThinningDecision (const std::string &key)
 Retrieve the current thinning decision for key.
const SG::ThinningDecisionBasegetThinningDecision (const EventContext &ctx, const sgkey_t sgkey)
 Retrieve the current thinning decision for sgkey.
const SG::ThinningDecisionBasegetThinningDecision (const sgkey_t sgkey)
 Retrieve the current thinning decision for sgkey.
size_t getNSlots ()
 Return the number of event slots.
void setNSlotsHiveMgrName ATLAS_NOT_THREAD_SAFE (const std::string &s)
 Allow setting the name of the whiteboard service.
template<typename T>
DataObject * asStorable (T *pObject)
template<typename T>
bool fromStorable (DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
template<typename T>
T * Storable_cast (DataObject *pDObj, bool quiet=true, IRegisterTransient *irt=0, bool isConst=true)
void * fromStorable (DataObject *pDObj, CLID clid, const std::type_info *tinfo=nullptr, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
 Try to get the pointer back from a DataObject, converted to be of type clid.
void * Storable_cast (DataObject *pDObj, CLID clid, const std::type_info *tinfo=nullptr, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
 Try to get the pointer back from a DataObject, converted to be of type clid.
template<typename T>
DataObject * asStorable (std::unique_ptr< T > pObject)
template<class T>
constexpr CLID safe_clid ()
 Return the class ID of T, or CLID_NULL if it doesn't have one.
void dumpBaseInfo ()
size_t getNSlots_once ()
 Return the number of event slots.
void throwExcInvalidLink (CLID clid, const std::string &key, SG::sgkey_t sgkey)
 Throw a SG::ExcInvalidLink exception.
void throwExcBadForwardLink (size_t index, size_t size, const std::string &name)
 Throw a SG::ExcBadForwardLink exception.
void throwExcElementNotFound (const char *where)
 Throw a SG::ExcElementNotFound exception.
void throwExcInvalidIndex (const char *where)
 Throw a SG::ExcInvalidIndex exception.
void throwExcIndexNotFound (const char *where)
 Throw a SG::ExcIndexNotFound exception.
void throwExcIncomparableEL ()
 Throw a SG::IncomparableEL exception.
void throwExcBadToTransient ()
 Throw a SG::ExcBadToTransient exception.
void throwExcBadThinning (CLID clid, const std::string &key, SG::sgkey_t sgkey)
 Throw a SG::ExcBadThinning exception.
void setDataProxyHolderInputRenameMap ATLAS_NOT_THREAD_SAFE (const Athena::IInputRename::InputRenameRCU_t *map)
 Set map used for performing input renaming in toTransient.
template<typename CONT, typename ELT>
bool findInContainer (const CONT &data, const ELT &element, typename CONT::size_type &index)
 Find the index of an object within a container.
void AthLinks_error ()
 For setting debugger breakpoints.
std::string excPointerNotInSG_format (const void *pointer)
 Helper: format exception error string.
std::string excCLIDMismatch_format (CLID obj_clid, CLID link_clid)
 Helper: format exception error string.
std::string excInvalidLink_format (CLID clid, const std::string &key, SG::sgkey_t sgkey)
 Helper: format exception error string.
std::string excBadForwardLink_format (size_t index, size_t size, const std::string &name)
 Helper: format exception error string.
std::string excConstStorable_format (CLID clid, const std::string &key, SG::sgkey_t sgkey)
 Helper: format exception error string.
std::string excBadThinning_format (CLID clid, const std::string &key, SG::sgkey_t sgkey)
 Helper: format exception error string.
std::ostream & operator<< (std::ostream &out, const VarHandleBase &o)
 Return the name of the store holding the object we are proxying.
bool operator== (const VarHandleBase &l, const VarHandleBase &r)
 Equality comparison.
bool operator!= (const VarHandleBase &l, const VarHandleBase &r)
 Inequality comparison.
constexpr bool sgkeyEqual (const sgkey_t a, const sgkey_t b)
 Compare two sgkeys for equality.
constexpr bool sgkeyLess (const sgkey_t a, const sgkey_t b)
 Compare two sgkeys for ordering.
constexpr uint32_t sgkeyShort (const sgkey_t k)
 Convert a sgkey to the 32-bit form used for older data.
template<typename DATA>
DATA * DataProxy_cast (DataProxy *proxy)
 cast the proxy into the concrete data object it proxies
template<typename DATA>
DATA DataProxy_cast (const DataProxy &proxy)
 const ref version of the cast.
void * DataProxy_cast (DataProxy *proxy, CLID clid, const std::type_info *tinfo=nullptr)
 Try to get the pointer back from a DataProxy, converted to be of type clid.
void throwExcBadDataProxyCast (const DataProxy &proxy, const std::type_info &tid)
 Throw an ExcBadDataProxyCast exception.
std::ostream & operator<< (std::ostream &ost, const SG::VersionedKey &k)
IOpaqueAddress *TransientAddress::address ATLAS_NOT_CONST_THREAD_SAFE () const
 Retrieve IOpaqueAddress.
std::string excBadDataProxyCast_format (CLID id, const std::type_info &tid)
 Helper: Format exception string.
std::string excProxyCollision_format (CLID id, const std::string &key, CLID primary_id, const std::string &primary_key)
 Helper: Format exception string.
std::string excSgkeyCollision_format (const std::string &new_key, CLID new_clid, const std::string &old_key, CLID old_clid, sgkey_t sgkey)
 Helper: Format exception string.
std::string contKeyFromKey (const std::string &key)
 Extract the container part of key.
std::string decorKeyFromKey (const std::string &key, const std::string &deflt)
 Extract the decoration part of key.
std::string makeContDecorKey (const std::string &cont, const std::string &decor)
 Make a StoreGate key from container and decoration name.
std::string makeContDecorKey (const VarHandleKey &contKey, const std::string &key)
 Make a StoreGate key from container and decoration.
void removeContFromDecorKey (const VarHandleKey &contKey, std::string &key)
 Remove container name from decoration key.
void throwExcNullHandleKey ()
 Throw a SG::ExcNullHandleKey exception.
std::string excHandleInitError_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
std::string excUninitKey_format (CLID clid, const std::string &sgkey, const std::string &storename, const std::string &holdername, const std::string &htype)
 Helper: format exception error string.
std::string excConstObject_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
std::string excNullWriteHandle_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
void throwExcNullWriteHandle (CLID clid, const std::string &sgkey, const std::string &storename)
 Throw a SG::ExcNullWriteHandle exception.
std::string excNullReadHandle_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
void throwExcNullReadHandle (CLID clid, const std::string &sgkey, const std::string &storename)
 Throw a SG::ExcNullReadHandle exception.
std::string excNullUpdateHandle_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
void throwExcNullUpdateHandle (CLID clid, const std::string &sgkey, const std::string &storename)
 Throw a SG::ExcNullUpdateHandle exception.
std::string excNonConstHandleKey_format (CLID clid, const std::string &sgkey, const std::string &storename)
 Helper: format exception error string.
void throwExcNonConstHandleKey (CLID clid, const std::string &sgkey, const std::string &storename)
 Throw a SG::ExcNonConstHandleKey exception.
std::string excBadContext_format (const EventContext &ctx, const std::string &key)
 Helper: format exception error string.
std::string excNoCondCont_format (const std::string &key, const std::string &why)
 Helper: format exception error string.
std::string excBadDecorElement_format (Gaudi::DataHandle::Mode mode, CLID clid, const std::string &decorKey)
 Helper: format exception error string.
void throwExcBadDecorElement (Gaudi::DataHandle::Mode mode, CLID clid, const std::string &decorKey)
 Throw a SG::ExcBadDecorElement exception.
void ReadCondHandleNotFound (const CondContBase &cc, const EventIDBase &eid, const std::string &key)
 Report a conditions container lookup failure.
template<class T>
SG::ReadCondHandle< T > makeHandle (const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
template<class T>
const T * get (const ReadCondHandleKey< T > &key, const EventContext &ctx)
 Convenience function to retrieve an object given a ReadCondHandleKey.
template<class T>
StatusCode get (const T *&ptr, const ReadCondHandleKey< T > &key, const EventContext &ctx)
 Convenience function to retrieve an object given a ReadCondHandleKey.
template<class D, class T>
ReadDecorHandle< T, D > makeHandle (const ReadDecorHandleKey< T > &key)
 Return a ReadDecorHandle referencing key.
template<class D, class T>
ReadDecorHandle< T, D > makeHandle (const ReadDecorHandleKey< T > &key, const EventContext &ctx)
 Return a ReadDecorHandle referencing key for an explicit context.
template<class T>
void makeHandle (const ReadDecorHandleKey< T > &key)
 These two signatures are to catch cases where the explicit template argument is omitted from the makeHandle call and give an error tailored to that.
template<class T>
void makeHandle (const ReadDecorHandleKey< T > &key, const EventContext &ctx)
template<class T>
ReadHandle< T > makeHandle (const ReadHandleKey< T > &key)
 Return a ReadHandle referencing key.
template<class T>
ReadHandle< T > makeHandle (const ReadHandleKey< T > &key, const EventContext &ctx)
 Return a ReadHandle referencing key for an explicit context.
template<class T>
const T * get (const ReadHandleKey< T > &key)
 Convenience function to retrieve an object given a ReadHandleKey.
template<class T>
const T * get (const ReadHandleKey< T > &key, const EventContext &ctx)
 Convenience function to retrieve an object given a ReadHandleKey.
template<class T>
StatusCode get (const T *&ptr, const ReadHandleKey< T > &key, const EventContext &ctx)
 Convenience function to retrieve an object given a ReadHandleKey.
template<class T>
ThinningHandle< T > makeHandle (const ThinningHandleKey< T > &key)
 Return a ThinningHandle referencing key.
template<class T>
ThinningHandle< T > makeHandle (const ThinningHandleKey< T > &key, const EventContext &ctx)
 Return a ThinningHandle referencing key for an explicit context.
int simpleStringHash (const std::string &str, int maxInt=0xFFFF)
 simple hash function derived from Sedgewick Algorithms in C++ 3rd ed
template<class T>
UpdateHandle< T > makeHandle (const UpdateHandleKey< T > &key)
 Return an UpdateHandle referencing key.
template<class T>
UpdateHandle< T > makeHandle (const UpdateHandleKey< T > &key, const EventContext &ctx)
 Return an UpdateHandle referencing key for an explicit context.
template<class T>
SG::WriteCondHandle< T > makeHandle (const SG::WriteCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
template<class D, class T>
WriteDecorHandle< T, D > makeHandle (const WriteDecorHandleKey< T > &key)
 Return a WriteDecorHandle referencing key.
template<class D, class T>
WriteDecorHandle< T, D > makeHandle (const WriteDecorHandleKey< T > &key, const EventContext &ctx)
 Return a WriteDecorHandle referencing key for an explicit context.
template<class T>
void makeHandle (const WriteDecorHandleKey< T > &key)
 These two signatures are to catch cases where the explicit template argument is omitted from the makeHandle call and give an error tailored to that.
template<class T>
void makeHandle (const WriteDecorHandleKey< T > &key, const EventContext &ctx)
template<class T>
WriteHandle< T > makeHandle (const WriteHandleKey< T > &key)
 Return a WriteHandle referencing key.
template<class T>
WriteHandle< T > makeHandle (const WriteHandleKey< T > &key, const EventContext &ctx)
 Return a WriteHandle referencing key for an explicit context.
template<>
void ArenaAllocatorBase::destroy_fcn< HepMC::GenParticle > (ArenaAllocatorBase::pointer p)
template<>
void ArenaAllocatorBase::destroy_fcn< HepMC::GenVertex > (ArenaAllocatorBase::pointer p)
template<>
void ArenaAllocatorBase::destroy_fcn< HepMC::GenEvent > (ArenaAllocatorBase::pointer p)

Variables

static const int ArenaBlockBodyOffset
 The offset from the start of the block to the first element.
pointer m_freeptr
 Pointer to the next free element.
static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations. See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.
bool m_standalone
 Are we being written in standalone mode?
std::vector< std::unique_ptr< IAuxTypeVector > > m_vecs
 The collection of vectors of aux data that we're managing, indexed by auxid.
SG::auxid_set_t m_decorations
 Record which variables are decorations.
SG::auxid_set_t m_auxids
 Set of auxid's for which we've created a vector.
bool m_locked
 Has this container been locked?
mutex_t m_mutex
SG::auxid_t m_auxid
 The cached auxid.
constexpr const char * auxAllocatorNamePrefix = "std::allocator<"
template<class T>
constexpr bool is_xAODStoreObject_v
 Test for an xAOD auxiliary store class supporting thinning.
InstallViewVectorBaseStreamer viewVectorBaseStreamerInstance
static const auxid_t null_auxid = static_cast<auxid_t> (-1)
 To signal no aux data item.
static const auxid_t auxid_set_size_hint = 2048
 A hint for how large we should make the auxid bitsets.
size_t m_index
 The index of this element within its container. Should be 0 if this object is not within a container.
PrivateStoreState m_privateStoreState
const std::string DEFAULTKEY = ""
static constexpr auto s_sgkey_nullval
static IProxyDictm_curStore = nullptr
 The current event store.
getDataSourcePointerFunc_tgetDataSourcePointerFunc
static constexpr bool defaultQuiet = false

Detailed Description

Forward declaration.

Namespace used by StoreGate for some of its internal structures/classes.

Typedef Documentation

◆ Accessor

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::Accessor = SG::Accessor<T, ALLOC>

Definition at line 573 of file AuxElement.h.

◆ AuxAllocator_t

template<class T>
using SG::AuxAllocator_t = std::allocator<T>

The default allocator type to use for auxiliary variables.

Definition at line 28 of file AuxDataTraits.h.

◆ auxid_t

typedef size_t SG::auxid_t

Identifier for a particular aux data item.

Definition at line 27 of file AuxTypes.h.

◆ AuxTypeVector

template<class T, class ALLOC = AuxAllocator_t<T>, class CONT = typename AuxDataTraits<T, ALLOC>::vector_type>
using SG::AuxTypeVector = AuxTypeVectorT<AuxTypeVectorHolder<T, CONT> >

Default type derives directly from AuxTypeVectorHolder.

Definition at line 389 of file AuxTypeVector.h.

◆ CompressionInfo

using SG::CompressionInfo = std::unordered_map<std::string, SG::ThinningInfo::compression_map_t>

Map of compressed variables and their compression levels.

Definition at line 37 of file CompressionInfo.h.

◆ ConcurrentSGKeyMap

template<class T>
using SG::ConcurrentSGKeyMap
Initial value:
sgkey_t, T,
Simple (non-deleting) Updater implementation.
ConcurrentMap(Updater_t &&updater, size_type capacity=64, const Context_t &ctx=Updater_t::defaultContext())
Hash map from integers/pointers allowing concurrent, lockless reads.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32
static constexpr auto s_sgkey_nullval
Comparison functional for sgkey_t.
Definition sgkey_t.h:72
Hash functional for sgkey_t.
Definition sgkey_t.h:59

A concurrent map using sgkey_t as key.

Definition at line 29 of file sgkey_utilities.h.

◆ const_container_pointer_type

using SG::const_container_pointer_type = void
protected

Definition at line 441 of file PackedLinkDecorator.h.

◆ const_iterator

typedef void SG::const_iterator

Definition at line 190 of file ArenaHeapAllocator.h.

◆ const_span

using SG::const_span
protected
Initial value:
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.

Helper class to provide constant type-safe access to aux data, specialized for a vector of PackedLink.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

Although the type argument is PackedLink<CONT>, the objects that this accessor produces are ElementLink<CONT> (returned by value rather than by const reference). The getDataSpan method will then produce a (writable) span over ElementLink<CONT>. (There are separate methods for returning spans over the PackedLink/DataLink arrays themselves.)

You might use this something like this:

// Only need to do this once.
using Cont_t = std::vector<int>;
static const SG::Decorator<std::vector<SG::PackedLink<Cont_t> > links ("links");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
links (*m).push_back (ElementLink<Cont_t> (...));
auto span = links.getDataSpan (*v);
span[2][1] = ElementLink<Cont_t> (...);
Derived DataVector<T>.
Definition DataVector.h:795
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
CxxUtils::transform_view_with_at< PackedLinkVector_span, ELSpanConverter > span

You can also use this to define getters/setters in your class:

*

class Myclass {
...
auto get_links() const
{ const static ConstAccessor<SG::PackedLink<Cont_t> > acc ("links");
return acc (*this); }
void set_links (const std::vector<ElementLink<Cont_t> >& elv)
{ const static Accessor<std::vector<SG::PackedLink<Cont_t> > > acc ("links");
acc (*this) = elv; }
Helper class to provide constant type-safe access to aux data.

*/ template <class CONT, class ALLOC, class VALLOC> class Decorator<std::vector<PackedLink<CONT>, VALLOC>, ALLOC> : public detail::LinkedVarAccessorBase { public: Aliases for the types we're dealing with. using Link_t = ElementLink<CONT>; using PLink_t = SG::PackedLink<CONT>; using VElt_t = std::vector<SG::PackedLink<CONT>, VALLOC>; using DLink_t = DataLink<CONT>; using DLinkAlloc_t = typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;

/ Spans over the objects that are actually stored. using const_PackedLinkVector_span = typename AuxDataTraits<VElt_t, ALLOC>::const_span; using const_DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::const_span; using PackedLinkVector_span = typename AuxDataTraits<VElt_t, ALLOC>::span; using DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::span;

/ And spans over PackedLink objects. using const_PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, VALLOC>::const_span; using PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, VALLOC>::span;

/ Converter from vector of PackedLink to a span over ElementLinks. using ConstVectorTransform_t = detail::PackedLinkVectorConstConverter<CONT>;

/** Transform a span over vector of PackedLink to a span over span over ElementLink.

Definition at line 418 of file PackedLinkDecorator.h.

◆ ConstAccessor

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::ConstAccessor = SG::ConstAccessor<T, ALLOC>

Definition at line 570 of file AuxElement.h.

◆ ConstProxyIterator

typedef ProxyMap::const_iterator SG::ConstProxyIterator

Definition at line 24 of file ProxyMap.h.

◆ container_pointer_type

using SG::container_pointer_type = void
protected

Not supported.

Definition at line 440 of file PackedLinkDecorator.h.

◆ DataObjectSharedPtr

◆ Decorator

template<class T, class ALLOC = AuxAllocator_t<T>>
SG::Decorator = SG::Decorator<T, ALLOC>

Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.

Helper class to provide type-safe access to aux data, specialized for PackedLink.

Constructor taking an auxid directly.

Constructor.

This is a version of Decorator, specialized for jagged vectors.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

Although the type argument is JaggedVecElt<PAYLOAD_T>, the objects that this accessor produces are spans over elements of type PAYLOAD_T. The getDataSpan method will then produce a (writable) span over spans of PAYLOAD_T. (There are separate methods for returning spans over the element/payload arrays themselves.)

You might use this something like this:

// Only need to do this once.
using Cont_t = std::vector<int>;
static const SG::Decorator<SG::JaggedVecElt<Cont_t> jvec ("jvec");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
jvec (*m)[3] = 10;
for (auto sp : jvec.getDataSpan (*v)) {
for (int& x : sp) ...
}
static Double_t sp
#define x

*/ template <class PAYLOAD_T, class ALLOC> class Decorator<JaggedVecElt<PAYLOAD_T>, ALLOC> : public detail::LinkedVarAccessorBase { public: / Payload type. using Payload_t = PAYLOAD_T;

/ Allocator to use for the payload vector. using PayloadAlloc_t = typename std::allocator_traits<ALLOC>::template rebind_alloc<Payload_t>;

/ One element of the jagged vector. using Elt_t = SG::JaggedVecElt<PAYLOAD_T>;

/ Writable proxies for a jagged vector element: both a single proxy / and one used as part of a span. using JVecProxy = detail::JaggedVecProxyT<Payload_t, detail::JaggedVecProxyValBase>; using JVecProxyInSpan = detail::JaggedVecProxyT<Payload_t, detail::JaggedVecProxyRefBase>;

/ Converter from JaggedVecElt to a (writable) span. using Converter_t = detail::JaggedVecConverter<Payload_t>;

/ Converter from JaggedVecElt to a span. using ConstConverter_t = detail::JaggedVecConstConverter<Payload_t>;

/ Spans over the objects that are actually stored. using const_Elt_span = typename AuxDataTraits<JaggedVecElt<Payload_t>, ALLOC>::const_span; using const_Payload_span = typename AuxDataTraits<Payload_t, PayloadAlloc_t>::const_span; using Elt_span = typename AuxDataTraits<JaggedVecElt<Payload_t>, ALLOC>::span; using Payload_span = typename AuxDataTraits<Payload_t, PayloadAlloc_t>::span;

/ Spans over the entire jagged vector, both writable and not. using const_span = CxxUtils::transform_view_with_at<const_Elt_span, ConstConverter_t>; using span = CxxUtils::transform_view_with_at<Elt_span, Converter_t>;

/ Const span resulting from the conversion. using element_type = typename ConstConverter_t::element_type;

/ Type referencing an item (const). using const_reference_type = element_type;

/ The writable type we return. using reference_type = JVecProxy;

/ A const reference type that can appear on the RHS of an assignment / to an application of a Decorator of this type. using rhs_const_reference_type = std::span<const Payload_t>;

/ Not supported. using container_pointer_type = void; using const_container_pointer_type = void;

/**

Constructor.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

Parameters
nameName of this aux variable.
clsnameThe name of its associated class. May be blank.

The name -> auxid lookup is done here.

Parameters
auxidID for this auxiliary variable.

Will throw SG::ExcAuxTypeMismatch if the types don't match.

Parameters
nameName of this aux variable.
clsnameThe name of its associated class. May be blank.
flagsOptional flags qualifying the type. See AuxTypeRegistry.

The name -> auxid lookup is done here.

This is a version of Decorator, specialized for packed links.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

Although the type argument is PackedLink<CONT>, the objects that this accessor produces are ElementLink<CONT> (returned by value rather than by const reference). The getDataSpan method will then produce a (writable) span over ElementLink<CONT>. (There are separate methods for returning spans over the PackedLink/DataLink arrays themselves.)

You might use this something like this:

// Only need to do this once.
using Cont_t = std::vector<int>;
static const SG::Decorator<SG::PackedLink<Cont_t> links ("links");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
links (*m) = ElementLink<Cont_t> (...);
auto span = links.getDataSpan (*v);

*/ template <class CONT, class ALLOC> class Decorator<PackedLink<CONT>, ALLOC> : public detail::LinkedVarAccessorBase { public: Aliases for the types we're dealing with. using Link_t = ElementLink<CONT>; using PLink_t = SG::PackedLink<CONT>; using DLink_t = DataLink<CONT>; using DLinkAlloc_t = typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;

/ Spans over the objects that are actually stored. using const_PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, ALLOC>::const_span; using const_DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::const_span; using PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, ALLOC>::span; using DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::span;

/ Converter from PackedLink -> ElementLink. using ConstConverter_t = detail::PackedLinkConstConverter<CONT>;

/ Transform a span over PackedLink to a span over ElementLink. using const_span = CxxUtils::transform_view_with_at<const_PackedLink_span, ConstConverter_t>;

/ Writable proxy for PackedLink appearing like an ElementLink. using ELProxy = detail::ELProxyT<detail::ELProxyValBase<CONT> >;

/ Transform a non-const span of PackedLink to a range / of ElementLink proxies. using span = CxxUtils::transform_view_with_at<PackedLink_span, detail::ELProxyInSpanConverter<CONT> >;

/ Type the user sees. using element_type = Link_t;

/ Type referencing an item. using reference_type = ELProxy;

/ Type referencing an item. using const_reference_type = element_type;

/ A const reference type that can appear on the RHS of an assignment / to an application of a Decorator of this type. using rhs_const_reference_type = const Link_t&;

/ Not supported. using container_pointer_type = void; using const_container_pointer_type = void;

/**

Constructor.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

Definition at line 576 of file AuxElement.h.

◆ DecorHandleKeyArray

template<class T_Handle, class T_HandleKey, Gaudi::DataHandle::Mode MODE>
using SG::DecorHandleKeyArray = HandleKeyArray< T_Handle, T_HandleKey, MODE>

Definition at line 25 of file StoreGate/StoreGate/DecorHandleKeyArray.h.

◆ element_type

using SG::element_type = elt_span
protected

Type the user sees.

Definition at line 434 of file PackedLinkDecorator.h.

◆ ELSpanConverter

using SG::ELSpanConverter = detail::ELSpanConverter<CONT, VALLOC>
protected

Transform a span over vector of PackedLink to a span over span over ElementLink proxies.

Definition at line 428 of file PackedLinkDecorator.h.

◆ elt_span

using SG::elt_span = detail::ELSpanProxy<CONT, VALLOC>
protected

Presents a vector of PackedLink as a range of ElementLink proxies.

Definition at line 423 of file PackedLinkDecorator.h.

◆ getDataSourcePointerFunc_t

typedef IProxyDict ** SG::getDataSourcePointerFunc_t(const std::string &)

Definition at line 34 of file DataProxy.cxx.

◆ guard_t

Definition at line 498 of file AuxStoreInternal.h.

◆ iterator

typedef void SG::iterator

Definition at line 189 of file ArenaHeapAllocator.h.

◆ JaggedVecVector

template<class T, class ALLOC = AuxAllocator_t<JaggedVecElt<T> >>
using SG::JaggedVecVector = JaggedVecVectorT<JaggedVecVectorHolder<T, ALLOC> >

Definition at line 226 of file JaggedVecVector.h.

◆ maybe_thinning_error

Backwards compatibility.

Definition at line 161 of file Control/AthLinks/AthLinks/exceptions.h.

◆ mutex_t

Mutex used to synchronize modifications to the cache vector.

Mutex type for multithread synchronization.

Definition at line 497 of file AuxStoreInternal.h.

◆ PackedLinkVector

template<class CONT, class ALLOC = AuxAllocator_t<PackedLink<CONT> >>
using SG::PackedLinkVector = PackedLinkVectorT<PackedLinkVectorHolder<CONT, ALLOC> >

Definition at line 267 of file PackedLinkVector.h.

◆ PackedLinkVVector

template<class CONT, class VALLOC = AuxAllocator_t<PackedLink<CONT> >, class VELT = typename AuxDataTraits<PackedLink<CONT>, VALLOC >::vector_type, class ALLOC = AuxAllocator_t<VELT>>
using SG::PackedLinkVVector = PackedLinkVectorT<PackedLinkVVectorHolder<CONT, VALLOC, VELT, ALLOC> >

Definition at line 273 of file PackedLinkVector.h.

◆ ProxyIterator

typedef ProxyMap::iterator SG::ProxyIterator

Definition at line 23 of file ProxyMap.h.

◆ ProxyMap

typedef std::map<std::string, DataProxy*> SG::ProxyMap

Definition at line 22 of file ProxyMap.h.

◆ ReadCondHandleKeyArray

template<class T>
using SG::ReadCondHandleKeyArray = HandleKeyArray<ReadCondHandle<T>, CondHandleDefault::Key<ReadCondHandleKey<T> >, Gaudi::DataHandle::Reader >

Definition at line 30 of file CondHandleKeyArray.h.

◆ ReadDecorHandleKeyArray

template<class T, class S = float>
using SG::ReadDecorHandleKeyArray = DecorHandleKeyArray<ReadDecorHandle<T, S>, ReadDecorHandleKey<T>, Gaudi::DataHandle::Reader >

◆ ReadHandleKeyArray

template<class T>
using SG::ReadHandleKeyArray = HandleKeyArray<ReadHandle<T>, ReadHandleKey<T>, Gaudi::DataHandle::Reader >

Definition at line 32 of file StoreGate/StoreGate/ReadHandleKeyArray.h.

◆ reference_type

using SG::reference_type = elt_span
protected

Type referencing an item.

Definition at line 437 of file PackedLinkDecorator.h.

◆ sgkey_t

typedef uint32_t SG::sgkey_t

Type used for hashed StoreGate key+CLID pairs.

Definition at line 32 of file sgkey_t.h.

◆ SGKeyMap

template<class T>
using SG::SGKeyMap = std::unordered_map<sgkey_t, T>

A map using sgkey_t as a key.

Definition at line 93 of file sgkey_t.h.

◆ SGKeySet

using SG::SGKeySet = std::unordered_set<sgkey_t>

A set of sgkey_t values.

Definition at line 97 of file sgkey_t.h.

◆ SourceID

typedef std::string SG::SourceID

Definition at line 25 of file AthenaKernel/AthenaKernel/SourceID.h.

◆ span

◆ ThinningHandleKeyArray

template<class T>
using SG::ThinningHandleKeyArray = HandleKeyArray<ThinningHandle<T>,ThinningHandleKey<T>, Gaudi::DataHandle::Reader >

Definition at line 28 of file ThinningHandleKeyArray.h.

◆ TypelessConstAccessor

using SG::TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor

Definition at line 567 of file AuxElement.h.

◆ WPtr

template<class T>
using SG::WPtr = T*

Definition at line 15 of file SGWPtr.h.

◆ WriteCondHandleKeyArray

template<class T>
using SG::WriteCondHandleKeyArray = HandleKeyArray<WriteCondHandle<T>,CondHandleDefault::Key<WriteCondHandleKey<T> >, Gaudi::DataHandle::Writer >

Definition at line 33 of file CondHandleKeyArray.h.

◆ WriteDecorHandleKeyArray

template<class T, class S = float>
using SG::WriteDecorHandleKeyArray = DecorHandleKeyArray<WriteDecorHandle<T, S>,WriteDecorHandleKey<T>, Gaudi::DataHandle::Writer >

◆ WriteHandleKeyArray

template<class T>
using SG::WriteHandleKeyArray = HandleKeyArray<WriteHandle<T>,WriteHandleKey<T>, Gaudi::DataHandle::Writer >

Definition at line 32 of file WriteHandleKeyArray.h.

Enumeration Type Documentation

◆ AllowEmptyEnum

Enumerator
AllowEmpty 

Definition at line 26 of file StoreGate/StoreGate/VarHandleKey.h.

26 {
27 AllowEmpty = 1
28};

◆ AuxVarFlags

Additional flags to qualify an auxiliary variable.

Enumerator
None 

No special flags set.

Atomic 

Mark that this variable should only be accessed atomically.

If this is set, then the variable can be accessed only via AtomicDecorator. Be aware that this is not completely safe; it is still possible to have non-atomic accesses to the variable via either the implicit operations provided by this class or by explicit access to the value vector. Therefore, this is not recommended for general use. Contact core software before using this for new code.

Definition at line 58 of file AuxTypes.h.

58 {
60 None = 0x00,
61
70 Atomic = 0x01,
71
77 Linked = 0x02,
78
79 // These flags control the behavior of findAuxID() but are not
80 // stored with the variable.
81 SkipNameCheck = 0x80,
82
85};
#define ATH_BITMASK
Mark that a class enum should be treated as a bitmask.
Definition bitmask.h:70
@ Atomic
Mark that this variable should only be accessed atomically.
Definition AuxTypes.h:70
@ None
No special flags set.
Definition AuxTypes.h:60

◆ IndexTrackingPolicy

Enumerator
DEFAULT_TRACK_INDICES 

Default value.

Set index tracking based on the ownership policy. If this container owns its elements, then track indices; otherwise do not.

ALWAYS_TRACK_INDICES 

Always track indices, regardless of the setting of the ownership policy.

NEVER_TRACK_INDICES 

Never track indices, regardless of the setting of the ownership policy.

Definition at line 37 of file IndexTrackingPolicy.h.

37 {
41
44
47};
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
@ NEVER_TRACK_INDICES
Never track indices, regardless of the setting of the ownership policy.
@ DEFAULT_TRACK_INDICES
Default value.

◆ InvalidSlot

enum class SG::InvalidSlot
strong

Support of the invalid EventContext in SlotSpecificObj.

Enumerator
Enabled 
Disabled 

Definition at line 45 of file AthenaKernel/AthenaKernel/SlotSpecificObj.h.

◆ OwnershipPolicy

Enumerator
OWN_ELEMENTS 

this data object owns its elements

VIEW_ELEMENTS 

this data object is a view, it does not own its elmts

Definition at line 16 of file OwnershipPolicy.h.

16 {
19 };
@ OWN_ELEMENTS
this data object owns its elements
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts

◆ PrivateStoreState

enum class SG::PrivateStoreState : uint8_t
strongprivate

The current private data state.

Enumerator
NO_PRIVATE 
HAVE_PRIVATE 
HAD_PRIVATE 

Definition at line 131 of file IAuxElement.h.

Function Documentation

◆ addAuxID()

void SG::addAuxID ( auxid_t auxid)
protected

Add a new auxid to the set of those being managed by this store.

Parameters
auxidThe auxid to add.

◆ addVector()

IAuxTypeVector * SG::AuxStoreInternal::addVector ( std::unique_ptr< IAuxTypeVector > vec,
bool isDecoration )
protected

Explicitly add a vector to the store.

Parameters
vecVector data being added.
isDecorationShould this variable be marked as a decoration?

For internal use. The auxid must not already exist in the store.

Definition at line 147 of file AuxStoreInternal.cxx.

149{
150 guard_t guard (m_mutex);
151 auxid_t auxid = vec->auxid();
152 if (m_locked)
153 throw ExcStoreLocked (auxid);
154
155 // Resize the vector if needed.
156 if (m_vecs.size() <= auxid) {
157 m_vecs.resize (auxid+1);
158 }
159
160 // Give up if the variable is already present in the store.
161 if (m_vecs[auxid]) std::abort();
162
163 // Make sure the length is consistent with the rest of the store.
164 if (!vec->isLinked()) {
165 size_t sz = this->size_noLock();
166 if (vec->size() < sz)
167 vec->resize (sz);
168 }
169
170 // Add it to the store.
171 m_vecs[auxid] = std::move (vec);
172
173 // Need to be sure that the addition to the decoration bitset is visible
174 // to other threads before the addition to the variable bitset.
175 if (isDecoration) {
176 m_decorations.insert (auxid);
177 std::atomic_thread_fence (std::memory_order_seq_cst);
178 }
179 addAuxID (auxid);
180
181 return m_vecs[auxid].get();
182}
std::vector< size_t > vec
static Double_t sz
Exception — Attempted to modify auxiliary data in a locked store.
void addAuxID(auxid_t auxid)
Add a new auxid to the set of those being managed by this store.
SG::auxid_set_t m_decorations
Record which variables are decorations.
SG::auxid_t auxid() const
Return the aux id for this variable.
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
AthContainers_detail::lock_guard< mutex_t > guard_t
std::vector< std::unique_ptr< IAuxTypeVector > > m_vecs
The collection of vectors of aux data that we're managing, indexed by auxid.
bool m_locked
Has this container been locked?
mutex_t m_mutex
size_t size_noLock() const
Return the number of elements in the store; no locking.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27

◆ allocate()

pointer SG::allocate ( )

Allocate a new element.

The fast path of this will be completely inlined.

◆ ArenaAllocatorBase::destroy_fcn< HepMC::GenEvent >()

template<>
void SG::ArenaAllocatorBase::destroy_fcn< HepMC::GenEvent > ( ArenaAllocatorBase::pointer p)
inline

Definition at line 66 of file HepMcDataPool.h.

68 {
69 HepMC::GenEvent* evt = reinterpret_cast<HepMC::GenEvent*>(p);
70 evt->m_particle_barcodes.clear();
71 evt->m_vertex_barcodes.clear();
72 delete evt->m_pdf_info; evt->m_pdf_info = 0;
73 evt->~GenEvent();
74 }

◆ ArenaAllocatorBase::destroy_fcn< HepMC::GenParticle >()

template<>
void SG::ArenaAllocatorBase::destroy_fcn< HepMC::GenParticle > ( ArenaAllocatorBase::pointer p)
inline

Definition at line 45 of file HepMcDataPool.h.

47 {
48 HepMC::GenParticle* part = reinterpret_cast<HepMC::GenParticle*>(p);
49 part->m_production_vertex = 0;
50 part->m_end_vertex = 0;
51 part->~GenParticle();
52 }

◆ ArenaAllocatorBase::destroy_fcn< HepMC::GenVertex >()

template<>
void SG::ArenaAllocatorBase::destroy_fcn< HepMC::GenVertex > ( ArenaAllocatorBase::pointer p)
inline

Definition at line 55 of file HepMcDataPool.h.

57 {
58 HepMC::GenVertex* vtx = reinterpret_cast<HepMC::GenVertex*>(p);
59 vtx->m_event = 0;
60 vtx->m_particles_in.clear();
61 vtx->m_particles_out.clear();
62 vtx->~GenVertex();
63 }

◆ ArenaHeapAllocator() [1/3]

SG::ArenaHeapAllocator::ArenaHeapAllocator ( ArenaHeapAllocator && other)

Move constructor.

Definition at line 58 of file ArenaHeapAllocator.cxx.

60 : ArenaBlockAllocatorBase (std::move (other)),
61 m_freeptr (other.m_freeptr)
62{
63 // False positives
64 // cppcheck-suppress useInitializationList
65 other.m_freeptr = nullptr;
66}
Common functionality for block-oriented allocators.
pointer m_freeptr
Pointer to the next free element.

◆ ArenaHeapAllocator() [2/3]

SG::ArenaHeapAllocator ( const ArenaHeapAllocator & )
delete

Don't allow copy construction or assignment.

◆ ArenaHeapAllocator() [3/3]

SG::ArenaHeapAllocator::ArenaHeapAllocator ( const Params & params)

Constructor.

Parameters
paramsThe parameters structure for this allocator. See ArenaAllocatorBase.h for the contents.

Definition at line 28 of file ArenaHeapAllocator.cxx.

29 : ArenaBlockAllocatorBase (params),
30 m_freeptr (nullptr)
31{
32 // Consistency check.
33 assert (params.linkOffset + sizeof (pointer) <= params.eltSize);
34}

◆ ArenaPoolAllocator_iterator_increment() [1/2]

ArenaPoolAllocator::const_pointer SG::ArenaPoolAllocator_iterator_increment ( ArenaPoolAllocator::const_pointer base,
const ArenaBlock *& block )
inline

Helper: common code for advancing an iterator.

Parameters
baseElement pointer.
blockBlock pointer.

Definition at line 53 of file ArenaPoolAllocator.cxx.

55{
56 // If we haven't yet reached the start of this block, move the iterator
57 // back one.
58 if (base > block->index(0,0)) {
59 return base - block->eltSize();
60 }
61
62 // Move to the previous block.
63 block = block->link();
64 if (block) {
65 return block->index (block->size()-1, block->eltSize());
66 }
67 return nullptr;
68}
pointer index(size_t i)
Return a pointer to element i in the block.
ArenaBlock *& link()
Return the link pointer of the block.
size_t eltSize() const
Return the size of the elements in the block.
size_t size() const
Return the number of elements in the block.
std::string base
Definition hcg.cxx:83

◆ ArenaPoolAllocator_iterator_increment() [2/2]

ArenaPoolAllocator::pointer SG::ArenaPoolAllocator_iterator_increment ( ArenaPoolAllocator::pointer base,
ArenaBlock *& block )
inline

Helper: common code for advancing an iterator.

Parameters
baseElement pointer.
blockBlock pointer.

Definition at line 28 of file ArenaPoolAllocator.cxx.

30{
31 // If we haven't yet reached the start of this block, move the iterator
32 // back one.
33 if (base > block->index(0,0)) {
34 return base - block->eltSize();
35 }
36
37 // Move to the previous block.
38 block = block->link();
39 if (block) {
40 return block->index (block->size()-1, block->eltSize());
41 }
42 return nullptr;
43}

◆ assign()

void SG::assign ( const AuxElement & other,
bool warnUnlocked = false )

Assignment.

Parameters
otherThe object from which we're assigning.
warnUnlockedIf true, then warn when we skip unlocked decorations.

We don't copy container/index, as assignment doesn't change where this object is. However, if we have aux data, then we copy aux data if we're copying from an object that also has it; otherwise, if we're copying from an object with no aux data, then we clear ours.

◆ asStorable() [1/3]

template<typename T>
DataObject * SG::asStorable ( SG::DataObjectSharedPtr< T > pObject)

Definition at line 31 of file DataObjectSharedPtr.h.

31 {
32 typedef typename DataBucketTrait<T>::type bucket_t;
33 return new bucket_t (pObject.get());
34}
T * get()
Get the pointer.
typename std::conditional_t< has_base, deflt, recurse >::type type

◆ asStorable() [2/3]

template<typename T>
DataObject * SG::asStorable ( std::unique_ptr< T > pObject)

Definition at line 159 of file StorableConversions.h.

159 {
160 typedef typename std::remove_const<T>::type T_nc;
161 typedef typename DataBucketTrait<T_nc>::type bucket_t;
162 return new bucket_t (std::move(pObject));
163 }

◆ asStorable() [3/3]

template<typename T>
DataObject * SG::asStorable ( T * pObject)

Definition at line 153 of file StorableConversions.h.

153 {
154 typedef typename DataBucketTrait<T>::type bucket_t;
155 return new bucket_t (pObject);
156 }

◆ AthLinks_error()

void SG::AthLinks_error ( )

For setting debugger breakpoints.

Definition at line 21 of file Control/AthLinks/src/exceptions.cxx.

21{}

◆ ATLAS_NOT_CONST_THREAD_SAFE()

IOpaqueAddress *TransientAddress::address SG::ATLAS_NOT_CONST_THREAD_SAFE ( ) const
inline

Retrieve IOpaqueAddress.

Definition at line 199 of file TransientAddress.h.

200 {
201 IOpaqueAddress* addr ATLAS_THREAD_SAFE = const_cast<IOpaqueAddress*> (m_address.get());
202 return addr;
203 }
#define ATLAS_THREAD_SAFE

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

void setDataProxyHolderInputRenameMap SG::ATLAS_NOT_THREAD_SAFE ( const Athena::IInputRename::InputRenameRCU_t * map)

Set map used for performing input renaming in toTransient.

Parameters
mapThe new map, or nullptr for no renmaing.

Definition at line 615 of file DataProxyHolder.cxx.

617{
618 s_inputRenameMap = map;
619}
STL class.

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

void setNSlotsHiveMgrName SG::ATLAS_NOT_THREAD_SAFE ( const std::string & s)

Allow setting the name of the whiteboard service.

For testing.

Definition at line 35 of file SlotSpecificObj.cxx.

36{
37 getNSlots_hiveMgrName = s;
38}

◆ auxdata() [1/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type SG::auxdata ( const std::string & name)

Fetch an aux data variable, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ auxdata() [2/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::auxdata ( const std::string & name) const

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor or ConstAccessor classes.

◆ auxdata() [3/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type SG::auxdata ( const std::string & name,
const std::string & clsname )

Fetch an aux data variable, as a non-const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ auxdata() [4/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::auxdata ( const std::string & name,
const std::string & clsname ) const

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor or ConstAccessor classes.

◆ auxdataConst() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::auxdataConst ( const std::string & name) const

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdataConst() [2/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::auxdataConst ( const std::string & name,
const std::string & clsname ) const

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdecor() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type SG::auxdecor ( const std::string & name) const

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ auxdecor() [2/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type SG::auxdecor ( const std::string & name,
const std::string & clsname ) const

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ AuxElement() [1/2]

SG::AuxElement ( const AuxElement & other)

Copy Constructor.

Parameters
otherObject being copied.

We do not copy the container/index — the new object is not yet in a container!

In the case of constructing an object with a private store, makePrivateStore will take care of copying the aux data.

◆ AuxElement() [2/2]

SG::AuxElement ( SG::AuxVectorData * container,
size_t index )

Base class for elements of a container that can have aux data.

Classes that want to have associated auxiliary data should derive from this class. (It is also possible to use this class directly, if you want a container that only stores auxiliary data.)

The first thing that happens when you derive from AuxElement is that when an object is inserted into a DataVector, the vector will maintain information in the object telling were it is within the vector. For example:

v[1] = new SG::AuxElement;
assert (v[1]->index() == 1);
assert (v[1]=>container() == &v);
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
size_t index() const
Return the index of this element within its container.
const SG::AuxVectorData * container() const
Return the container holding this element.

As long as you don't use DataVector::stdcont or use unsafe casts, DataVector will correctly maintain this information.

When an object deriving from AuxElement is in a DataVector it may have auxiliary data associated with it; that is, named data objects of arbitrary type. The recommended way of accessing auxiliary data is through the Accessor and ConstAccessor classes, which cache the lookup between the aux data item name and its internal representation. The difference between these two is that ConstAccessor allows only const access to the element, while Accessor, which derives from it, allows non-const access as well. A given name must always have the same type, no matter where it is used (even across different classes); otherwise, an exception will be thrown. To help prevent conflicts between different classes, aux data item names may be optionally qualified with a class name. Here's an example of using ConstAccessor:

// Only need to do this once.
SG::ConstAccessor<int> vint1 ("myInt");
...
const Myclass* m = ...;
int x = vint1 (*m);

The auxdata methods can be used as a shortcut for this, but that's not recommended for anything for which performance is an issue.

You can also define getters/setters in your class:

class Myclass {
...
int get_x() const
{ const static SG::ConstAccessor<int> acc ("x", "Myclass");
return acc (*this); }
int& get_x()
{ const static SG::Accessor<int> acc ("x", "Myclass");
return acc (*this); }
Helper class to provide type-safe access to aux data.

In addition, one sometimes wants to add additional auxiliary data to an existing const container; for example, after a container has been retrieved from StoreGate. This is called `decoration', and is handled by the Decorator object, which is much like Accessor and ConstAccessor. The difference is that Decorator can take a const container and return a non-const, modifiable reference. If the container has been locked by calling StoreGateSvc::setConst, then this is allowed only if this is a new auxiliary item, in which case it is marked as a decoration, or if it is already marked as a decoration. This prevents changing existing variables in a locked container. An auxdecor method is also available, analogous to auxdata.

In addition to the above, the class TypelessConstAccessor is a non-templated class that allows access to auxiliary data items directly as a void *. This is useful for code which operates on auxiliary data generically; it shouldn't really be used in other contexts.

Normally, an object can have auxiliary data only when it is part of a container. But sometimes it is useful to be able to associate aux data with an object before it has been added to a container. You can enable this by creating a `private store' for the object with makePrivateStore. This can optionally take an argument from which aux data should be copied. (Using a private store adds overhead, which is why it is not enabled by default.) Example:

class Myclass : public SG::AuxElement { ... };
...
SG::Accessor<int> myint ("myint");
const Myclass* m = new Myclass;
m->makePrivateStore();
myint(*m) = 10;
v.push_back(m);
assert (myint(v[0]) == 10);

When an object with a private store is added to a container, the aux data is copied to the container and the private store is released. However, the fact that we had a private store is remembered; if the object is later removed from the container, the private store will be remade, and the aux data will be copied back from the container to the private store. To explicitly release the private store (so that it won't come back automatically), call releasePrivateStore.

If you add makePrivateStore calls to the constructors of your class, then you should be able to treat aux data as if it were part of the object itself; the required copying will be handled automatically.

class Myclass : public SG::AuxElement
{
public:
Myclass() { makePrivateStore(); }
Myclass(const Myclass* other) { makePrivateStore(other); }
void makePrivateStore()
Create a new (empty) private store for this object.

The SG::AuxElementComplete template class may be helpful in setting this up.

It is also possible to associate one of these objects with an external aux data store. This is the `standalone' mode. To do this, use the setStore methods, exactly as you would for a container that has aux data. setStore will throw an exception if the object is a member of a container or has a private store.

This class should not have any virtual methods (to avoid forcing derived classes to have a vtable). */ coverity[MISSING_MOVE_ASSIGNMENT] class AuxElement

: public ConstAuxElement

{ public: / Default constructor. AuxElement();

/**

Constructor with explicit container / index.

Parameters
containerContainer of which this element will be a part.
indexIndex of this element within the container.

This does not make any changes to aux data.

◆ auxid()

SG::auxid_t SG::auxid ( ) const

Return the aux id for this variable.

◆ AuxStoreInternal() [1/2]

SG::AuxStoreInternal::AuxStoreInternal ( bool standalone = false)

An auxiliary data store that holds data internally.

Constructor.

When auxiliary data are associated with a container, the data themselves are managed by a separate `store' object, described by the interfaces SG::IAuxStore and SG::IConstAuxStore.

This class is an implementation of those interfaces that stores the data itself. This is suitable, for example, for transient auxiliary data. */ class AuxStoreInternal : public IAuxStore, public IAuxStoreIO { public: /**

Constructor.

Parameters
standaloneIf true, then write this in standalone mode.
standaloneIf true, then write this in standalone mode.

Definition at line 31 of file AuxStoreInternal.cxx.

33 m_locked (false)
34{
35}
bool standalone() const
Return the standalone flag.
bool m_standalone
Are we being written in standalone mode?

◆ AuxStoreInternal() [2/2]

SG::AuxStoreInternal::AuxStoreInternal ( const AuxStoreInternal & orig)

Copy constructor.

Definition at line 51 of file AuxStoreInternal.cxx.

52{
53 guard_t guard (other.m_mutex);
54 m_standalone = other.m_standalone;
55 m_decorations = other.m_decorations;
56 m_auxids = other.m_auxids;
57 m_locked = other.m_locked;
58 size_t size = other.m_vecs.size();
59 m_vecs.resize (size);
60 for (size_t i = 0; i < size; i++) {
61 if (other.m_vecs[i])
62 m_vecs[i] = other.m_vecs[i]->clone();
63 }
64}
SG::auxid_set_t m_auxids
Set of auxid's for which we've created a vector.
virtual size_t size() const override
Return the number of elements in the store.

◆ clearAux()

void SG::AuxElement::clearAux ( )
private

Clear all aux data associated with this element.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 567 of file AuxElement.cxx.

568{
569 if (!m_container) return;
571}
static void clearAuxHelper(AuxVectorData &container, size_t index)
Clear all aux data associated with an element.

◆ clearAuxHelper()

void SG::AuxElement::clearAuxHelper ( AuxVectorData & container,
size_t index )
staticprivate

Clear all aux data associated with an element.

Parameters
containerContainer of the element.
indexIndex of this element within the container.

If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 626 of file AuxElement.cxx.

627{
628 if (!container.hasStore()) return;
629 if (!container.hasNonConstStore()) {
630 throw SG::ExcConstAuxData ("clearAux", SG::null_auxid);
631 }
632
635 r.clear (auxid, container, index, 1);
636 }
637}
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
const SG::auxid_set_t & getWritableAuxIDs() const
Return a set of identifiers for writable data items in this store.
Exception — Non-const operation performed on const aux data.
int r
Definition globals.cxx:22
static const auxid_t null_auxid
To signal no aux data item.
Definition AuxTypes.h:30
Definition index.py:1

◆ clearCache()

void SG::clearCache ( )

Clear the cached aux data pointers.

You should call this any time something changes in the aux store that could invalidate the vector pointers.

◆ clearDecorations()

bool SG::clearDecorations ( ) const
override

Clear all decorations.

Erase all decorations from an associated store, restoring the state to when lock was called.

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

Erase all decorations from the store, restoring the state to when lock was called. Be sure to clear the cache of the referencing container!

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

◆ container()

SG::AuxVectorData * SG::container ( ) const

Return the container holding this element.

◆ contKeyFromKey()

std::string SG::contKeyFromKey ( const std::string & key)

Extract the container part of key.

Parameters
keyThe decoration handle key.

Given a key of the form CCC.DDD, returns the container part, CCC.

Definition at line 26 of file DecorKeyHelpers.cxx.

27{
28 std::string::size_type ipos = key.find ('.');
29 if (ipos == std::string::npos)
30 return key;
31 return key.substr (0, ipos);
32}

◆ copyAux()

void SG::AuxElement::copyAux ( const ConstAuxElement & other,
bool warnUnlocked = false )
private

Copy aux data from another object.

Parameters
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 587 of file AuxElement.cxx.

589{
590 if (!m_container) return;
591 copyAuxHelper (*container(), index(), other, warnUnlocked);
592}
static void copyAuxHelper(AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
Copy aux data from another object.

◆ copyAuxHelper()

void SG::AuxElement::copyAuxHelper ( AuxVectorData & container,
size_t index,
const ConstAuxElement & other,
bool warnUnlocked )
staticprivate

Copy aux data from another object.

Parameters
containerContainer of the element.
indexIndex of this element within the container.
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 654 of file AuxElement.cxx.

658{
659 if (!container.hasStore()) return;
660 if (!container.hasNonConstStore())
661 throw SG::ExcConstAuxData ("copyAux");
662
663 const SG::AuxVectorData* ocont = other.container();
664
665 if (!ocont || !ocont->hasStore()) {
666 AuxElement::clearAuxHelper (container, index);
667 return;
668 }
669
670 SG::auxid_set_t other_ids = ocont->getCopyIDs (warnUnlocked);
671
672 size_t oindex = other.index();
674
675 for (SG::auxid_t auxid : other_ids) {
676 if (!r.isLinked (auxid)) {
677 r.copy (auxid, container, index, *ocont, oindex, 1);
678 }
679 }
680
681 for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
682 if (!other_ids.test (auxid)) {
683 r.clear (auxid, container, index, 1);
684 }
685 }
686}
Manage lookup of vectors of auxiliary data.
SG::auxid_set_t getCopyIDs(bool warnUnlocked=false) const
Return the set of variables to copy in a deep copy.
bool hasStore() const
Return true if this object has an associated store.
A set of aux data identifiers.
Definition AuxTypes.h:47

◆ copyAuxStoreThinned()

void SG::copyAuxStoreThinned ( const SG::IConstAuxStore & orig,
SG::IAuxStore & copy,
const SG::ThinningInfo * info )

Helper to copy an aux store while applying thinning.

Parameters
origSource aux store from which to copy.
copyDestination aux store to which to copy.
infoThinning information for this object (or nullptr).

orig and copy are both auxiliary store objects. The data from orig will be copied to copy, with individual elements / variables removed according info.

◆ copyThinned()

template<class CONTAINER>
std::unique_ptr< CONTAINER > SG::copyThinned ( CONTAINER & orig,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning.

Parameters
origThe object to copy.
infoThinning information for this object (or nullptr).

Returns a new copy of orig with elements removed according to the thinning defined in svc. Ownership of the new object is passed back to the caller.

The code here handles IAuxStore objects. (For a DataVector object, use copyThinnedConst.) Support for additional object types may be added by adding overloads for copyThinned1.

◆ copyThinned1() [1/4]

template<class CONTAINER>
std::unique_ptr< const CONTAINER > SG::copyThinned1 ( const CONTAINER & orig,
const DataVector< typename CONTAINER::base_value_type > * dummy,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning.

Parameters
origThe object to copy.
dummyDummy argument for overload resolution.
infoThinning information for this object (or nullptr).

This overload handles DataVector types. It returns a view container copy of orig, from which any thinned elements are removed.

◆ copyThinned1() [2/4]

template<class CONTAINER>
std::unique_ptr< CONTAINER > SG::copyThinned1 ( const CONTAINER & orig,
const SG::IAuxStore * dummy,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning.

Parameters
origThe object to copy.
dummyDummy argument for overload resolution.
infoThinning information for this object (or nullptr).

This overload handles IAuxStore types. It returns a new copy of the store, with any thinned elements removed.

◆ copyThinned1() [3/4]

template<class CONTAINER>
std::unique_ptr< CONTAINER > SG::copyThinned1 ( const CONTAINER & orig,
const void * dummy,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning.

Parameters
origThe object to copy.
dummyDummy argument for overload resolution.
infoThinning information for this object (or nullptr).

This is the generic version of copyThinned, which matches types for which there is not a more specific overload. It simply makes a copy of orig using the copy constructor.

◆ copyThinned1() [4/4]

template<class CONTAINER>
std::unique_ptr< CONTAINER > SG::copyThinned1 ( CONTAINER & orig,
DataVector< typename CONTAINER::base_value_type > * ,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning.

Parameters
origThe object to copy.
dummyDummy argument for overload resolution.
infoThinning information for this object (or nullptr).

This overload handles DataVector types. It returns a view container copy of orig, from which any thinned elements are removed.

◆ copyThinnedConst()

template<class CONTAINER>
std::unique_ptr< const CONTAINER > SG::copyThinnedConst ( const CONTAINER & orig,
const SG::ThinningInfo * info )

Helper to copy an object while applying thinning, const version.

Parameters
origThe object to copy.
infoThinning information for this object (or nullptr).

Returns a new copy of orig with elements removed according to the thinning defined in svc. Ownership of the new object is passed back to the caller.

The code here handles DataVector and IAuxStore objects. Support for additional object types may be added by adding overloads for copyThinned1.

◆ DataProxy_cast() [1/3]

template<typename DATA>
DATA SG::DataProxy_cast ( const DataProxy & proxy)

const ref version of the cast.

Exceptions
SG::ExcBadDataProxyCast.

Definition at line 64 of file DataProxy_cast.h.

65{
66 const DATA* result = SG::DataProxy_cast<DATA>(&proxy);
67 if (!result) SG::throwExcBadDataProxyCast(proxy, typeid(DATA));
68 return *result;
69}
void throwExcBadDataProxyCast(const DataProxy &proxy, const std::type_info &tid)
Throw an ExcBadDataProxyCast exception.
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies

◆ DataProxy_cast() [2/3]

template<typename DATA>
DATA * SG::DataProxy_cast ( SG::DataProxy * proxy)

cast the proxy into the concrete data object it proxies

use optional>

Definition at line 53 of file DataProxy_cast.h.

53 {
54 typedef typename std::remove_const<DATA>::type DATA_nc;
56
57 return static_cast<DATA*>(DataProxy_cast (proxy, ClassID_traits<DATA>::ID(),
58 &typeid(DATA_nc)));
59}
static void init()
Initialization hook. A no-op by default.

◆ DataProxy_cast() [3/3]

void * SG::DataProxy_cast ( SG::DataProxy * proxy,
CLID clid,
const std::type_info * tinfo = nullptr )

Try to get the pointer back from a DataProxy, converted to be of type clid.

Parameters
proxyThe DataProxy.
clidThe ID of the class to which to convert.

Only works if the held object is a DataBucket. Returns nullptr on failure,

Definition at line 633 of file DataProxy.cxx.

634{
635 if (nullptr == proxy || !proxy->isValid()) {
636 return nullptr;
637 }
638
639 DataObject* pObject = proxy->accessData();
640 if (nullptr == pObject) {
641#ifndef NDEBUG
642 MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
643 gLog << MSG::WARNING
644 << "this proxy " << MSG::hex << proxy
645 << MSG::dec << " has a NULL data object ptr" << endmsg;
646#endif
647 return nullptr;
648 }
649
650 void* result = SG::Storable_cast (pObject, clid, tinfo, true, proxy, proxy->isConst());
651 if (nullptr == result) {
652 //if result is null, probably CLID is neither the type the object was
653 // stored with, nor it inherits from it.
654 // Before giving up let's check its transient CLIDs
655 DataBucketBase* db(0);
656 if (proxy->transientID(clid) &&
657 nullptr != (db = dynamic_cast<DataBucketBase*>(pObject)) )
658 {
659 //it is a symlink after all. Let's hard cast and keep our fingers Xed
660 // But first: if this is a non-const proxy, then the cast
661 // may have failed because it needed to go via a copying conversion
662 // that's not allowed for non-const objects. So try the conversion
663 // again as const; if that works, then don't do the hard cast.
664 if (!proxy->isConst() &&
665 SG::Storable_cast(pObject, clid, tinfo, true, proxy, true) != nullptr)
666 {
667#ifndef NDEBUG
668 MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
669 gLog << MSG::WARNING
670 << "Request for a non-const object via copying conversion; "
671 << "requested CLID = " << clid
672 << ", proxy primary ID is " << proxy->clID() << endmsg ;
673#endif
674 }
675 else {
676 // ok, hard cast.
677 result = db->object();
678 }
679 }
680 else {
681#ifndef NDEBUG
682 MsgStream gLog(Athena::getMessageSvc(), "SG::DataProxy_cast");
683 gLog << MSG::WARNING
684 << "Request for an invalid object; requested CLID = "
685 << clid
686 << ", proxy primary ID is " << proxy->clID() << endmsg ;
687#endif
688 } //try symlink
689 } //result 0
690
691 return result;
692}
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)
T * Storable_cast(DataObject *pDObj, bool quiet=true, IRegisterTransient *irt=0, bool isConst=true)

◆ dataVectorAsELV()

template<class DV>
std::vector< ElementLink< DV > > SG::dataVectorAsELV ( const DV & v,
IProxyDict * store = 0 )

Helper to make a vector<EL> from a DataVector.

Given a DataVector, return a vector of ElementLink objects that reference the DataVector's elements. We can always do this if the DataVector owns its elements. However, if it is a view container, then the elements must derive from SG::AuxElement and must be part of some other container.

Definition at line 92 of file dataVectorAsELV.h.

93{
94 std::vector<ElementLink<DV> > ret;
95 size_t sz = v.size();
96 ret.reserve (sz);
97
98 if (!store) store = SG::CurrentEventStore::store();
99
100 if (v.ownPolicy() == SG::OWN_ELEMENTS) {
101 // Could hoist the sgkey lookup.
102 // But this will probably not be a common case, so don't do that
103 // unless it's needed.
104 for (size_t i = 0; i < sz; i++)
105 ret.emplace_back (v, i, store);
106 }
107 else {
108 dataVectorViewAsELV (typename AuxStore_traits<DV>::flag(), v, ret, store);
109 }
110
111 return ret;
112}
void dataVectorViewAsELV(const std::true_type &, const DV &v, std::vector< ElementLink< DV > > &ret, IProxyDict *store)
Helper for dataVectorViewAsELV.

◆ dataVectorViewAsELV() [1/2]

template<class DV>
void SG::dataVectorViewAsELV ( const std::false_type & ,
const DV & ,
std::vector< ElementLink< DV > > & ,
IProxyDict *  )

Helper for dataVectorViewAsELV.

Don't call this directly.

Handle the case of a view vector with elements not deriving from AuxElement (just throw an exception).

Definition at line 71 of file dataVectorAsELV.h.

75{
76 throw SG::ExcDVToELV ("Element in view container does not derive from AuxElement.");
77}
Exception — Can't convert DataVector to vector of ElementLinks.

◆ dataVectorViewAsELV() [2/2]

template<class DV>
void SG::dataVectorViewAsELV ( const std::true_type & ,
const DV & v,
std::vector< ElementLink< DV > > & ret,
IProxyDict * store )

Helper for dataVectorViewAsELV.

Don't call this directly.

Handle the case of a view vector with elements deriving from AuxElement.

Definition at line 43 of file dataVectorAsELV.h.

47{
48 const DV* last_d = nullptr;
49 const SG::AuxVectorData* last_b = nullptr;
50 for (const typename DV::base_value_type* elt : v) {
51 const SG::AuxVectorData* cont_b = elt->container();
52 if (cont_b != last_b) {
53 last_b = cont_b;
54 last_d = dynamic_cast<const DV*>(cont_b);
55 }
56 if (!last_d)
57 throw SG::ExcDVToELV ("Element not in a container");
58 ret.emplace_back (*last_d, elt->index(), store);
59 }
60}

◆ Decorator() [1/5]

Constructor taking an auxid directly.

Parameters
auxidID for this auxiliary variable.

Will throw SG::ExcAuxTypeMismatch if the types don't match.

◆ Decorator() [2/5]

SG::Decorator ( const SG::auxid_t auxid,
const SG::AuxVarFlags flags )
protected

Constructor taking an auxid directly.

Parameters
auxidID for this auxiliary variable.
flagsOptional flags qualifying the type. See AuxTypeRegistry.

Will throw SG::ExcAuxTypeMismatch if the types don't match.

◆ Decorator() [3/5]

SG::Decorator ( const std::string & name)

Helper class to provide type-safe access to aux data.

Constructor.

Helper class to provide type-safe access to aux data, specialized for PackedLink.

Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

This is written as a separate class in order to be able to cache the name -> auxid lookup.

You might use this something like this:

// Only need to do this once.
static const SG::Decorator<int> vint1 ("myInt");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
vint1 (*m) = 123;

*/ template <class T, class ALLOC = AuxAllocator_t<T> > class Decorator { public: / Type referencing an item. using reference_type = typename AuxDataTraits<T, ALLOC>::reference_type;

/ Type referencing an item, as const reference. using const_reference_type = typename AuxDataTraits<T, ALLOC>::const_reference_type;

/ A const reference type that can appear on the RHS of an assignment / to an application of a Decorator of this type. using rhs_const_reference_type = const_reference_type;

/ Type the user sees. using element_type = typename AuxDataTraits<T, ALLOC>::element_type;

/ Pointer into the container holding this item. using container_pointer_type = typename AuxDataTraits<T, ALLOC>::container_pointer_type; using const_container_pointer_type = typename AuxDataTraits<T, ALLOC>::const_container_pointer_type;

/ A span over elements in the container. using span = typename AuxDataTraits<T, ALLOC>::span; using const_span = typename AuxDataTraits<T, ALLOC>::const_span;

/**

Constructor.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

This is a version of Decorator, specialized for jagged vectors.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

Although the type argument is JaggedVecElt<PAYLOAD_T>, the objects that this accessor produces are spans over elements of type PAYLOAD_T. The getDataSpan method will then produce a (writable) span over spans of PAYLOAD_T. (There are separate methods for returning spans over the element/payload arrays themselves.)

You might use this something like this:

// Only need to do this once.
using Cont_t = std::vector<int>;
static const SG::Decorator<SG::JaggedVecElt<Cont_t> jvec ("jvec");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
jvec (*m)[3] = 10;
for (auto sp : jvec.getDataSpan (*v)) {
for (int& x : sp) ...
}

*/ template <class PAYLOAD_T, class ALLOC> class Decorator<JaggedVecElt<PAYLOAD_T>, ALLOC> : public detail::LinkedVarAccessorBase { public: / Payload type. using Payload_t = PAYLOAD_T;

/ Allocator to use for the payload vector. using PayloadAlloc_t = typename std::allocator_traits<ALLOC>::template rebind_alloc<Payload_t>;

/ One element of the jagged vector. using Elt_t = SG::JaggedVecElt<PAYLOAD_T>;

/ Writable proxies for a jagged vector element: both a single proxy / and one used as part of a span. using JVecProxy = detail::JaggedVecProxyT<Payload_t, detail::JaggedVecProxyValBase>; using JVecProxyInSpan = detail::JaggedVecProxyT<Payload_t, detail::JaggedVecProxyRefBase>;

/ Converter from JaggedVecElt to a (writable) span. using Converter_t = detail::JaggedVecConverter<Payload_t>;

/ Converter from JaggedVecElt to a span. using ConstConverter_t = detail::JaggedVecConstConverter<Payload_t>;

/ Spans over the objects that are actually stored. using const_Elt_span = typename AuxDataTraits<JaggedVecElt<Payload_t>, ALLOC>::const_span; using const_Payload_span = typename AuxDataTraits<Payload_t, PayloadAlloc_t>::const_span; using Elt_span = typename AuxDataTraits<JaggedVecElt<Payload_t>, ALLOC>::span; using Payload_span = typename AuxDataTraits<Payload_t, PayloadAlloc_t>::span;

/ Spans over the entire jagged vector, both writable and not. using const_span = CxxUtils::transform_view_with_at<const_Elt_span, ConstConverter_t>; using span = CxxUtils::transform_view_with_at<Elt_span, Converter_t>;

/ Const span resulting from the conversion. using element_type = typename ConstConverter_t::element_type;

/ Type referencing an item (const). using const_reference_type = element_type;

/ The writable type we return. using reference_type = JVecProxy;

/ A const reference type that can appear on the RHS of an assignment / to an application of a Decorator of this type. using rhs_const_reference_type = std::span<const Payload_t>;

/ Not supported. using container_pointer_type = void; using const_container_pointer_type = void;

/**

Constructor.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

This is a version of Decorator, specialized for packed links.

This is like Accessor, except that it only `decorates' the container. What this means is that this object can operate on a const container and return a non-const reference. However, if the container is locked, this will only work if either this is a reference to a new variable, in which case it is marked as a decoration, or it is a reference to a variable already marked as a decoration.

Although the type argument is PackedLink<CONT>, the objects that this accessor produces are ElementLink<CONT> (returned by value rather than by const reference). The getDataSpan method will then produce a (writable) span over ElementLink<CONT>. (There are separate methods for returning spans over the PackedLink/DataLink arrays themselves.)

You might use this something like this:

// Only need to do this once.
using Cont_t = std::vector<int>;
static const SG::Decorator<SG::PackedLink<Cont_t> links ("links");
...
const DataVector<MyClass></em> v = ...;
const Myclass* m = v->at(2);
links (*m) = ElementLink<Cont_t> (...);
auto span = links.getDataSpan (*v);

*/ template <class CONT, class ALLOC> class Decorator<PackedLink<CONT>, ALLOC> : public detail::LinkedVarAccessorBase { public: Aliases for the types we're dealing with. using Link_t = ElementLink<CONT>; using PLink_t = SG::PackedLink<CONT>; using DLink_t = DataLink<CONT>; using DLinkAlloc_t = typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;

/ Spans over the objects that are actually stored. using const_PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, ALLOC>::const_span; using const_DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::const_span; using PackedLink_span = typename AuxDataTraits<PackedLink<CONT>, ALLOC>::span; using DataLink_span = typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>::span;

/ Converter from PackedLink -> ElementLink. using ConstConverter_t = detail::PackedLinkConstConverter<CONT>;

/ Transform a span over PackedLink to a span over ElementLink. using const_span = CxxUtils::transform_view_with_at<const_PackedLink_span, ConstConverter_t>;

/ Writable proxy for PackedLink appearing like an ElementLink. using ELProxy = detail::ELProxyT<detail::ELProxyValBase<CONT> >;

/ Transform a non-const span of PackedLink to a range / of ElementLink proxies. using span = CxxUtils::transform_view_with_at<PackedLink_span, detail::ELProxyInSpanConverter<CONT> >;

/ Type the user sees. using element_type = Link_t;

/ Type referencing an item. using reference_type = ELProxy;

/ Type referencing an item. using const_reference_type = element_type;

/ A const reference type that can appear on the RHS of an assignment / to an application of a Decorator of this type. using rhs_const_reference_type = const Link_t&;

/ Not supported. using container_pointer_type = void; using const_container_pointer_type = void;

/**

Constructor.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

Parameters
nameName of this aux variable.

The name -> auxid lookup is done here.

◆ Decorator() [4/5]

SG::Decorator ( const std::string & name,
const std::string & clsname )

Constructor.

Parameters
nameName of this aux variable.
clsnameThe name of its associated class. May be blank.

The name -> auxid lookup is done here.

◆ Decorator() [5/5]

SG::Decorator ( const std::string & name,
const std::string & clsname,
const SG::AuxVarFlags flags )
protected

Constructor.

Parameters
nameName of this aux variable.
clsnameThe name of its associated class. May be blank.
flagsOptional flags qualifying the type. See AuxTypeRegistry.

The name -> auxid lookup is done here.

◆ decorKeyFromKey()

std::string SG::decorKeyFromKey ( const std::string & key,
const std::string & deflt )

Extract the decoration part of key.

Parameters
keyThe decoration handle key.

Given a key of the form CCC.DDD, returns the decoration part, DDD or deflt if no decoration key is found.

Definition at line 42 of file DecorKeyHelpers.cxx.

43{
44 std::string::size_type ipos = key.find ('.');
45 if (ipos == std::string::npos)
46 return deflt;
47 return key.substr (ipos+1, std::string::npos);
48}

◆ dumpBaseInfo()

void SG::dumpBaseInfo ( )

Definition at line 736 of file BaseInfo.cxx.

737{
738 BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
739 std::cout << "map:\n";
740 if (BaseInfoBaseImpl::s_bi_by_ti) {
741 std::vector<const std::type_info*> vv;
742 for (const auto& x : *BaseInfoBaseImpl::s_bi_by_ti)
743 vv.push_back (x.first);
744 std::sort (vv.begin(), vv.end());
745 for (const std::type_info* ti : vv)
746 {
747 const BaseInfoBase* bib = (*BaseInfoBaseImpl::s_bi_by_ti)[ti];
748 std::cout << ti << " " << bib->clid() << " [" << System::typeinfoName (*ti)
749 << "]\n";
750 }
751 }
752
753 std::cout << "\ninitlist:\n";
754 if (BaseInfoBaseImpl::s_init_list) {
755 for (const auto& x : *BaseInfoBaseImpl::s_init_list)
756 std::cout << x.first << " " << x.second << " ["
757 << System::typeinfoName (*x.first) << "]\n";
758 }
759}
The non-template portion of the BaseInfo implementation.
CLID clid() const
Return the CLID for this class.
Definition BaseInfo.cxx:141
virtual void lock() override
Lock the container.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
std::lock_guard< mutex_t > lock_t
Definition BaseInfo.cxx:101

◆ erase()

virtual void SG::erase ( )
finaloverridevirtual

Free all allocated elements and release memory back to the system.

All elements allocated are freed, and all allocated blocks of memory are released back to the system. destructor should be called on them if it was provided (preceded by clear if provided and mustClear was set).

◆ excAuxTypeMismatch_format()

std::string SG::excAuxTypeMismatch_format ( SG::auxid_t auxid,
const std::type_info & new_type,
const std::type_info & old_type,
const std::string & new_alloc_type,
const std::string & old_alloc_type )

Helper: format exception error string.

Definition at line 170 of file Control/AthContainers/Root/exceptions.cxx.

175{
176 std::ostringstream os;
177 os << "SG::ExcAuxTypeMismatch: "
178 << "Type mismatch for aux variable "
180 << "; old type is " << AthContainers_detail::typeinfoName (old_type)
181 << " new type is " << AthContainers_detail::typeinfoName (new_type);
182 if (old_alloc_type != new_alloc_type)
183 {
184 os << ". Old allocator type is " << old_alloc_type
185 << " new allocator type is " << new_alloc_type;
186 }
187 return os.str();
188}
std::string excFormatName(SG::auxid_t auxid)
Helper: format an aux data item name.

◆ excBadAuxVar_format()

std::string SG::excBadAuxVar_format ( SG::auxid_t auxid)

Helper: format exception error string.

Definition at line 90 of file Control/AthContainers/Root/exceptions.cxx.

91{
92 std::ostringstream os;
93 os << "SG::ExcBadAuxVar: "
94 << "Attempt to retrieve nonexistent aux data item "
96 << ".";
97 return os.str();
98}

◆ excBadContext_format()

std::string SG::excBadContext_format ( const EventContext & ctx,
const std::string & key )

Helper: format exception error string.

Definition at line 373 of file Control/StoreGate/src/exceptions.cxx.

376{
377 std::ostringstream os;
378 os << "SG::ExcBadContext: Bad EventContext extension while building ReadCondHandle. "
379 << "The EventContext extension is not "
380 << (ctx.hasExtension() ? "of type Atlas::ExtendedEventContext" : "set")
381 << " for key " << key << ".";
382 return os.str();
383}

◆ excBadDataProxyCast_format()

std::string SG::excBadDataProxyCast_format ( CLID id,
const std::type_info & tid )

Helper: Format exception string.

Definition at line 23 of file Control/SGTools/src/exceptions.cxx.

24{
25 std::ostringstream os;
26 os << "Bad cast of DataProxy with CLID " << id
27 << " to type " << System::typeinfoName (tid);
28 return os.str();
29}

◆ excBadDecorElement_format()

std::string SG::excBadDecorElement_format ( Gaudi::DataHandle::Mode mode,
CLID clid,
const std::string & decorKey )

Helper: format exception error string.

Definition at line 451 of file Control/StoreGate/src/exceptions.cxx.

454{
455 std::ostringstream os;
456 os << "SG::ExcBadDecorElement: ";
457 if (mode == Gaudi::DataHandle::Writer)
458 os << "Write";
459 else if (mode == Gaudi::DataHandle::Reader)
460 os << "Read";
461 else
462 os << "???";
463 os << "DecorHandle " << decorKey
464 << "[" << clid << "]"
465 << " given an element not in the requested container.";
466 return os.str();
467}

◆ excBadForwardLink_format()

std::string SG::excBadForwardLink_format ( size_t index,
size_t size,
const std::string & name )

Helper: format exception error string.

Definition at line 122 of file Control/AthLinks/src/exceptions.cxx.

123{
124 std::ostringstream os;
125 os << "SG::ExcBadForwardLink: "
126 << "ForwardIndexingPolicy: internal link state of '" << name << "' is invalid";
127 if (index != static_cast<size_t>(-1)) {
128 os << ": m_index = " << index
129 << " is >= data container size = "
130 << size << std::ends;
131 }
132 return os.str();
133}

◆ excBadThinning_format()

std::string SG::excBadThinning_format ( CLID clid,
const std::string & key,
SG::sgkey_t sgkey )

Helper: format exception error string.

Definition at line 313 of file Control/AthLinks/src/exceptions.cxx.

314{
315 std::ostringstream os;
316 os << "SG::ExcBadThinning: "
317 << "Bad thinning request "
318 << "[" << clid << "/" << key << "] (" << sgkey << ")";
319 return os.str();
320}

◆ excBadVarName_format()

std::string SG::excBadVarName_format ( const std::string & name)

Helper: format exception error string.

Definition at line 646 of file Control/AthContainers/Root/exceptions.cxx.

647{
648 std::ostringstream os;
649 os << "SG::ExcBadVarName: "
650 << "Bad name for auxiliary variable `" << name << "'. "
651 << "Variable and class names must consist of only digits, letters, "
652 << "and underscores, and cannot start with a digit. "
653 << "Variable names may not be empty, but class names may be.";
654 return os.str();
655}

◆ excCLIDMismatch_format()

std::string SG::excCLIDMismatch_format ( CLID obj_clid,
CLID link_clid )

Helper: format exception error string.

Definition at line 53 of file Control/AthLinks/src/exceptions.cxx.

54{
55 std::ostringstream os;
56 os << "SG::ExcCLIDMismatch: "
57 << "Attempt to set DataLink / ElementLink with CLID " << link_clid
58 << " to object with CLID " << obj_clid;
59 return os.str();
60}

◆ excConstAuxData_format()

std::string SG::excConstAuxData_format ( const std::string & op,
SG::auxid_t auxid )

Helper: format exception error string.

Definition at line 115 of file Control/AthContainers/Root/exceptions.cxx.

116{
117 std::ostringstream os;
118 os << "SG::ExcConstAuxData: "
119 << "Non-const operation `" << op << "' performed on const aux data "
121 << ".";
122 return os.str();
123}

◆ excConstObject_format()

std::string SG::excConstObject_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 138 of file Control/StoreGate/src/exceptions.cxx.

142{
143 std::ostringstream os;
144 os << "SG::ExcConstObject: "
145 << "Tried to retrieve non-const pointer to const object via VarHandleKey: "
146 << storename << "+" << sgkey << "[" << clid << "]";
147 return os.str();
148}

◆ excConstStorable_format()

std::string SG::excConstStorable_format ( CLID clid,
const std::string & key,
SG::sgkey_t sgkey )

Helper: format exception error string.

Definition at line 283 of file Control/AthLinks/src/exceptions.cxx.

284{
285 std::ostringstream os;
286 os << "SG::ExcConstStorable: "
287 << "Tried to retrieve const storable as a non-const pointer "
288 << "[" << clid << "/" << key << "] (" << sgkey << ")";
289 return os.str();
290}

◆ excDVToELV_format()

std::string SG::excDVToELV_format ( const std::string & detail)

Helper: format exception error string.

Definition at line 365 of file Control/AthContainers/Root/exceptions.cxx.

366{
367 std::ostringstream os;
368 os << "SG::ExcDVToELV: "
369 << "Can't convert DataVector to vector of ElementLinks: "
370 << detail;
371 return os.str();
372}

◆ excFlagMismatch_format()

std::string SG::excFlagMismatch_format ( SG::auxid_t auxid,
const std::type_info & type,
SG::AuxVarFlags existing_flags,
SG::AuxVarFlags requested_flags )

Helper: format exception error string.

Definition at line 484 of file Control/AthContainers/Root/exceptions.cxx.

488{
489 std::ostringstream os;
490 os << "SG::ExcFlagMismatch: "
491 << "Flag mismatch for aux variable "
493 << " of type " << AthContainers_detail::typeinfoName (type)
494 << " between existing " << excFormatFlags (existing_flags)
495 << " and requested " << excFormatFlags (requested_flags) << " flags. "
496 << "This may occur as a result of not using AtomicDecorator to access an atomic variable.";
497 return os.str();
498}
std::string excFormatFlags(SG::AuxVarFlags flags)
Helper: format flags.

◆ excFormatFlags()

std::string SG::excFormatFlags ( SG::AuxVarFlags flags)

Helper: format flags.

Definition at line 469 of file Control/AthContainers/Root/exceptions.cxx.

470{
471 std::string out;
472 if (flags & SG::AuxVarFlags::Atomic)
473 out = "atomic";
474 if (flags & SG::AuxVarFlags::Linked) {
475 if (!out.empty()) out += " ";
476 out = "linked";
477 }
478
479 return "[" + out + "]";
480}

◆ excFormatName()

std::string SG::excFormatName ( SG::auxid_t auxid)

Helper: format an aux data item name.

Definition at line 22 of file Control/AthContainers/Root/exceptions.cxx.

23{
24 std::ostringstream os;
25 if (auxid != null_auxid) {
27 os << "`" << r.getClassName (auxid);
28 if (!os.str().empty())
29 os << "::";
30 os << r.getName (auxid);
31 os << "' (" << auxid << ")";
32 }
33 else {
34 os << "(null)";
35 }
36 return os.str();
37}

◆ excHandleInitError_format()

std::string SG::excHandleInitError_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 68 of file Control/StoreGate/src/exceptions.cxx.

72{
73 std::ostringstream os;
74 os << "SG::ExcHandleInitError: "
75 << "Error initializing VarHandle from VarHandleKey: "
76 << storename << "+" << sgkey << "[" << clid << "]";
77 return os.str();
78}

◆ excInsertionInBaseClass_format()

std::string SG::excInsertionInBaseClass_format ( const char * op,
const std::type_info & base_type,
const std::type_info & complete_type )

Helper: format exception error string.

Definition at line 216 of file Control/AthContainers/Root/exceptions.cxx.

219{
220 std::ostringstream os;
221 os << "SG::ExcInsertionInBaseClass: "
222 << "Attempted to do " << op
223 << " on a " << AthContainers_detail::typeinfoName (base_type)
224 << " base class of " << AthContainers_detail::typeinfoName (complete_type)
225 << "; can only be done on the most-derived class.";
226 return os.str();
227}

◆ excInvalidLink_format()

std::string SG::excInvalidLink_format ( CLID clid,
const std::string & key,
SG::sgkey_t sgkey )

Helper: format exception error string.

Definition at line 80 of file Control/AthLinks/src/exceptions.cxx.

81{
82 std::ostringstream os;
83 os << "SG::ExcInvalidLink: "
84 << "Attempt to dereference invalid DataLink / ElementLink "
85 << "[" << clid << "/" << key << "] (" << sgkey << ")";
86 return os.str();
87}

◆ excInvalidThinningTarget_format()

std::string SG::excInvalidThinningTarget_format ( unsigned int clid,
const std::string & key )

Helper: format exception error string.

Definition at line 586 of file Control/AthContainers/Root/exceptions.cxx.

588{
589 std::ostringstream os;
590 os << "SG::ExcInvalidThinningTarget: "
591 << "ThinningHandle target does not exist: "
592 << clid << "/" << key;
593 return os.str();
594}

◆ excJaggedVecOverlappingCopy_format()

std::string SG::excJaggedVecOverlappingCopy_format ( )

Helper: format exception error string.

Definition at line 672 of file Control/AthContainers/Root/exceptions.cxx.

673{
674 return "SG::ExcJaggedVecOverlappingCopy: Overlapping copies not implemented for jagged vectors. Talk to core software if this is an issue.";
675}

◆ excLinkMismatch_format()

std::string SG::excLinkMismatch_format ( SG::auxid_t auxid,
const std::type_info & type,
SG::auxid_t existing_linked_id,
SG::auxid_t requested_linked_id )

Helper: format exception error string.

Definition at line 521 of file Control/AthContainers/Root/exceptions.cxx.

525{
526 std::ostringstream os;
527 os << "SG::ExcLinkMismatch: "
528 << "Linked variable mismatch for aux variable "
530 << " of type " << AthContainers_detail::typeinfoName (type)
531 << " between existing " << excFormatName (existing_linked_id)
532 << " and requested " << excFormatName (requested_linked_id) << " linked variables.";
533 return os.str();
534}

◆ excNoAuxStore_format() [1/2]

std::string SG::excNoAuxStore_format ( const char * op)

Helper: format exception error string.

Definition at line 56 of file Control/AthContainers/Root/exceptions.cxx.

57{
58 std::ostringstream os;
59 os << "SG::ExcNoAuxStore: "
60 << "Operation attempted on container with no associated aux data store: ";
61 os << op;
62 return os.str();
63}

◆ excNoAuxStore_format() [2/2]

std::string SG::excNoAuxStore_format ( SG::auxid_t auxid)

Helper: format exception error string.

Definition at line 44 of file Control/AthContainers/Root/exceptions.cxx.

45{
46 std::ostringstream os;
47 os << "SG::ExcNoAuxStore: "
48 << "Requested aux data item "
50 << " but there is no associated aux data store.";
51 return os.str();
52}

◆ excNoCondCont_format()

std::string SG::excNoCondCont_format ( const std::string & key,
const std::string & why )

Helper: format exception error string.

Definition at line 401 of file Control/StoreGate/src/exceptions.cxx.

404{
405 std::ostringstream os;
406 os << "SG::ExcNoCondCont: Can't retrieve CondCont from ReadCondHandle for key "
407 << key << ". " << why;
408 return os.str();
409}

◆ excNoLinkedVar_format()

std::string SG::excNoLinkedVar_format ( SG::auxid_t auxid,
const std::type_info & type )

Helper: format exception error string.

Definition at line 558 of file Control/AthContainers/Root/exceptions.cxx.

560{
561 std::ostringstream os;
562 os << "SG::ExcNoLinkedVar: "
563 << "Linked variable not found for aux variable "
565 << " of type " << AthContainers_detail::typeinfoName (type);
566 return os.str();
567}

◆ excNonConstHandleKey_format()

std::string SG::excNonConstHandleKey_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 304 of file Control/StoreGate/src/exceptions.cxx.

308{
309 std::ostringstream os;
310 os << "SG::ExcNonConstHandleKey: "
311 << "Attempt to get non-const VarHandleKey from non-owning VarHandle: "
312 << storename << "+" << sgkey << "[" << clid << "]";
313 return os.str();
314}

◆ excNullReadHandle_format()

std::string SG::excNullReadHandle_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 214 of file Control/StoreGate/src/exceptions.cxx.

218{
219 std::ostringstream os;
220 os << "SG::ExcNullReadHandle: "
221 << "Dereference of read handle failed: "
222 << storename << "+" << sgkey << "[" << clid << "]";
223 return os.str();
224}

◆ excNullUpdateHandle_format()

std::string SG::excNullUpdateHandle_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 259 of file Control/StoreGate/src/exceptions.cxx.

263{
264 std::ostringstream os;
265 os << "SG::ExcNullUpdateHandle: "
266 << "Dereference of update handle failed: "
267 << storename << "+" << sgkey << "[" << clid << "]";
268 return os.str();
269}

◆ excNullWriteHandle_format()

std::string SG::excNullWriteHandle_format ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Helper: format exception error string.

Definition at line 169 of file Control/StoreGate/src/exceptions.cxx.

173{
174 std::ostringstream os;
175 os << "SG::ExcNullWriteHandle: "
176 << "Attempt to dereference write handle before record: "
177 << storename << "+" << sgkey << "[" << clid << "]";
178 return os.str();
179}

◆ excPointerNotInSG_format()

std::string SG::excPointerNotInSG_format ( const void * pointer)

Helper: format exception error string.

Definition at line 28 of file Control/AthLinks/src/exceptions.cxx.

29{
30 std::ostringstream os;
31 os << "SG::ExcPointerNotInSG: "
32 << "The object referenced by a DataLink / ElementLink is not registered "
33 << "in StoreGate: " << pointer << ".";
34 return os.str();
35}

◆ excProtection_format()

std::string SG::excProtection_format ( int errnum)

Definition at line 34 of file Control/AthAllocators/src/exceptions.cxx.

35{
36 std::ostringstream os;
37 os << "SG::ExcProtection: Attempt to change memory protection failed: ";
38 char errbuf[256];
39#ifdef _GNU_SOURCE
40 os << strerror_r (errnum, errbuf, sizeof(errbuf));
41#else
42 strerror_r (errnum, errbuf, sizeof(errbuf));
43 os << errbuf;
44#endif
45 return os.str();
46}

◆ excProxyCollision_format()

std::string SG::excProxyCollision_format ( CLID id,
const std::string & key,
CLID primary_id,
const std::string & primary_key )

Helper: Format exception string.

Definition at line 67 of file Control/SGTools/src/exceptions.cxx.

71{
72 std::ostringstream os;
73 os << "ExcProxyCollision: proxy collision for clid/key "
74 << id << " / " << key
75 << " (primary " << primary_id << " / " << primary_key << ").";
76 return os.str();
77}

◆ excSgkeyCollision_format()

std::string SG::excSgkeyCollision_format ( const std::string & new_key,
CLID new_clid,
const std::string & old_key,
CLID old_clid,
sgkey_t sgkey )

Helper: Format exception string.

Definition at line 103 of file Control/SGTools/src/exceptions.cxx.

108{
109 std::ostringstream os;
110 os << "ExcSgkeyCollision: sgkey hash collision; new key: "
111 << new_key << "/" << new_clid << " and existing key: "
112 << old_key << "/" << old_clid << " both hash to " << sgkey;
113 return os.str();
114}

◆ excStoreLocked_format() [1/2]

std::string SG::excStoreLocked_format ( const char * op)

Helper: format exception error string.

Definition at line 262 of file Control/AthContainers/Root/exceptions.cxx.

263{
264 std::ostringstream os;
265 os << "SG::ExcStoreLocked: "
266 << "Attempted to modify auxiliary data in a locked store: ";
267 os << op;
268 return os.str();
269}

◆ excStoreLocked_format() [2/2]

std::string SG::excStoreLocked_format ( SG::auxid_t auxid)

Helper: format exception error string.

Definition at line 251 of file Control/AthContainers/Root/exceptions.cxx.

252{
253 std::ostringstream os;
254 os << "SG::ExcStoreLocked: "
255 << "Attempted to modify auxiliary data in a locked store: ";
256 os << excFormatName (auxid);
257 return os.str();
258}

◆ excUninitKey_format()

std::string SG::excUninitKey_format ( CLID clid,
const std::string & sgkey,
const std::string & storename,
const std::string & holdername,
const std::string & htype )

Helper: format exception error string.

Definition at line 99 of file Control/StoreGate/src/exceptions.cxx.

105{
106 std::ostringstream os;
107 os << "SG::ExcUninitKey: "
108 << "Error initializing " << htype << " from uninitialized " << htype << "Key: "
109 << storename << "+" << sgkey << "[" << clid << "]; "
110 << "keys should be initialized in your initialize().";
111 if ( holdername.size() ) os << " Key held by " << holdername << ".";
112 return os.str();
113}

◆ excUnknownAuxItem_format()

std::string SG::excUnknownAuxItem_format ( const std::string & name,
const std::string & clsname,
const std::type_info * typ )

Helper: format exception error string.

Definition at line 317 of file Control/AthContainers/Root/exceptions.cxx.

320{
321 std::ostringstream os;
322 os << "SG::ExcUnknownAuxItem: "
323 << "Unknown aux data item ";
324 if (!clsname.empty())
325 os << clsname << "::";
326 os << name;
327 if (typ)
328 os << " (of type " << AthContainers_detail::typeinfoName (*typ) << ")";
329 return os.str();
330}

◆ findInContainer() [1/4]

template<>
bool SG::findInContainer ( const CaloCellContainer & data,
CaloCell const *const & element,
CaloCellContainer::size_type & index )

Definition at line 676 of file CaloCellContainer.cxx.

679{
680 int ndx = data.findIndex (element->caloDDE()->calo_hash());
681 if (ndx >= 0) {
682 index = ndx;
683 return true;
684 }
685 return false;
686}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ findInContainer() [2/4]

template<>
bool SG::findInContainer ( const CaloCellContainer & data,
CaloCell const *const & element,
CaloCellContainer::size_type & index )

Definition at line 676 of file CaloCellContainer.cxx.

679{
680 int ndx = data.findIndex (element->caloDDE()->calo_hash());
681 if (ndx >= 0) {
682 index = ndx;
683 return true;
684 }
685 return false;
686}

◆ findInContainer() [3/4]

template<>
bool SG::findInContainer ( const CaloConstCellContainer & data,
CaloCell const *const & element,
CaloConstCellContainer::size_type & index )
inline

Definition at line 211 of file CaloConstCellContainer.h.

214{
215 return SG::findInContainer (*data.asDataVector(), element, index);
216}
bool findInContainer(const CaloCellContainer &data, CaloCell const *const &element, CaloCellContainer::size_type &index)

◆ findInContainer() [4/4]

template<typename CONT, typename ELT>
bool SG::findInContainer ( const CONT & data,
const ELT & element,
typename CONT::size_type & index )

Find the index of an object within a container.

Parameters
dataThe container to search.
elementThe element for which to search.
[out]indexThe found index of the element.
Returns
true if the element was found; false otherwise.

By default, this function will do an exhaustive search through the container to find the element. However, this function may be specialized if this can be done more efficiently for some specific container.

Definition at line 37 of file findInContainer.h.

40{
41 typedef typename CONT::const_iterator const_iterator;
42 const_iterator end = data.end();
43 index = 0;
44 for (const_iterator it = data.begin(); it != end; ++it) {
45 if (*it == element) return true;
46 ++index;
47 }
48 return false;
49}
void const_iterator

◆ free()

void SG::free ( pointer p)

Free an element.

Parameters
pThe element to be freed.

clear() will be called on the element at this point, if it has been defined.

◆ fromStorable() [1/2]

void * SG::fromStorable ( DataObject * pDObj,
CLID clid,
const std::type_info * tinfo = nullptr,
bool quiet = false,
IRegisterTransient * irt = 0,
bool isConst = true )

Try to get the pointer back from a DataObject, converted to be of type clid.

Parameters
pDObjThe DataObject.
clidThe ID of the class to which to convert.
tinfotype_info for the object being converted (optional).
quietIf true, suppress warning messages.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Only works if the DataObject is a DataBucket. Returns 0 on failure,

Definition at line 35 of file StorableConversions.cxx.

40{
41 //check inputs
42 if (0 == pDObj) {
43 MsgStream gLog(Athena::getMessageSvc(), "SG::fromStorable");
44 gLog << MSG::WARNING << "null input pointer " << endmsg;
45 return nullptr;
46 }
47
48 // get T* from DataBucket:
49 // All objects in the event store nowadays are instances
50 // of DataBucket, so just do a static_cast.
51 DataBucketBase* b = static_cast<DataBucketBase*>(pDObj);
52 // Use BaseInfo information to convert pointers.
53
54 void* ret = nullptr;
55 if (tinfo)
56 ret = b->cast (clid, *tinfo, irt, isConst);
57 else
58 ret = b->cast (clid, irt, isConst);
59 if (!quiet && !ret) {
60 const std::type_info* tid = CLIDRegistry::CLIDToTypeinfo (clid);
61 MsgStream gLog(Athena::getMessageSvc(), "SG::fromStorable");
62 gLog << MSG::WARNING
63 << "can't convert stored DataObject " << pDObj
64 << " to type ("
65 << (tid ? System::typeinfoName (*tid) : "[unknown]")
66 << ")\n Unless you are following a symlink,"
67 << " it probably means you have a duplicate "
68 << "CLID = " << pDObj->clID()
69 << endmsg;
70 }
71 return ret;
72}
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
A non-templated base class for DataBucket, allows to access the transient object address as a void*.

◆ fromStorable() [2/2]

template<typename T>
bool SG::fromStorable ( DataObject * pDObj,
T *& pTrans,
bool quiet = false,
IRegisterTransient * irt = 0,
bool isConst = true )

Definition at line 169 of file StorableConversions.h.

173 {
174 typedef typename std::remove_const<T>::type T_nc;
176
177 pTrans = static_cast<T*> (fromStorable (pDObj, ClassID_traits<T_nc>::ID(),
178 &typeid(T_nc),
179 quiet, irt, isConst));
180 return pTrans != nullptr;
181}
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)

◆ get() [1/5]

template<class T>
const T * SG::get ( const ReadCondHandleKey< T > & key,
const EventContext & ctx )

Convenience function to retrieve an object given a ReadCondHandleKey.

Parameters
keyThe key to retrieve.
ctxThe event context.

Returns the object. Returns nullptr if the key is null or if there's an error.

Definition at line 282 of file ReadCondHandle.h.

284 {
285 if (key.key().empty()) return nullptr;
286 try {
287 ReadCondHandle<T> h (key, ctx);
288 return h.cptr();
289 }
290 catch (SG::ExcNoCondCont&) {
291 return nullptr;
292 }
293 }
Header file for AthHistogramAlgorithm.
Exception — Can't retrieve CondCont from ReadCondHandle.

◆ get() [2/5]

template<class T>
const T * SG::get ( const ReadHandleKey< T > & key)

Convenience function to retrieve an object given a ReadHandleKey.

Parameters
keyThe key to retrieve.

Returns the object. Returns nullptr if the key is null or if there's an error.

◆ get() [3/5]

template<class T>
const T * SG::get ( const ReadHandleKey< T > & key,
const EventContext & ctx )

Convenience function to retrieve an object given a ReadHandleKey.

Parameters
keyThe key to retrieve.
ctxThe event context.

Returns the object. Returns nullptr if the key is null or if there's an error.

◆ get() [4/5]

template<class T>
StatusCode SG::get ( const T *& ptr,
const ReadCondHandleKey< T > & key,
const EventContext & ctx )

Convenience function to retrieve an object given a ReadCondHandleKey.

Parameters
ptrPointer to the retrieved object.
keyThe key to retrieve.

In case of error, sets ptr to nullptr and returns FAILURE. In case of an empty key, sets ptr to nullptr and returns SUCCESS.

Definition at line 305 of file ReadCondHandle.h.

308 {
309 ptr = get(key, ctx);
310 return (ptr || key.empty()) ? StatusCode::SUCCESS : StatusCode::FAILURE;
311 }
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.

◆ get() [5/5]

template<class T>
StatusCode SG::get ( const T *& ptr,
const ReadHandleKey< T > & key,
const EventContext & ctx )

Convenience function to retrieve an object given a ReadHandleKey.

Parameters
ptrPointer to the retrieved object.
keyThe key to retrieve.

In case of error, sets ptr to nullptr and returns FAILURE. In case of an empty key, sets ptr to nullptr and returns SUCCESS.

◆ getAuxIDs()

const SG::auxid_set_t & SG::getAuxIDs ( ) const
override

Return a set of identifiers for existing data items for this object.

Return a set of identifiers for existing data items in this store.

If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.

This should include identifiers for all items, const and non-const.

◆ getClassIfDictionaryExists()

TClass * SG::getClassIfDictionaryExists ( const std::string & cname)

Look up a TClass given a name.

Try to avoid autoparsing.

Parameters
cnameName of the class to find.

Definition at line 27 of file getDynamicAuxID.cxx.

28{
29 if (TClass* cl = (TClass*)gROOT->GetListOfClasses()->FindObject(cname.c_str())) {
30 if (cl->IsLoaded() && cl->HasDictionary()) return cl;
31 return nullptr;
32 }
33
34 // The idea of calling GetClassSharedLibs was to test if a class was
35 // listed in the rootmap file, so we could avoid autoparsing.
36 // This worked with older versions of root 6.
37 // But now root has started doing dynamic linking itself,
38 // and GetClassSharedLibs will itself trigger autoparsing.
39 // So currently, this test does more harm than good.
40 // Still need to see if we can find a reliable way of failing
41 // a TClass lookup rather than triggering autoparsing.
42 //if (gInterpreter->GetClassSharedLibs (cname.c_str()))
43 {
44 TClass* cl = TClass::GetClass (cname.c_str());
45 if (cl->HasDictionary())
46 return cl;
47 }
48 return nullptr;
49}

◆ getConstStore()

const SG::IConstAuxStore * SG::getConstStore ( ) const

Return the current store, as a const interface.

This will be non-zero if either a const or non-const store is associated with this object. This will fetch either a private or standalone store.

◆ getCopyIDs() [1/2]

SG::auxid_set_t SG::getCopyIDs ( bool warnUnlocked = false) const
overridevirtual

Return the set of variables to copy in a deep copy.

Parameters
warnUnlockedIf true, we warn about variables skipped on account of being decorations.

This is getAuxIDs()-getDecorIDs().

Parameters
warnUnlockedIf true, we warn about variables skipped on account of being decorations.

Usually this will be getAuxIDs()-getDecorIDs(), but can be different for special cases (such as shallow copies).

◆ getCopyIDs() [2/2]

SG::auxid_set_t SG::getCopyIDs ( const SG::auxid_set_t & auxids,
const SG::auxid_set_t & decors,
bool warnUnlocked,
std::span< const std::string > noWarn )
private

Compute the set of variables to copy in a deep copy.

Parameters
auxidsSet of all variables.
decorsSet of decorations.
warnUnlockedIf true, we warn about variables skipped on account of being decorations.
noWarnNames of variables for which we should not issue such warnings.

Returns auxids - decors.

Definition at line 879 of file AuxStoreInternal.cxx.

883{
884 SG::auxid_set_t out = auxids;
885#ifndef XAOD_STANDALONE
886 if (warnUnlocked) {
888 for (SG::auxid_t decor : decors) {
889 if (out.test (decor)) {
890 out.reset (decor);
891 if (std::ranges::find (noWarn, r.getName (decor)) == noWarn.end()) {
892 std::ostringstream ss;
893 ss << "skipped unlocked decoration during copy " << r.getName(decor)
894 << " (" << decor << ")";
895 ATHCONTAINERS_WARNING("getCopyAuxIDs", ss.str());
896 }
897 }
898 }
899 }
900 else
901#endif
902 out -= decors;
903 return out;
904}
static Double_t ss
#define ATHCONTAINERS_WARNING(ctx, msg)
Definition error.h:57

◆ getData() [1/2]

const void * SG::getData ( SG::auxid_t auxid) const
overridevirtual

Return the data vector for one aux data item.

Interface for const operations on an auxiliary store.

Parameters
auxidThe identifier of the desired aux data item.

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

This should return nullptr if the item doesn't exist.

A DataVector may have auxiliary data associated with it. These data are kept in separate AuxStore objects; this defines the interface for const operations on such a store.

An AuxStore may store a number of different aux data items; these are identified by an integer of type auxid_t. Each item is stored as a vector with one entry per entry in the containing DataVector.

This interface provides methods for getting a const pointer to an existing vector of aux data items and for getting the set of existing aux data items.

In addition, sometimes we want to add additional auxiliary data to an existing, const container; this is called `decorating' it. For example, we retrieve a const container from StoreGate, run some algorithm on it, and attach additional data to the object that can be accessed by downstream algorithms or written to a file. To support this, we add the getDecoration operation, as well as lock and clearDecorations. When the object is first being filled, it is unlocked. It gets locked when StoreGateSvc::setConst is called on it. From then on, we can only create decorations. Calling clearDecorations will restore the state back to where it was when lock was called. (Be sure that the container's cache also gets cleared.)

getDecoration then works as follows:

  • If the item doesn't exist, then it will be created. If the container is locked, then the new item will be marked as a decoration.
  • If the item already exists, then we allow access only if either the container is not locked or the item is marked as a decoration. */ class IConstAuxStore { public: / Destructor. virtual ~IConstAuxStore() = default;

/**

Return the data vector for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

This should return nullptr if the item doesn't exist.

◆ getData() [2/2]

virtual void * SG::getData ( SG::auxid_t auxid,
size_t size,
size_t capacity )
overridevirtual

Return the data vector for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.
sizeThe current size of the container (in case the data item does not already exist).
capacityThe current capacity of the container (in case the data item does not already exist).

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

If the data item does not exist, it should be created and initialized to default values. size and capacity give the size for the new aux data item vector.

◆ getDataArray()

const_container_pointer_type SG::getDataArray ( const AuxVectorData & container) const

Get a pointer to the start of the auxiliary data array.

Parameters
containerThe container from which to fetch the variable.

◆ getDataInternal()

void * SG::AuxStoreInternal::getDataInternal ( SG::auxid_t auxid,
size_t size,
size_t capacity,
bool no_lock_check )
protectedvirtual

Return the data vector for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.
sizeThe current size of the container (in case the data item does not already exist).
capacityThe current capacity of the container (in case the data item does not already exist).
no_lock_checkIf true, then skip the test for a locked container.

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

If the data item does not exist, it should be created and initialized to default values. size and capacity give the size for the new aux data item vector.

Definition at line 763 of file AuxStoreInternal.cxx.

767{
768 guard_t guard (m_mutex);
769 return getVectorInternal_noLock (auxid, size, capacity, no_lock_check)->toPtr();
770}
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
virtual IAuxTypeVector * getVectorInternal_noLock(SG::auxid_t auxid, size_t size, size_t capacity, bool no_lock_check)
Implementation of getVectorInternal; no locking.

◆ getDataLinkArray()

const DLink_t * SG::getDataLinkArray ( const AuxVectorData & container) const

Get a pointer to the start of the linked array of DataLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getDataLinkDecorArray()

DLink_t * SG::getDataLinkDecorArray ( const AuxVectorData & container) const

Get a pointer to the start of the linked array of DataLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.

◆ getDataLinkDecorSpan()

DataLink_span SG::getDataLinkDecorSpan ( const AuxVectorData & container) const

Get a span over the array of DataLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getDataLinkSpan()

const_DataLink_span SG::getDataLinkSpan ( const AuxVectorData & container) const

Get a span over the array of DataLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getDataSpan()

const_span SG::getDataSpan ( const AuxVectorData & container) const

Get a span over the auxiliary data array.

Get a span over spans of ElementLinks.

Get a span of ElementLinks.

Get a span over spans representing the jagged vector.

Parameters
containerThe container from which to fetch the variable.

◆ getDecoration()

void * SG::getDecoration ( auxid_t auxid,
size_t size,
size_t capacity )
overridevirtual

Return the data vector for one aux data decoration item.

Parameters
auxidThe identifier of the desired aux data item.
sizeThe current size of the container (in case the data item does not already exist).
capacityThe current capacity of the container (in case the data item does not already exist).

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

If the data item does not exist, it then it will be created and initialized with default values. If the container is locked, then the new item will be marked as a decoration. size and capacity give the size for the new aux data item vector.

If the data item already exists, then we return it if either the container is not locked or the item is marked as a decoration. Otherwise we throw an exception.

◆ getDecorationArray()

container_pointer_type SG::getDecorationArray ( const AuxVectorData & container) const

Get a pointer to the start of the auxiliary data array.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getDecorationSpan()

span SG::getDecorationSpan ( const AuxVectorData & container) const

Get a span over the auxiliary data array.

Get a span over spans of ElementLink proxies, as a decoration.

Get a span of ElementLink proxies, as a decoration.

Get a span over spans representing the jagged vector, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.

The proxies may be converted to or assigned from ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.

The individual proxies may be converted to or assigned from ElementLink. Each element may also be assigned from a range of ElementLink, or converted to a vector of ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getDecorIDs()

const SG::auxid_set_t & SG::getDecorIDs ( ) const
override

Return a set of identifiers for decorations for this object.

Return a set of identifiers for decorations in this store.

   If this object has a private or standalone store, then information
   from that will be returned.  Otherwise, if this element
   is part of a container, then information for the container
   will be returned.  Otherwise, return an empty set.

◆ getDynamicAuxID()

SG::auxid_t SG::getDynamicAuxID ( const std::type_info & ti,
const std::string & name,
const std::string & elementTypeName,
const std::string & branchTypeName,
bool standalone,
SG::auxid_t linked_auxid )

Find the auxid for a dynamic branch.

Parameters
tiType of the auxiliary variable. Usually the type of the vector payload, but if standalone is true, then this is the type of the stored object.
nameAuxiliary variable name.
elementTypeNameName of the type for one aux data element. Should be the same as branchTypeName if standalone is true.
branchTypeNameName of the type for this branch.
standaloneTrue if this is a standalone object.

Definition at line 64 of file getDynamicAuxID.cxx.

70{
73
74 SG::AuxVarFlags flags = SG::AuxVarFlags::SkipNameCheck;
76 flags |= SG::AuxVarFlags::Linked;
77 }
78
79 auxid = r.getAuxID (ti, name, "", flags, linked_auxid);
80 if (auxid != SG::null_auxid) return auxid;
81
82 // Be careful --- if we don't exactly match the name
83 // in TClassTable, then we may trigger autoparsing. Besides the
84 // resource usage that implies, that can lead to crashes in dbg
85 // builds due to cling bugs.
86 std::string tn = elementTypeName;
87 if (tn.starts_with("std::vector<"))
88 tn.erase (0, 5);
89 std::string fac_class_name = "SG::AuxTypeVectorFactory<" +
90 tn + ",allocator<" + tn;
91 if (fac_class_name[fac_class_name.size()-1] == '>')
92 fac_class_name += ' ';
93 fac_class_name += "> >";
94 TClass* fac_class = getClassIfDictionaryExists (fac_class_name);
95 if (fac_class)
96 {
97 TClass* base_class = getClassIfDictionaryExists ("SG::IAuxTypeVectorFactory");
98 if (base_class) {
99 int offs = fac_class->GetBaseClassOffset (base_class);
100 if (offs >= 0) {
101 void* fac_vp = fac_class->New();
102 if (fac_vp) {
103 SG::IAuxTypeVectorFactory* fac = reinterpret_cast<SG::IAuxTypeVectorFactory*> (reinterpret_cast<unsigned long>(fac_vp) + offs);
104 const std::type_info* tiAlloc = fac->tiAlloc();
105 r.addFactory (ti, *tiAlloc, std::unique_ptr<SG::IAuxTypeVectorFactory> (fac));
106 auxid = r.getAuxID(*fac->tiAlloc(), ti, name, "", flags, linked_auxid);
107 }
108 }
109 }
110 }
111
112 if (auxid == SG::null_auxid) {
113 if (linked_auxid != SG::null_auxid) {
114 errorcheck::ReportMessage msg (MSG::INFO, ERRORCHECK_ARGS, "getDynamicAuxID");
115 msg << "dynamic ROOT vector factory not implemented for linked types: "
116 << name << " " << branchTypeName << "\n";
117 return SG::null_auxid;
118 }
119
120 std::string vec_name = branchTypeName;
121 if (standalone) {
122 vec_name = "std::vector<" + branchTypeName;
123 if (vec_name[vec_name.size()-1] == '>')
124 vec_name += " ";
125 vec_name += ">";
126 }
127 TClass* vec_class = TClass::GetClass (vec_name.c_str());
128
129 if (vec_class) {
130 auto facp = std::make_unique<SG::RootAuxVectorFactory> (vec_class);
131 std::string tiAllocName = facp->tiAllocName();
132 (void)r.addFactory (ti, tiAllocName, std::move (facp));
133 auxid = r.getAuxID(tiAllocName, ti, name, "", flags);
134 }
135 }
136
137 return auxid;
138}
static bool isLinkedName(const std::string &name)
Test if a variable name corresponds to a linked variable.
Interface for factory objects that create vectors.
virtual const std::type_info * tiAlloc() const =0
Return the type_info of the vector allocator.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
Definition AuxTypes.h:58
TClass * getClassIfDictionaryExists(const std::string &cname)
Look up a TClass given a name.
MsgStream & msg
Definition testRead.cxx:32

◆ getDynamicAuxIDs()

virtual const SG::auxid_set_t & SG::getDynamicAuxIDs ( ) const
overridevirtual

Get the list of all variables that need to be handled.

◆ getEltArray()

const Elt_t * SG::getEltArray ( const AuxVectorData & container) const

Get a pointer to the start of the array of JaggedVecElt objects.

Parameters
containerThe container from which to fetch the variable.

◆ getEltDecorArray()

Elt_t * SG::getEltDecorArray ( const AuxVectorData & container) const

Get a pointer to the start of the array of JaggedVecElt objects, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getEltDecorSpan()

Elt_span SG::getEltDecorSpan ( const AuxVectorData & container) const

Get a span over the array of JaggedVecElt objects, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getEltSpan()

const_Elt_span SG::getEltSpan ( const AuxVectorData & container) const

Get a span over the array of JaggedVecElt objects.

Parameters
containerThe container from which to fetch the variable.

◆ getIOData()

virtual const void * SG::getIOData ( SG::auxid_t auxid) const
overridevirtual

Return a pointer to the data to be stored for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.

This will usually be a pointer to a std::vector; however, it may be something different for a standalone object.

Returns 0 and reports an error if the requested aux data item does not exist.

◆ getIODataInternal()

void * SG::AuxStoreInternal::getIODataInternal ( auxid_t auxid,
bool quiet ) const
protected

Return a pointer to the data to be stored for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.
quietIf true, then don't print an error on failure.

This will usually be a pointer to a std::vector; however, it may be something different for a standalone object.

Returns 0 and reports an error if the requested aux data item does not exist.

Definition at line 478 of file AuxStoreInternal.cxx.

479{
480 guard_t guard (m_mutex);
481 if (auxid >= m_vecs.size() || !m_vecs[auxid]) {
482 if (!quiet) {
483 std::ostringstream ss;
484 ss << "Requested variable "
486 << " (" << auxid << ") doesn't exist";
487 ATHCONTAINERS_ERROR("AuxStoreInternal::getIODataInternal", ss.str());
488 }
489 return 0;
490 }
491
492 if (m_standalone) {
493 if (!SG::AuxTypeRegistry::instance().isLinked (auxid))
494 return m_vecs[auxid]->toPtr();
495 }
496 return m_vecs[auxid]->toVector();
497}
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
#define ATHCONTAINERS_ERROR(ctx, msg)
Definition error.h:54

◆ getIOType()

virtual const std::type_info * SG::getIOType ( SG::auxid_t auxid) const
overridevirtual

Return the type of the data to be stored for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.

For an aux data item of type T, this will usually be std::vector<T>. For standalone objects, however, it will usually be T; and std::vector<char> will be used instead of std::vector<bool>.

Returns 0 if the requested aux data item does not exist.

◆ getNSlots()

size_t SG::getNSlots ( )

Return the number of event slots.

Calls getNSlots_once the first time we're called and caches the result.

Definition at line 64 of file SlotSpecificObj.cxx.

65{
66 const static size_t nslots = getNSlots_once();
67 return nslots;
68}
size_t getNSlots_once()
Return the number of event slots.

◆ getNSlots_once()

size_t SG::getNSlots_once ( )

Return the number of event slots.

This accesses the IHiveWhiteBoard service to find the number of slots.

Definition at line 46 of file SlotSpecificObj.cxx.

47{
48 ServiceHandle<IInterface> svc (getNSlots_hiveMgrName, "getNSlots_once");
49 if (!svc.retrieve().isSuccess())
50 return 1;
51 IHiveWhiteBoard* hivesvc = dynamic_cast<IHiveWhiteBoard*> (svc.get());
52 if (!hivesvc) return 1;
53 unsigned int nslots = hivesvc->getNumberOfStores();
54 if (nslots < 1) return 1;
55 return nslots;
56}

◆ getPackedLinkArray()

const PLink_t * SG::getPackedLinkArray ( const AuxVectorData & container) const

Get a pointer to the start of the array of PackedLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getPackedLinkDecorArray()

PLink_t * SG::getPackedLinkDecorArray ( const AuxVectorData & container) const

Get a pointer to the start of the array of PackedLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPackedLinkDecorSpan() [1/3]

PackedLink_span SG::getPackedLinkDecorSpan ( const AuxVectorData & container) const

Get a span over the array of PackedLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPackedLinkDecorSpan() [2/3]

PackedLink_span SG::getPackedLinkDecorSpan ( const AuxVectorData & container,
size_t index ) const
protected

Get a span over the vector of PackedLinks for a given element, as a decoration.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPackedLinkDecorSpan() [3/3]

template<IsConstAuxElement ELT>
PackedLink_span SG::getPackedLinkDecorSpan ( const ELT & e) const
protected

Get a span over the vector of PackedLinks for a given element, as a decoration.

Parameters
eThe element for which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPackedLinkSpan() [1/4]

PackedLink_span SG::getPackedLinkSpan ( AuxVectorData & container,
size_t index ) const
protected

Get a span over the vector of PackedLinks for a given element.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

◆ getPackedLinkSpan() [2/4]

const_PackedLink_span SG::getPackedLinkSpan ( const AuxVectorData & container) const

Get a span over the array of PackedLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getPackedLinkSpan() [3/4]

const_PackedLink_span SG::getPackedLinkSpan ( const AuxVectorData & container,
size_t index ) const
protected

Get a span over the vector of PackedLinks for a given element.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

◆ getPackedLinkSpan() [4/4]

template<IsConstAuxElement ELT>
const_PackedLink_span SG::getPackedLinkSpan ( const ELT & e) const
protected

Get a span over the vector of PackedLinks for a given element.

Parameters
eThe element for which to fetch the variable.

◆ getPackedLinkVectorArray()

const VElt_t * SG::getPackedLinkVectorArray ( const AuxVectorData & container) const
protected

Get a pointer to the start of the array of vectors of PackedLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getPackedLinkVectorDecorArray()

VElt_t * SG::getPackedLinkVectorDecorArray ( const AuxVectorData & container) const
protected

Get a pointer to the start of the array of vectors of PackedLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

◆ getPackedLinkVectorDecorSpan()

PackedLinkVector_span SG::getPackedLinkVectorDecorSpan ( const AuxVectorData & container) const
protected

Get a span over the vectors of PackedLinks, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPackedLinkVectorSpan()

const_PackedLinkVector_span SG::getPackedLinkVectorSpan ( const AuxVectorData & container) const
protected

Get a span over the vectors of PackedLinks.

Parameters
containerThe container from which to fetch the variable.

◆ getPayloadArray()

const Payload_t * SG::getPayloadArray ( const AuxVectorData & container) const

Get a pointer to the start of the payload array.

Parameters
containerThe container from which to fetch the variable.

◆ getPayloadDecorArray()

Payload_t * SG::getPayloadDecorArray ( const AuxVectorData & container) const

Get a pointer to the start of the payload array, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPayloadDecorSpan()

Payload_span SG::getPayloadDecorSpan ( const AuxVectorData & container) const

Get a span over the payload vector, as a decoration.

Parameters
containerThe container from which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ getPayloadSpan()

const_Payload_span SG::getPayloadSpan ( const AuxVectorData & container) const

Get a span over the payload vector.

Parameters
containerThe container from which to fetch the variable.

◆ getStore()

SG::IAuxStore * SG::getStore ( ) const

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object. This will fetch either a private or standalone store.

◆ getThinningCache() [1/2]

const SG::ThinningCache * SG::getThinningCache ( )

Retrieve the current thinning cache from the current event context.

Returns nullptr if there is no current thinning cache.

Definition at line 41 of file getThinningCache.cxx.

42{
43 return getThinningCache (Gaudi::Hive::currentContext());
44}
const SG::ThinningCache * getThinningCache()
Retrieve the current thinning cache from the current event context.

◆ getThinningCache() [2/2]

const SG::ThinningCache * SG::getThinningCache ( const EventContext & ctx)

Retrieve the current thinning cache from the event context.

ctx Event context.

Returns nullptr if there is no current thinning cache.

Definition at line 28 of file getThinningCache.cxx.

29{
30 if (ctx.hasExtension()) {
32 }
33 return nullptr;
34}
const SG::ThinningCache * thinningCache() const
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.

◆ getThinningDecision() [1/4]

const SG::ThinningDecisionBase * SG::getThinningDecision ( const EventContext & ctx,
const sgkey_t sgkey )

Retrieve the current thinning decision for sgkey.

ctx Event context.

Parameters
sgkeySG hashed key to test.

Returns nullptr if there is no thinning for sgkey.

Definition at line 112 of file getThinningCache.cxx.

114{
115 if (const SG::ThinningCache* cache = getThinningCache (ctx)) {
116 return cache->thinning (sgkey);
117 }
118 return nullptr;
119}
Cache thinning decisions for converters.
const SG::ThinningCache * getThinningCache(const EventContext &ctx)
Retrieve the current thinning cache from the event context.

◆ getThinningDecision() [2/4]

const SG::ThinningDecisionBase * SG::getThinningDecision ( const EventContext & ctx,
const std::string & key )

Retrieve the current thinning decision for key.

ctx Event context.

Parameters
keySG key to test.

Returns nullptr if there is no thinning for key.

Definition at line 83 of file getThinningCache.cxx.

85{
86 if (const SG::ThinningCache* cache = getThinningCache (ctx)) {
87 return cache->thinning (key);
88 }
89 return nullptr;
90}

◆ getThinningDecision() [3/4]

const SG::ThinningDecisionBase * SG::getThinningDecision ( const sgkey_t sgkey)

Retrieve the current thinning decision for sgkey.

Parameters
keySG key to test.
sgkeySG hashed key to test.

Returns nullptr if there is no thinning for sgkey.

Parameters
sgkeySG hashed key to test.

Returns nullptr if there is no thinning for sgkey.

Definition at line 128 of file getThinningCache.cxx.

129{
130 return getThinningDecision (Gaudi::Hive::currentContext(), sgkey);
131}
const SG::ThinningDecisionBase * getThinningDecision(const EventContext &ctx, const std::string &key)
Retrieve the current thinning decision for key.

◆ getThinningDecision() [4/4]

const SG::ThinningDecisionBase * SG::getThinningDecision ( const std::string & key)

Retrieve the current thinning decision for key.

Parameters
keySG key to test.

Returns nullptr if there is no thinning for key.

Definition at line 99 of file getThinningCache.cxx.

100{
101 return getThinningDecision (Gaudi::Hive::currentContext(), key);
102}

◆ getThinningInfo() [1/2]

const SG::ThinningInfo * SG::getThinningInfo ( const EventContext & ctx,
const std::string & key )

Retrieve the current thinning information for key.

ctx Event context.

Parameters
keySG key to test.

Returns nullptr if there is no thinning for key.

Definition at line 54 of file getThinningCache.cxx.

56{
57 if (const SG::ThinningCache* cache = getThinningCache (ctx)) {
58 return cache->thinningInfo (key);
59 }
60 return nullptr;
61}

◆ getThinningInfo() [2/2]

const SG::ThinningInfo * SG::getThinningInfo ( const std::string & key)

Retrieve the current thinning information for key.

Parameters
keySG key to test.

Returns nullptr if there is no thinning for key.

Definition at line 70 of file getThinningCache.cxx.

71{
72 return getThinningInfo (Gaudi::Hive::currentContext(), key);
73}
const SG::ThinningInfo * getThinningInfo(const EventContext &ctx, const std::string &key)
Retrieve the current thinning information for key.

◆ getVector()

const IAuxTypeVector * SG::getVector ( SG::auxid_t auxid) const
overridevirtual

Return vector interface for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.

This should return nullptr if the item doesn't exist.

◆ getVectorInternal_noLock()

IAuxTypeVector * SG::AuxStoreInternal::getVectorInternal_noLock ( SG::auxid_t auxid,
size_t size,
size_t capacity,
bool no_lock_check )
privatevirtual

Implementation of getVectorInternal; no locking.

Definition at line 712 of file AuxStoreInternal.cxx.

716{
717 if (m_vecs.size() <= auxid) {
718 m_vecs.resize (auxid+1);
719 }
720 if (m_vecs[auxid] == 0) {
721 if (m_locked && !no_lock_check)
722 throw ExcStoreLocked (auxid);
723 const AuxTypeRegistry& r = AuxTypeRegistry::instance();
724 m_vecs[auxid] = r.makeVector (auxid, size, capacity);
725 addAuxID (auxid);
726 std::unique_ptr<IAuxTypeVector> linked = m_vecs[auxid]->linkedVector();
727 if (linked) {
728 auxid_t linked_id = linked->auxid();
729 m_vecs[linked_id] = std::move (linked);
730 addAuxID (linked_id);
731 }
732 }
733 else {
734 // Make sure the vector has at least the requested size.
735 // One way in which it could be short: setOption was called and created
736 // a variable in a store that had no other variables.
737 if (m_vecs[auxid]->size() < size) {
738 m_vecs[auxid]->resize (size);
739 m_vecs[auxid]->reserve (capacity);
740 }
741 }
742 return m_vecs[auxid].get();
743}
size_t size() const
Number of registered mappings.

◆ getWritableAuxIDs()

virtual const SG::auxid_set_t & SG::getWritableAuxIDs ( ) const
overridevirtual

Return a set of identifiers for writable data items in this store.

This should include only non-const identifiers.

◆ hadPrivateData()

bool SG::hadPrivateData ( ) const
protected

True if this element had private data before it was added to its current container.

◆ hasNonConstStore()

bool SG::hasNonConstStore ( ) const

Return true if this object has an associated non-const store.

This will be true for either a private or standalone store.

◆ hasStore()

bool SG::hasStore ( ) const

Return true if this object has an associated store.

This will be true for either a private or standalone store.

◆ havePrivateData()

bool SG::havePrivateData ( ) const
protected

True if this element currently has private data.

◆ IAuxElement() [1/2]

SG::IAuxElement ( )

Flag that a class may have auxiliary data associated with it.

This this class really exists only to flag that a class may have auxiliary data associated with it. SG::AuxElement derives from this, but one should use this class for tests rather than SG::AuxElement to avoid dependency issues.

This is an `interface' in the sense that it identifies a group of classes, but it defines no functionality itself. In fact, this class should not have a virtual table.

It turns out, however, that ROOT's branch splitting in TBranchElement can get confused in the case of an empty base class deriving from another base class. We can work around this by moving some of the data members from AuxElement here (even though they are transient). */ class IAuxElement { public: /**

Default constructor. For an element not in a container.

◆ IAuxElement() [2/2]

SG::IAuxElement ( size_t index)

Constructor.

Parameters
indexThe index of this element in its container.

◆ index()

size_t SG::index ( ) const

Return the index of this element within its container.

◆ insertMove()

virtual bool SG::insertMove ( size_t pos,
IAuxStore & other,
const SG::auxid_set_t & ignore = SG::auxid_set_t(0) )
overridevirtual

Move all elements from other to this store.

Parameters
posThe starting index of the insertion.
otherStore from which to do the move.
ignoreSet of variables that should not be added to the store.

Let len be the size of other. The store will be increased in size by len elements, with the elements at pos being copied to pos+len. Then, for each auxiliary variable, the entire contents of that variable for other will be moved to this store at index pos. This will be done via move semantics if possible; otherwise, it will be done with a copy. Variables present in this store but not in other will have the corresponding elements default-initialized. Variables in other but not in this store will be added unless they are in ignore.

Returns true if it is known that none of the vectors' memory moved, false otherwise.

◆ isAvailable() [1/3]

bool SG::isAvailable ( const AuxVectorData & c) const

Test to see if this variable exists in the store.

Parameters
cThe container in which to test the variable.

◆ isAvailable() [2/3]

template<IsConstAuxElement ELT>
bool SG::isAvailable ( const ELT & e) const

Test to see if this variable exists in the store.

Parameters
eAn element of the container in which to test the variable.

◆ isAvailable() [3/3]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::isAvailable ( const std::string & name,
const std::string & clsname = "" ) const

Check if an aux variable is available for reading.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isAvailableWritable() [1/3]

bool SG::isAvailableWritable ( const AuxVectorData & c) const

Test to see if this variable exists in the store and is writable.

Parameters
cThe container in which to test the variable.

◆ isAvailableWritable() [2/3]

template<IsConstAuxElement ELT>
bool SG::isAvailableWritable ( const ELT & e) const

Test to see if this variable exists in the store and is writable.

Parameters
eAn element of the container in which to test the variable.

◆ isAvailableWritable() [3/3]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::isAvailableWritable ( const std::string & name,
const std::string & clsname = "" )

Check if an aux variable is available for writing.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isAvailableWritableAsDecoration()

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::isAvailableWritableAsDecoration ( const std::string & name,
const std::string & clsname = "" ) const

Check if an aux variable is available for writing as a decoration.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isDecoration()

bool SG::isDecoration ( auxid_t auxid) const
overridevirtual

Test if a particular variable is tagged as a decoration.

Parameters
auxidThe identifier of the desired aux data item.

◆ link()

pointer & SG::link ( pointer p) const
private

Return a reference to the link for an element.

Parameters
pThe element.

◆ linkedVector()

const IAuxTypeVector * SG::linkedVector ( SG::auxid_t auxid)
overridevirtual

Return interface for a linked variable.

Parameters
auxidThe ID of the parent variable.

If auxid has a linked variable, then return the IAuxTypeVector describing it. Otherwise, return nullptr. May return nullptr unconditionally if this store does not support linked variables.

Definition at line 202 of file IConstAuxStore.h.

203 { return nullptr; }

◆ lock()

void SG::lock ( )
overridevirtual

Lock the container.

After this, only decorations can be changed/modified. If the container is already locked, this is a no-op.

◆ lockDecoration()

void SG::lockDecoration ( SG::auxid_t auxid)
overridevirtual

Lock a decoration.

Parameters
auxidIdentifier of the decoration to lock.

A decoration is locked by changing from a decoration to an ordinary variable. If the container itself is locked, then modifications to the variable are not permitted after this call.

◆ lossyFloatCompress()

void SG::lossyFloatCompress ( void * dst,
const std::size_t idst,
const std::size_t n,
const std::size_t eltSize,
const std::string & typeName,
const unsigned int nmantissa )

Helper method to apply lossy float compression.

Parameters
dstPointer to the start of the vector's data
dst_indexIndex of first element in vector
nNumber of elements to process.
eltSizeElement size for the auxid
typeNameType name for the auxid
nmantissaCompression level to be used for the auxid
dstPointer to the start of the vector's data
idstIndex of first element in vector
nNumber of elements to process.
eltSizeElement size for the auxid
typeNameType name for the auxid
nmantissaCompression level to be used for the auxid

Definition at line 213 of file copyAuxStoreThinned.cxx.

219{
220 // Check if there is anything to be done
221 // Total number of explicit mantissa bits for a 32 bit float is 23
222 // 0 is used to denote no compression should be applied to the variable
223 static const unsigned int NMANTISSA_MAX = 23;
224 if (nmantissa == 0 || nmantissa >= NMANTISSA_MAX) return;
225
226 // Setup all possible compressors: done only once
227 static const std::vector<CxxUtils::FloatCompressor> compressors = [] {
228 std::vector<CxxUtils::FloatCompressor> result;
229 result.reserve(NMANTISSA_MAX);
230 for (std::size_t idx = 0; idx < NMANTISSA_MAX; ++idx)
231 result.emplace_back(idx);
232 return result;
233 }();
234
235 // Get the pointer to the memory
236 char* eltPtr = reinterpret_cast<char*>(dst) + idst*eltSize;
237
238 // This is where we apply in-place lossy float compression
239 if(typeName == "float") {
240 // cppcheck-suppress invalidPointerCast
241 float* f = reinterpret_cast<float*> (eltPtr);
242 for (size_t i = 0; i < n; i++) {
243 *f = compressors[nmantissa].reduceFloatPrecision(*f);
244 ++f;
245 }
246 } else if (typeName == "std::vector<float>"){
247 for (size_t i = 0; i < n; i++) {
248 std::vector<float> &vals = *(reinterpret_cast<std::vector<float>*>(eltPtr));
249 for(auto &val: vals) {
250 val = compressors[nmantissa].reduceFloatPrecision(val);
251 }
252 eltPtr += eltSize;
253 }
254 }
255}

◆ makeContDecorKey() [1/2]

std::string SG::makeContDecorKey ( const std::string & cont,
const std::string & decor )

Make a StoreGate key from container and decoration name.

Parameters
contThe container handle key.
decorThe decoration handle key.

Given keys of the form "CCC" and "DDD", returns the full key, "CCC.DDD". If cont or decor is empty, returns the non-empty key (or an empty string).

Definition at line 59 of file DecorKeyHelpers.cxx.

60{
61 if (cont.empty()) return decor;
62 if (decor.empty()) return cont;
63 return cont + '.' + decor;
64}

◆ makeContDecorKey() [2/2]

std::string SG::makeContDecorKey ( const VarHandleKey & contKey,
const std::string & key )

Make a StoreGate key from container and decoration.

Parameters
contKeyThe VarHandleKey of the container holding the decoration.
keyThe decoration name.

Construct the StoreGate key from the associated container and the decoration name passed in key. If the latter also contains the container name, an exception will be raised. Returns an empty string if key is empty.

Definition at line 77 of file DecorKeyHelpers.cxx.

78{
79 if (key.empty() || key.ends_with ('+')) {
80 return "";
81 }
82 if (key.find('.') != std::string::npos) {
83 throw SG::ExcBadHandleKey(key + " (DecorHandleKey has been declared with a parent container. "
84 "Its value should not contain any container name.)");
85 }
86
87 // Note: VHK::fullKey().key() contains the store prefix, key() does not.
88 return makeContDecorKey( contKey.fullKey().key(), key);
89}
Exception — Bad key format for VarHandleKey.
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::string makeContDecorKey(const std::string &cont, const std::string &decor)
Make a StoreGate key from container and decoration name.

◆ makeHandle() [1/18]

template<class T>
void SG::makeHandle ( const ReadDecorHandleKey< T > & key)

These two signatures are to catch cases where the explicit template argument is omitted from the makeHandle call and give an error tailored to that.

Otherwise, the makeHandle call for ReadHandle would match, potentially giving a much more confusing error.

◆ makeHandle() [2/18]

template<class D, class T>
ReadDecorHandle< T, D > SG::makeHandle ( const ReadDecorHandleKey< T > & key)

Return a ReadDecorHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

The type of the decoration must be included as an explicit template parameter:

auto handle = SG::makeHandle<float> (key);
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

Note that D comes first in the argument list. It's given explicitly, while T is inferred from key.

◆ makeHandle() [3/18]

template<class T>
void SG::makeHandle ( const ReadDecorHandleKey< T > & key,
const EventContext & ctx )

◆ makeHandle() [4/18]

template<class D, class T>
ReadDecorHandle< T, D > SG::makeHandle ( const ReadDecorHandleKey< T > & key,
const EventContext & ctx )

Return a ReadDecorHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

The type of the decoration must be included as an explicit template parameter:

auto handle = SG::makeHandle<float> (key, ctx);

Note that D comes first in the argument list. It's given explicitly, while T is inferred from key.

◆ makeHandle() [5/18]

template<class T>
ReadHandle< T > SG::makeHandle ( const ReadHandleKey< T > & key)

Return a ReadHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

◆ makeHandle() [6/18]

template<class T>
ReadHandle< T > SG::makeHandle ( const ReadHandleKey< T > & key,
const EventContext & ctx )

Return a ReadHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

◆ makeHandle() [7/18]

template<class T>
SG::ReadCondHandle< T > SG::makeHandle ( const SG::ReadCondHandleKey< T > & key,
const EventContext & ctx = Gaudi::Hive::currentContext() )

Definition at line 269 of file ReadCondHandle.h.

270 {
271 return SG::ReadCondHandle<T>(key, ctx);
272 }

◆ makeHandle() [8/18]

template<class T>
SG::WriteCondHandle< T > SG::makeHandle ( const SG::WriteCondHandleKey< T > & key,
const EventContext & ctx = Gaudi::Hive::currentContext() )

Definition at line 317 of file WriteCondHandle.h.

318 {
319 return SG::WriteCondHandle<T>(key, ctx);
320 }

◆ makeHandle() [9/18]

template<class T>
ThinningHandle< T > SG::makeHandle ( const ThinningHandleKey< T > & key)

Return a ThinningHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

Definition at line 135 of file ThinningHandle.h.

136{
137 return ThinningHandle<T> (key);
138}
Handle for requesting thinning for a data object.

◆ makeHandle() [10/18]

template<class T>
ThinningHandle< T > SG::makeHandle ( const ThinningHandleKey< T > & key,
const EventContext & ctx )

Return a ThinningHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

Definition at line 153 of file ThinningHandle.h.

155{
156 return ThinningHandle<T> (key, ctx);
157}

◆ makeHandle() [11/18]

template<class T>
UpdateHandle< T > SG::makeHandle ( const UpdateHandleKey< T > & key)

Return an UpdateHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

◆ makeHandle() [12/18]

template<class T>
UpdateHandle< T > SG::makeHandle ( const UpdateHandleKey< T > & key,
const EventContext & ctx )

Return an UpdateHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

◆ makeHandle() [13/18]

template<class T>
void SG::makeHandle ( const WriteDecorHandleKey< T > & key)

These two signatures are to catch cases where the explicit template argument is omitted from the makeHandle call and give an error tailored to that.

Otherwise, the makeHandle call for ReadHandle would match, potentially giving a much more confusing error.

◆ makeHandle() [14/18]

template<class D, class T>
WriteDecorHandle< T, D > SG::makeHandle ( const WriteDecorHandleKey< T > & key)

Return a WriteDecorHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

The type of the decoration must be included as an explicit template parameter:

auto handle = SG::makeHandle<float> (key);

Note that D comes first in the argument list. It's given explicitly, while T is inferred from key.

◆ makeHandle() [15/18]

template<class T>
void SG::makeHandle ( const WriteDecorHandleKey< T > & key,
const EventContext & ctx )

◆ makeHandle() [16/18]

template<class D, class T>
WriteDecorHandle< T, D > SG::makeHandle ( const WriteDecorHandleKey< T > & key,
const EventContext & ctx )

Return a WriteDecorHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

The type of the decoration must be included as an explicit template parameter:

auto handle = SG::makeHandle<float> (key, ctx);

Note that D comes first in the argument list. It's given explicitly, while T is inferred from key.

◆ makeHandle() [17/18]

template<class T>
WriteHandle< T > SG::makeHandle ( const WriteHandleKey< T > & key)

Return a WriteHandle referencing key.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

◆ makeHandle() [18/18]

template<class T>
WriteHandle< T > SG::makeHandle ( const WriteHandleKey< T > & key,
const EventContext & ctx )

Return a WriteHandle referencing key for an explicit context.

Parameters
keyThe key object holding the clid/key/store.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

◆ makePrivateStore() [1/3]

void SG::AuxElement::makePrivateStore ( )

Create a new (empty) private store for this object.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

Definition at line 192 of file AuxElement.cxx.

193{
194 if (m_container) {
195 throw SG::ExcBadPrivateStore ("store already exists");
196 }
197
198 m_container = new SG::AuxElementPrivateData;
199 IAuxElement::setIndex (0);
200 IAuxElement::setHavePrivateData();
201}
Internal data container for private store.
Exception — Bad use of private store.

◆ makePrivateStore() [2/3]

template<class U1>
void SG::makePrivateStore ( const U1 & other,
bool warnUnlocked = false )

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore() [3/3]

template<class U1>
void SG::makePrivateStore ( const U1 * other,
bool warnUnlocked = false )

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore1() [1/2]

void SG::AuxElement::makePrivateStore1 ( const AuxElement * other,
bool warnUnlocked )
private

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does have aux data.

Definition at line 552 of file AuxElement.cxx.

554{
556 if (other)
557 this->copyAux (*other, warnUnlocked);
558}
void copyAux(const ConstAuxElement &other, bool warnUnlocked=false)
Copy aux data from another object.

◆ makePrivateStore1() [2/2]

void SG::makePrivateStore1 ( const void * other,
bool warnUnlocked )
private

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does not have aux data.

◆ maybeUnprotect() [1/4]

template<class ALLOC>
void SG::maybeUnprotect ( ALLOC & )

Hook for unprotecting an arena.

Sometimes we need to ensure that an arena is unprotected before we start destroying an object that contains the arena. To do that without making assumptions about whether the arena supports an unprotect operation, call this function.

This is the generic version, which is a no-op. It will be specialized as appropriate for individual allocators.

Definition at line 32 of file maybeUnprotect.h.

33{
34}

◆ maybeUnprotect() [2/4]

template<class T, class VETO>
void SG::maybeUnprotect ( ArenaHeapSTLAllocator< T, VETO > & a)

Hook for unprotecting an arena.

Sometimes we need to ensure that an arena is unprotected before we start destroying an object that contains the arena. To do that without making assumptions about whether the arena supports an unprotect operation, call this function.

◆ maybeUnprotect() [3/4]

template<class T, class VETO>
void SG::maybeUnprotect ( ArenaPoolSTLAllocator< T, VETO > & a)

Hook for unprotecting an arena.

Sometimes we need to ensure that an arena is unprotected before we start destroying an object that contains the arena. To do that without making assumptions about whether the arena supports an unprotect operation, call this function.

◆ maybeUnprotect() [4/4]

template<class T>
void SG::maybeUnprotect ( ArenaSharedHeapSTLAllocator< T > & a)

Hook for unprotecting an arena.

Sometimes we need to ensure that an arena is unprotected before we start destroying an object that contains the arena. To do that without making assumptions about whether the arena supports an unprotect operation, call this function.

◆ NO_SANITIZE_UNDEFINED()

void copyAuxStoreThinned SG::NO_SANITIZE_UNDEFINED ( const SG::IConstAuxStore & orig,
SG::IAuxStore & copy,
const SG::ThinningInfo * info )

Helper to copy an aux store while applying thinning.

Parameters
origSource aux store from which to copy.
copyDestination aux store to which to copy.
infoThinning information for this object (or nullptr).

orig and copy are both auxiliary store objects. The data from orig will be copied to copy, with individual elements / variables removed according info.

Definition at line 60 of file copyAuxStoreThinned.cxx.

64{
65 size_t size = orig.size();
66 if (size == 0) {
67 copy.resize(0);
68 return;
69 }
70
71 const ThinningDecisionBase* dec = info ? info->m_decision : nullptr;
72
73 size_t nremaining = dec ? dec->thinnedSize() : size;
74 if( nremaining == 0) {
75 copy.resize(0);
76 return;
77 }
78
79 // Access the auxiliary type registry:
80 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
81
82 // The auxiliary IDs that the original container has:
83 SG::auxid_set_t auxids = orig.getAuxIDs();
84 SG::auxid_set_t decors = orig.getDecorIDs();
85
86 SG::auxid_set_t dyn_auxids;
87 SG::auxid_set_t sel_auxids;
88 if (const IAuxStoreIO* iio = dynamic_cast<const IAuxStoreIO*> (&orig)) {
89 dyn_auxids = iio->getDynamicAuxIDs();
90 sel_auxids = iio->getSelectedAuxIDs();
91 }
92
93 SG::auxid_set_t new_auxids = copy.getAuxIDs();
94
95 copy.resize (nremaining);
96
97 // Loop over all the variables of the original container:
98 for (SG::auxid_t auxid : auxids) {
99 // Skip null auxids (happens if we don't have the dictionary)
100 if(auxid == SG::null_auxid) continue;
101
102 // Skip linked variables (they'll be handled when we copy the variable
103 // from which they're linked).
104 if (r.isLinked (auxid)) continue;
105
106 // Skip non-selected dynamic variables.
107 // Handle variable vetoes requested via ThinningInfo.
108 // We want to allow vetoing a variable if it's defined
109 // as a dynamic variable in the source source, or if it doesn't
110 // exist in the destination source (in which case it will be
111 // dynamic there). The latter case happens for example when
112 // we save a static store object as the AuxContainerBaseClass
113 // in order to make all variables dynamic.
114 if (dyn_auxids.test(auxid) || !new_auxids.test(auxid)) {
115 if (info) {
116 if (info->vetoed(auxid)) continue;
117 }
118 }
119
120 // Also check for a veto requested through the store selection interface.
121 // (But this shouldn't really be used anymore.)
122 if (dyn_auxids.test(auxid) && !sel_auxids.test(auxid)) {
123 continue;
124 }
125
126 // Access the source variable:
127 const void* src = orig.getData (auxid);
128
129 if (!src) continue;
130
131 // Warn if this is a decoration --- decorations should have been locked
132 // by now, except for mcEventWeights, for which this is expected.
133 if (decors.test (auxid) && r.getName (auxid) != "mcEventWeights") {
134 std::ostringstream ss;
135 ss << "unlocked decoration " << r.getName(auxid)
136 << " (" << auxid << ") in object of type "
137 << AthContainers_detail::typeinfoName (typeid (orig));
138 ATHCONTAINERS_WARNING("copyAuxStoreThinned", ss.str());
139 }
140
141 // FIXME: Do this via proper interfaces.
142 if (const IAuxStoreIO* iio = dynamic_cast<const IAuxStoreIO*> (&orig))
143 {
144 const std::type_info* typ = iio->getIOType (auxid);
145 if (strstr (typ->name(), "PackedContainer") != nullptr) {
146 // This cast gets a warning from the undefined behavior sanitizer
147 // in gcc6. Done like this deliberately for now, so suppress ubsan
148 // checking for this function.
149 const PackedParameters& parms =
150 reinterpret_cast<const PackedContainer<int>* > (iio->getIOData (auxid))->parms();
151 copy.setOption (auxid, AuxDataOption ("nbits", parms.nbits()));
152 copy.setOption (auxid, AuxDataOption ("float", parms.isFloat()));
153 copy.setOption (auxid, AuxDataOption ("signed", parms.isSigned()));
154 copy.setOption (auxid, AuxDataOption ("rounding", parms.rounding()));
155 copy.setOption (auxid, AuxDataOption ("nmantissa", parms.nmantissa()));
156 copy.setOption (auxid, AuxDataOption ("scale", parms.scale()));
157 }
158 }
159
160 // Get the element size, type name and compression info for the current auxid
161 // This information is later passed to the helper function lossyFloatCompress
162 const size_t eltSize{ r.getEltSize(auxid) };
163 const std::string typeName{ r.getTypeName(auxid) };
164 const unsigned int nmantissa{ info != nullptr ? info->compression(auxid) : 0 };
165
166 // Create the target variable:
167 void* dst = copy.getData (auxid, nremaining, nremaining);
168
169 // Also create a linked variable if needed.
170 SG::auxid_t linked_auxid = r.linkedVariable (auxid);
171 if (linked_auxid != null_auxid) {
172 const IAuxTypeVector* v = orig.linkedVector (auxid);
173 if (v) {
174 size_t sz = v->size();
175 copy.getData (linked_auxid, 0, sz);
176 }
177 }
178
179 TempInterface srciface (orig.size());
180 srciface.setStore (&orig);
181 TempInterface dstiface (copy.size());
182 dstiface.setStore (&copy);
183
184 // Copy over all elements.
185 if (nremaining == size) {
186 // No thinning.
187 r.copyForOutput (auxid, dstiface, 0, srciface, 0, size);
188 }
189 else {
190 // Some elements are thinned.
191 for (std::size_t isrc = 0, idst = 0; isrc < size; ++isrc) {
192 if (!dec || !dec->thinned(isrc)) {
193 r.copyForOutput (auxid, dstiface, idst, srciface, isrc, 1);
194 ++idst;
195 }
196 }
197 }
198 // Apply lossy float compression here (in-place).
199 // Maybe it would be better to do this via the registry during copy.
200 lossyFloatCompress(dst, 0, nremaining, eltSize, typeName, nmantissa);
201 }
202}
Hold information about an option setting request.
Interface providing I/O for a generic auxiliary store.
Definition IAuxStoreIO.h:44
Abstract interface for manipulating vectors of arbitrary types.
Container to hold aux data to be stored in a packed form.
const PackedParameters & parms() const
Return the packing parameters for this container.
Describe how the contents of a PackedContainer are to be saved.
void lossyFloatCompress(void *dst, const std::size_t dst_index, const std::size_t n, const std::size_t eltSize, const std::string &typeName, const unsigned int nmantissa)
Helper method to apply lossy float compression.
bool copy
Definition calibdata.py:26

◆ noPrivateData()

bool SG::noPrivateData ( ) const
protected

True if this element has no private data.

◆ normalizedTypeinfoName()

std::string SG::normalizedTypeinfoName ( const std::type_info & info)

Convert a type_info to a normalized string representation (matching the names used in the root dictionary).

Parameters
infoThe type to convert.

The function AthContainer_detail::typeinfoName may be used to convert a C++ type_info to a string representing the name of the class; this handles platform-dependent details such as performing demangling.

However, the name you get as a result of this does not necessarily match the name by which the class is known in the ROOT dictionary. In particular, defaulted template arguments for STL containers and DataVector are suppressed in the dictionary. So, for example, for a vector class typeinfoName may produce std::vector<int, std::allocator<T> >, while in the dictionary it is known as std::vector<int>. Using normalizedTypeinfoName instead will transform the names to match what's in the dictionary. This function will also cache the typeinfo -> string conversions.

Definition at line 120 of file normalizedTypeinfoName.cxx.

121{
122 // Maintain a cache of mappings, protected with an ordinary mutex.
123 // We originally did this with an upgrading mutex.
124 // However, these mutexes have been observed to have considerable overhead,
125 // so are probably not worthwhile if the read critical section is short.
126 // If this lock becomes a performance issue, consider a concurrent hashmap
127 // or rcu-style solution.
128 typedef std::unordered_map<const std::type_info*, std::string> typemap_t;
129 static typemap_t normalizedTypemap ATLAS_THREAD_SAFE;
130 typedef AthContainers_detail::mutex mutex_t;
131 static mutex_t normalizedTypemapMutex;
132 AthContainers_detail::lock_guard<mutex_t> lock (normalizedTypemapMutex);
133
134 // Test to see if we already have the mapping.
135 typemap_t::iterator it = normalizedTypemap.find (&info);
136 if (it != normalizedTypemap.end()) {
137 return it->second;
138 }
139
140 // Didn't find it. Apply the rules.
141 static const CxxUtils::ClassName::Rules normalizeRules = makeRules();
142 std::string tiname = AthContainers_detail::typeinfoName (info);
143 std::string normalizedName = normalizeRules.apply (tiname);
144
145 // Remember this mapping.
146 normalizedTypemap[&info] = normalizedName;
147 return normalizedName;
148}
AthContainers_detail::mutex mutex_t
Mutex used to synchronize modifications to the cache vector.

◆ noToTransient()

template<class T>
bool SG::noToTransient ( )
constexpr

Helper to test if T::noToTransient exists as a typedef.

Definition at line 84 of file ToTransient.h.

84{ return noToTransient1<ToTransient<T> > (123); }
constexpr bool noToTransient1(U)
Definition ToTransient.h:73

◆ noToTransient1() [1/2]

template<class T>
bool SG::noToTransient1 ( int ,
typename T::noToTransient = typename T::noToTransient() )
constexpr

Definition at line 76 of file ToTransient.h.

76{ return true; }

◆ noToTransient1() [2/2]

template<class T, class U>
bool SG::noToTransient1 ( U )
constexpr

Definition at line 73 of file ToTransient.h.

73{ return false; }

◆ null_arena_deleter()

void SG::null_arena_deleter ( ArenaBase * )

Definition at line 28 of file ArenaHeader.cxx.

28{}

◆ operator!=()

bool SG::operator!= ( const VarHandleBase & l,
const VarHandleBase & r )

Inequality comparison.

Definition at line 129 of file AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx.

130 {
131 return !(l==r);
132 }

◆ operator()() [1/4]

elt_span SG::operator() ( const AuxVectorData & container,
size_t index ) const

Fetch the variable for one element, as a non-const reference.

Fetch the variable for one element.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

This allows retrieving aux data by container / index. Looping over the index via this method will be faster then looping over the elements of the container.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

This allows retrieving aux data by container / index.

Will return a proxy object, which will allow treating this jagged vector element as a vector.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

This allows retrieving aux data by container / index.

Will return an ElementLink proxy, which may be converted to or assigned from an ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.

This allows retrieving aux data by container / index.

This will return a range of ElementLink proxies. These proxies may be converted to or assigned from ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ operator()() [2/4]

template<IsConstAuxElement ELT>
reference_type SG::operator() ( const ELT & e) const

Fetch the variable for one element, as a non-const reference.

Parameters
eThe element for which to fetch the variable.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

Parameters
eThe element for which to fetch the variable.

Will return a proxy object, which will allow treating this jagged vector element as a vector.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ operator()() [3/4]

template<IsConstAuxElement ELT>
elt_span SG::operator() ( const ELT & e) const
protected

Fetch the variable for one element.

Parameters
eThe element for which to fetch the variable.

This will return a range of ElementLink proxies. These proxies may be converted to or assigned from ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ operator()() [4/4]

template<IsConstAuxElement ELT>
ELProxy SG::operator() ( const ELT & e) const

Fetch the variable for one element.

Parameters
eThe element for which to fetch the variable.

Will return an ElementLink proxy, which may be converted to or assigned from an ElementLink.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ operator<<() [1/4]

std::ostream & SG::operator<< ( std::ostream & os,
const ArenaAllocatorBase::Stats & stats )

Format a complete statistics structure.

Parameters
osThe stream to which to write.
statsThe statistics structure to write.

Definition at line 104 of file ArenaAllocatorBase.cxx.

106{
107 os << stats.elts << " " << stats.bytes << " " << stats.blocks;
108 return os;
109}

◆ operator<<() [2/4]

std::ostream & SG::operator<< ( std::ostream & os,
const ArenaAllocatorBase::Stats::Stat & stat )

Format a statistic structure.

Parameters
osThe stream to which to write.
statThe statistic structure to write.

Definition at line 61 of file ArenaAllocatorBase.cxx.

63{
64 os << std::setw(7) << stat.inuse << "/"
65 << std::setw(7) << stat.free << "/"
66 << std::setw(7) << stat.total;
67 return os;
68}

◆ operator<<() [3/4]

std::ostream & SG::operator<< ( std::ostream & ost,
const SG::VersionedKey & k )
inline

Definition at line 116 of file SGVersionedKey.h.

116 {
117 return ost << k.rawVersionKey();
118 // return ost.write(k.rawVersionKey(), strlen(k.rawVersionKey()));
119 }

◆ operator<<() [4/4]

std::ostream & SG::operator<< ( std::ostream & out,
const VarHandleBase & o )

Return the name of the store holding the object we are proxying.

Output stream.

Output stream.

Parameters
outStream to which to write.
oObject to write.
outStream to which to write.
oObject to write.

Definition at line 107 of file AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx.

108 {
109 out << "VarHandleBase @" << &o
110 // << " store=" <<o.store()
111 << ", key=" <<o.key();
112 return out;
113 }
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.

◆ operator=() [1/4]

ArenaHeapAllocator & SG::operator= ( ArenaHeapAllocator && other)

Move assignment.

◆ operator=() [2/4]

ArenaHeapAllocator & SG::operator= ( const ArenaHeapAllocator & )
delete

◆ operator=() [3/4]

AuxElement & SG::operator= ( const AuxElement & other)

Assignment.

Parameters
otherThe object from which we're assigning.

We don't copy container/index, as assignment doesn't change where this object is. However, if we have aux data, then we copy aux data if we're copying from an object that also has it; otherwise, if we're copying from an object with no aux data, then we clear ours.

◆ operator=() [4/4]

AuxStoreInternal & SG::operator= ( const AuxStoreInternal & )
delete

Don't allow assignment.

◆ operator==()

bool SG::operator== ( const VarHandleBase & l,
const VarHandleBase & r )

Equality comparison.

Definition at line 119 of file AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx.

120 {
121 return (l.name() == r.name());// &&
122 // l.store() == r.store());
123 }

◆ ReadCondHandleNotFound()

void SG::ReadCondHandleNotFound ( const CondContBase & cc,
const EventIDBase & eid,
const std::string & key )

Report a conditions container lookup failure.

Parameters
ccThe conditions container.
eidThe time for which to search.
Thekey corresponding to the conditions container.

Definition at line 23 of file ReadCondHandle.cxx.

26{
27 std::ostringstream ost;
28 cc.list(ost);
29 MsgStream msg(Athena::getMessageSvc(), "ReadCondHandle");
30 msg << MSG::ERROR
31 << "ReadCondHandle::retrieve() could not find EventTime "
32 << eid << " for key " << key << "\n"
33 << ost.str()
34 << endmsg;
35}

◆ readPackedParameters()

SG::PackedParameters SG::readPackedParameters ( TBuffer & b)
inline

Read a set of packed parameters from a buffer.

Parameters
bBuffer from which to write.

Definition at line 47 of file PackedContainerStreamer.cxx.

47 {
48 uint8_t nbits;
49 b >> nbits;
50
51 uint8_t flags;
52 b >> flags;
53
54 SG::PackedParameters parms (nbits, flags);
55 if (parms.isFloat()) {
56 uint8_t nmantissa;
57 b >> nmantissa;
58 parms.setNmantissa (nmantissa);
59 if (parms.hasScale()) {
60 float scale;
61 b >> scale;
62 parms.setScale (scale);
63 }
64 }
65 return parms;
66}

◆ refill()

pointer SG::refill ( )
private

Add more free elements to the pool, and allocate a new element.

◆ releasePrivateStore()

void SG::AuxElement::releasePrivateStore ( )

Release and free any private store associated with this object.

ExcBadPrivateStore will be thrown if this object does not have a private store.

Definition at line 210 of file AuxElement.cxx.

211{
212 if (hadPrivateData()) {
213 // We had a private store, but it was released because this object
214 // was added to a container. Just forget about it.
215 IAuxElement::setNoPrivateData();
216 return;
217 }
218
219 if (!havePrivateData() ||
220 !m_container ||
221 typeid(*m_container) != typeid(AuxElementPrivateData))
222 {
223 throw SG::ExcBadPrivateStore ("no private store exists");
224 }
225
226 IAuxElement::setIndex (0);
227 IAuxElement::setNoPrivateData();
228 delete m_container;
229 m_container = 0;
230}
bool havePrivateData() const
True if this element currently has private data.
bool hadPrivateData() const
True if this element had private data before it was added to its current container.

◆ releasePrivateStoreForDtor()

void SG::releasePrivateStoreForDtor ( )
private

Out-of-line portion of destructor.

Delete a private store if we have one.

◆ removeContFromDecorKey()

void SG::removeContFromDecorKey ( const VarHandleKey & contKey,
std::string & key )

Remove container name from decoration key.

Parameters
contKeyThe VarHandleKey of the container holding the decoration.
keyThe decoration name to be modified.

Given a key of the form SG+CCC.DDD, removes SG+CCC.

Definition at line 99 of file DecorKeyHelpers.cxx.

100{
101 // Remove container name from key
102 const std::string toerase = contKey.fullKey().key() + ".";
103 const size_t pos = key.find(toerase);
104 if (pos != std::string::npos) {
105 key.erase(pos, toerase.size());
106 }
107
108}

◆ reserve()

virtual void SG::reserve ( size_t sz)
overridevirtual

Change the capacity of all aux data vectors.

Parameters
szThe new capacity.

This should be called when the capacity of the container changes (by reserve). This should change the capacity for the vectors for all aux data items.

◆ reset()

virtual void SG::reset ( )
overridevirtual

Free all allocated elements.

All elements allocated are returned to the free state. clear should be called on them if it was provided. The elements may continue to be cached internally, without returning to the system.

◆ resize()

virtual bool SG::resize ( size_t sz)
overridevirtual

Change the size of all aux data vectors.

Parameters
szThe new size.

This should be called when the size of the container changes. This should resize the vectors for all aux data items.

If the size of the container grows, the new elements should be default-initialized; if it shrinks, destructors should be run as appropriate.

Should return true if it is known that none of the data pointers changed (and thus the cache does not need to be cleared), false otherwise.

◆ safe_clid()

template<class T>
CLID SG::safe_clid ( )
constexpr

Return the class ID of T, or CLID_NULL if it doesn't have one.

Avoids compilation errors if the class ID is not defined.

◆ set() [1/6]

void SG::set ( const AuxVectorData & container,
size_t index,
const Link_t & x ) const

Set the variable for one element.

Parameters
containerThe container for which to set the variable.
indexThe index of the desired element.
lThe ElementLink to set.

◆ set() [2/6]

template<detail::ElementLinkRange< CONT > RANGE>
void SG::set ( const AuxVectorData & container,
size_t index,
const RANGE & r ) const
protected

Set the variable for one element.

Parameters
containerThe container for which to set the variable.
indexThe index of the desired element.
rThe variable value to set, as a range over ElementLink.

◆ set() [3/6]

template<CxxUtils::InputRangeOverT< PAYLOAD_T > RANGE>
void SG::set ( const AuxVectorData & container,
size_t index,
const RANGE & x ) const

Set the variable for one element.

Parameters
containerThe container from which to fetch the variable.
indexThe index of the desired element.
xThe variable value to set.

◆ set() [4/6]

template<IsConstAuxElement ELT>
void SG::set ( const ELT & e,
const element_type & x ) const

Set the variable for one element.

Parameters
eThe element for which to fetch the variable.
xThe variable value to set.
eThe element for which to set the variable.
lThe ElementLink to set.

◆ set() [5/6]

template<IsConstAuxElement ELT, CxxUtils::InputRangeOverT< PAYLOAD_T > RANGE>
void SG::set ( const ELT & e,
const RANGE & x ) const

Set the variable for one element.

Parameters
eThe element for which to fetch the variable.
xThe variable value to set.

◆ set() [6/6]

template<IsConstAuxElement ELT, detail::ElementLinkRange< CONT > RANGE>
void SG::set ( const ELT & e,
const RANGE & x ) const
protected

Set the variable for one element.

Parameters
eThe element for which to set the variable.
rThe variable value to set, as a range over ElementLink.

◆ setConstStore()

void SG::setConstStore ( const SG::IConstAuxStore * store)

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

◆ setHadPrivateData()

void SG::setHadPrivateData ( )
private

Record that this element used to have private data.

◆ setHavePrivateData()

void SG::setHavePrivateData ( )
private

Record that this element currently has private data.

◆ setIndex() [1/2]

void SG::setIndex ( size_t index)
private

Set the index of this element within its container.

◆ setIndex() [2/2]

void SG::setIndex ( size_t index,
SG::AuxVectorData * container )
private

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

Usually this simply sets the index and container members of this object. However, in the case where this object has an associated private store, then we need to deal with releasing the store if the object is being added to a container, or making a new store if the object is being removed from a container.

◆ setIndexPrivate()

bool SG::setIndexPrivate ( size_t index,
SG::AuxVectorData * container )
private

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

This is called from setIndex when we have a private store to deal with.

◆ setNonConstStore()

void SG::setNonConstStore ( SG::IAuxStore * store)

Synonym for setStore with IAuxStore.

Parameters
storeThe new store.

◆ setNoPrivateData()

void SG::setNoPrivateData ( )
private

Record that this element does not have private data.

◆ setOption()

virtual bool SG::setOption ( auxid_t id,
const AuxDataOption & option )
overridevirtual

Set an option for an auxiliary data variable.

Parameters
idThe variable for which we want to set the option.
optionThe option setting to make.

The interpretation of option depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true on success, false otherwise.

◆ setStore() [1/3]

void SG::setStore ( const DataLink< SG::IConstAuxStore > & store)

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

◆ setStore() [2/3]

void SG::setStore ( const SG::IConstAuxStore * store)

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

◆ setStore() [3/3]

void SG::setStore ( SG::IAuxStore * store)

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

◆ setStore1()

AuxElementStandaloneData * SG::AuxElement::setStore1 ( const SG::IConstAuxStore * store)
private

Set the store associated with this object.

Parameters
storeThe new store.

Helper for setStore. Creates the AuxElementStandaloneData object if needed and returns it.

Parameters
storeThe new store.

Helper for setStore. Creates the @x AuxElementStandaloneData object if needed and returns it.

Definition at line 448 of file AuxElement.cxx.

449{
450 if (store) {
451 // Want this object be standalone.
452 if (!m_container) {
453 // Not in a container (and no private store). Make a new object.
454 AuxElementStandaloneData* data = new AuxElementStandaloneData;
455 IAuxElement::setHavePrivateData();
456 m_container = data;
457 return data;
458 }
459 if (usingStandaloneStore()) {
460 // Standalone --- return existing object.
461 return static_cast<AuxElementStandaloneData*> (container());
462 }
463 // Otherwise, it's an error.
464 throw ExcBadPrivateStore ("Attempt to attach a standalone store to an "
465 "object in a container or with a private store.");
466 }
467
468 else {
469 // Getting rid of a standalone store.
470 if (usingStandaloneStore()) {
471 IAuxElement::setNoPrivateData();
472 delete m_container;
473 m_container = 0;
474 }
475 else if (m_container != 0)
476 throw ExcBadPrivateStore ("Attempt to remove a standalone store from an "
477 "object in a container or with a private store.");
478 return 0;
479 }
480}
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.

◆ sgkeyEqual()

bool SG::sgkeyEqual ( const sgkey_t a,
const sgkey_t b )
inlineconstexpr

Compare two sgkeys for equality.

Definition at line 39 of file sgkey_t.h.

40{
41 return a == b;
42}
static Double_t a

◆ sgkeyLess()

bool SG::sgkeyLess ( const sgkey_t a,
const sgkey_t b )
inlineconstexpr

Compare two sgkeys for ordering.

Definition at line 49 of file sgkey_t.h.

50{
51 return a < b;
52}

◆ sgkeyShort()

uint32_t SG::sgkeyShort ( const sgkey_t k)
inlineconstexpr

Convert a sgkey to the 32-bit form used for older data.

Definition at line 85 of file sgkey_t.h.

86{
87 return k;
88}

◆ shift()

virtual void SG::shift ( size_t pos,
ptrdiff_t offs )
overridevirtual

Shift the elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

This operation shifts the elements in the vectors for all aux data items, to implement an insertion or deletion. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ simpleStringHash()

int SG::simpleStringHash ( const std::string & str,
int maxInt = 0xFFFF )
inline

simple hash function derived from Sedgewick Algorithms in C++ 3rd ed

Parameters
strthe string to be hashed
maxIntthe maximum value the function returns. Hash collision probability is 1/min(maxInt, 2**127)

Definition at line 16 of file hash_functions.h.

16 {
17 int h(0), a(127);
18 for (std::string::size_type iC=0; iC<str.size(); iC++)
19 h = (a*h + str[iC]) % maxInt;
20 return h;
21 }

◆ size()

size_t SG::size ( ) const
overridevirtual

Return the number of elements in the store.

May return 0 for a store with no aux data.

◆ size_noLock()

size_t SG::size_noLock ( ) const
private

Return the number of elements in the store; no locking.

◆ slowClear()

void SG::ArenaHeapAllocator::slowClear ( )
private

Call clear() for all allocated elements.

Definition at line 174 of file ArenaHeapAllocator.cxx.

175{
176 // Make a list of all free elements, in sorted order.
177 std::vector<pointer> free_ptrs;
178 free_ptrs.reserve (m_stats.elts.total - m_stats.elts.inuse);
179 for (pointer p = m_freeptr; p; p = link(p)) {
180 free_ptrs.push_back (p);
181 }
182 std::sort (free_ptrs.begin(), free_ptrs.end());
183
184 // Make a list of all used blocks, in sorted order.
185 std::vector<ArenaBlock*> blocks;
186 for (ArenaBlock* p = m_blocks; p; p = p->link()) {
187 blocks.push_back (p);
188 }
189 std::sort (blocks.begin(), blocks.end());
190
191 // Walk through both of these lists.
192 // For each block, walk through its elements, and call @c clear
193 // for those not on the free list.
194 std::vector<pointer>::iterator pi = free_ptrs.begin();
195 std::vector<pointer>::iterator pi_end = free_ptrs.end();
196 std::vector<ArenaBlock*>::iterator bi = blocks.begin();
197 std::vector<ArenaBlock*>::iterator bi_end = blocks.end();
198 func_t* clear = m_params.clear;
199 for (; bi != bi_end; ++bi) {
200 ArenaBlock& bl = **bi;
201 size_t sz = bl.size();
202 size_t elt_size = bl.eltSize();
203 for (size_t i = 0; i < sz; i++) {
204 pointer ptr = bl.index (i, elt_size);
205 if (pi != pi_end && ptr == *pi) {
206 ++pi;
207 }
208 else {
209 //'clear' is checked for validity by the caller
210 //coverity[NULL_FIELD:FALSE]
211 clear (ptr);
212 }
213 }
214 }
215}
void clear()
Empty the pool.
#define pi
A large memory block that gets carved into smaller uniform elements.
Definition ArenaBlock.h:43
pointer & link(pointer p) const
Return a reference to the link for an element.
void * ptr(T *p)
Definition SGImplSvc.cxx:74

◆ standalone()

bool SG::AuxStoreInternal::standalone ( ) const

Return the standalone flag.

Definition at line 70 of file AuxStoreInternal.cxx.

71{
72 return m_standalone;
73}

◆ Storable_cast() [1/2]

template<typename T>
T * SG::Storable_cast ( DataObject * pDObj,
bool quiet = true,
IRegisterTransient * irt = 0,
bool isConst = true )

Definition at line 37 of file StorableConversions.h.

39 {
40 T* result;
41 return fromStorable(pDObj, result, quiet, irt, isConst) ? result : 0;
42 }

◆ Storable_cast() [2/2]

void * SG::Storable_cast ( DataObject * pDObj,
CLID clid,
const std::type_info * tinfo = nullptr,
bool quiet = false,
IRegisterTransient * irt = 0,
bool isConst = true )

Try to get the pointer back from a DataObject, converted to be of type clid.

Parameters
pDObjThe DataObject.
clidThe ID of the class to which to convert.
tinfotype_info for the object being converted (optional).
quietIf true, suppress warning messages.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Only works if the DataObject is a DataBucket. Returns 0 on failure,

Definition at line 88 of file StorableConversions.cxx.

93{
94 return fromStorable (pDObj, clid, tinfo, quiet, irt, isConst);
95}

◆ swap() [1/2]

void SG::swap ( ArenaHeapAllocator & other)

Swap.

◆ swap() [2/2]

template<class T>
void SG::swap ( ArenaSharedHeapSTLAllocator< T > & a,
ArenaSharedHeapSTLAllocator< T > & b )

Definition at line 483 of file ArenaSharedHeapSTLAllocator.h.

484{
485 a.swap (b);
486}

◆ throwExcAllocOwnership()

void SG::throwExcAllocOwnership ( )

Throw a SG::ExcAllocOwnership exception.

Definition at line 636 of file Control/AthContainers/Root/exceptions.cxx.

637{
638 throw ExcAllocOwnership();
639}
Exception — Bad allocation ownership.

◆ throwExcBadDataProxyCast()

void SG::throwExcBadDataProxyCast ( const DataProxy & proxy,
const std::type_info & tid )

Throw an ExcBadDataProxyCast exception.

Parameters
proxyThe proxy from which we're trying to cast.
tidType to which we're trying to convert the object.

Definition at line 57 of file Control/SGTools/src/exceptions.cxx.

58{
59 throw ExcBadDataProxyCast (proxy.clID(), tid);
60}
Exception — Bad cast of DataProxy with CLID.

◆ throwExcBadDecorElement()

void SG::throwExcBadDecorElement ( Gaudi::DataHandle::Mode mode,
CLID clid,
const std::string & decorKey )

Throw a SG::ExcBadDecorElement exception.

Definition at line 488 of file Control/StoreGate/src/exceptions.cxx.

491{
492 throw SG::ExcBadDecorElement (mode, clid, decorKey);
493}
Exception — DecorHandle given an element not in the requested container.

◆ throwExcBadForwardLink()

void SG::throwExcBadForwardLink ( size_t index,
size_t size,
const std::string & name )

Throw a SG::ExcBadForwardLink exception.

Parameters
indexIndex in the link.
sizeSize of the referenced container.
nameType name of the container.

Definition at line 155 of file Control/AthLinks/src/exceptions.cxx.

156{
157 throw ExcBadForwardLink (index, size, name);
158}

◆ throwExcBadThinning()

void SG::throwExcBadThinning ( CLID clid,
const std::string & key,
SG::sgkey_t sgkey )

Throw a SG::ExcBadThinning exception.

Parameters
clidCLID of the link.
keyString key of the link.
sgkeyHashed key of the link.

Definition at line 344 of file Control/AthLinks/src/exceptions.cxx.

347{
348 throw ExcBadThinning (clid, key, sgkey);
349}
Exception – Bad thinning request.

◆ throwExcBadToTransient()

void SG::throwExcBadToTransient ( )

Throw a SG::ExcBadToTransient exception.

Definition at line 272 of file Control/AthLinks/src/exceptions.cxx.

273{
274 throw ExcBadToTransient();
275}

◆ throwExcElementNotFound()

void SG::throwExcElementNotFound ( const char * where)

Throw a SG::ExcElementNotFound exception.

Parameters
whereThe operation being attempted.

Definition at line 180 of file Control/AthLinks/src/exceptions.cxx.

181{
182 throw ExcElementNotFound (where);
183}
Exception — element not found.

◆ throwExcIncomparableEL()

void SG::throwExcIncomparableEL ( )

Throw a SG::IncomparableEL exception.

Throw a SG::ExcIncomparableSG exception.

Definition at line 250 of file Control/AthLinks/src/exceptions.cxx.

251{
252 throw ExcIncomparableEL();
253}
Exception — incomparable ElementLink.

◆ throwExcIndexNotFound()

void SG::throwExcIndexNotFound ( const char * where)

Throw a SG::ExcIndexNotFound exception.

Parameters
whereThe operation being attempted.

Definition at line 228 of file Control/AthLinks/src/exceptions.cxx.

229{
230 throw ExcIndexNotFound (where);
231}

◆ throwExcInvalidIndex()

void SG::throwExcInvalidIndex ( const char * where)

Throw a SG::ExcInvalidIndex exception.

Parameters
whereThe operation being attempted.

Definition at line 204 of file Control/AthLinks/src/exceptions.cxx.

205{
206 throw ExcInvalidIndex (where);
207}

◆ throwExcInvalidLink()

void SG::throwExcInvalidLink ( CLID clid,
const std::string & key,
SG::sgkey_t sgkey )

Throw a SG::ExcInvalidLink exception.

Parameters
clidCLID of the link.
keyString key of the link.
sgkeyHashed key of the link.

Definition at line 111 of file Control/AthLinks/src/exceptions.cxx.

112{
113 throw ExcInvalidLink (clid, key, sgkey);
114}

◆ throwExcMissingBaseInfo()

void SG::throwExcMissingBaseInfo ( const std::type_info & ti)

Throw a SG::ExcMissingBaseInfo exception.

Parameters
titype_info for the class with the missing base info.

Definition at line 447 of file Control/AthContainers/Root/exceptions.cxx.

448{
449 throw ExcMissingBaseInfo (ti);
450}

◆ throwExcMissingViewVectorCLID()

void SG::throwExcMissingViewVectorCLID ( const std::type_info & ti)

Throw a SG::ExcMissingViewVectorCLID exception.

Throw a SG::ExcViewVectorCLID exception.

Parameters
titype_info for the class with the missing CLID.

Definition at line 425 of file Control/AthContainers/Root/exceptions.cxx.

426{
427 throw ExcMissingViewVectorCLID (ti);
428}

◆ throwExcNonConstHandleKey()

void SG::throwExcNonConstHandleKey ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Throw a SG::ExcNonConstHandleKey exception.

Parameters
clidCLID from the key.
sgkeyStoreGate key from the key.
storenameStore name from the key.

Definition at line 337 of file Control/StoreGate/src/exceptions.cxx.

340{
341 throw ExcNonConstHandleKey (clid, sgkey, storename);
342}
Exception — Attempt to get non-const VarHandleKey from non-owning VarHandle.

◆ throwExcNonowningContainer()

void SG::throwExcNonowningContainer ( )

Throw a SG::ExcNonowningContainer exception.

Definition at line 307 of file Control/AthContainers/Root/exceptions.cxx.

308{
309 throw ExcNonowningContainer();
310}
Exception — Attempted to insert a unique_ptr to a non-owning container.

◆ throwExcNullHandleKey()

void SG::throwExcNullHandleKey ( )

Throw a SG::ExcNullHandleKey exception.

Definition at line 32 of file Control/StoreGate/src/exceptions.cxx.

33{
34 throw ExcNullHandleKey();
35}
Exception — Attempt to dereference a Read/Write/UpdateHandle with a null key.

◆ throwExcNullReadHandle()

void SG::throwExcNullReadHandle ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Throw a SG::ExcNullReadHandle exception.

Parameters
clidCLID from the key.
sgkeyStoreGate key from the key.
storenameStore name from the key.

Definition at line 247 of file Control/StoreGate/src/exceptions.cxx.

250{
251 throw ExcNullReadHandle (clid, sgkey, storename);
252}
Exception — Deference of read handle failed.

◆ throwExcNullUpdateHandle()

void SG::throwExcNullUpdateHandle ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Throw a SG::ExcNullUpdateHandle exception.

Parameters
clidCLID from the key.
sgkeyStoreGate key from the key.
storenameStore name from the key.

Definition at line 292 of file Control/StoreGate/src/exceptions.cxx.

295{
296 throw ExcNullUpdateHandle (clid, sgkey, storename);
297}
Exception — Deference of update handle failed.

◆ throwExcNullWriteHandle()

void SG::throwExcNullWriteHandle ( CLID clid,
const std::string & sgkey,
const std::string & storename )

Throw a SG::ExcNullWriteHandle exception.

Parameters
clidCLID from the key.
sgkeyStoreGate key from the key.
storenameStore name from the key.

Definition at line 202 of file Control/StoreGate/src/exceptions.cxx.

205{
206 throw ExcNullWriteHandle (clid, sgkey, storename);
207}
Exception — Attempt to dereference write handle before record.

◆ throwExcUnknownAuxItem()

void SG::throwExcUnknownAuxItem ( const std::string & name,
const std::string & clsname = "",
const std::type_info * typ = 0 )

Throw a SG::ExcUnknownAuxItem exception.

Parameters
nameName of the aux data item.
clsnameClass name of the aux data item, or an empty string.
typType of the item, if provided.

Definition at line 353 of file Control/AthContainers/Root/exceptions.cxx.

356{
357 throw ExcUnknownAuxItem (name, clsname, typ);
358}

◆ throwExcViewVectorNotView()

void SG::throwExcViewVectorNotView ( )

Throw a SG::ExcViewVectorNotView exception.

Definition at line 400 of file Control/AthContainers/Root/exceptions.cxx.

401{
402 throw ExcViewVectorNotView();
403}
Exception — ViewVector not in view mode.

◆ throwJaggedVecOverlappingCopy()

void SG::throwJaggedVecOverlappingCopy ( )

Throw a SG::ExcJaggedVecOverlappingCopy exception.

Definition at line 690 of file Control/AthContainers/Root/exceptions.cxx.

691{
693}
Exception — Overlapping copies not implemented for jagged vectors.

◆ toTransient() [1/2]

virtual void SG::toTransient ( const EventContext & ctx)
overridevirtual

Perform post-read processing on this store.

Parameters
ctxThe current event context.

Some object types require some processing after being read before they are usable. This can be indicated by specializing SG::ToTransient for the vector type containing the variable. This method will call such a ToTransient method for all contained variables for which this is required.

◆ toTransient() [2/2]

void SG::toTransient ( const EventContext & ctx,
SG::auxid_t auxid )

Perform post-read processing for a single variable.

Parameters
ctxThe current event context.
auxidThe ID of the variable to process.

Some object types require some processing after being read before they are usable. This can be indicated by specializing SG::ToTransient for the vector type containing the variable. This method will call such a ToTransient method for the single variable identified by AUXID.

◆ trackIndices()

bool SG::trackIndices ( ) const

Return true if index tracking is enabled for this object.

Always returns true. Included here to be consistent with AuxVectorBase when standalone objects may be used as template parameters.

◆ usingPrivateStore()

bool SG::AuxElement::usingPrivateStore ( ) const

Test to see if this object is currently using a private store.

Definition at line 280 of file AuxElement.cxx.

281{
282 return havePrivateData() &&
283 typeid(*m_container) == typeid(AuxElementPrivateData);
284}

◆ usingStandaloneStore()

bool SG::AuxElement::usingStandaloneStore ( ) const

Test to see if this object is currently using a standalone store.

Test to see if this object is currently using a private store.

Definition at line 290 of file AuxElement.cxx.

291{
292 return havePrivateData() &&
293 typeid(*m_container) == typeid(AuxElementStandaloneData);
294}

◆ ViewVectorBaseStreamerFunc()

void SG::ViewVectorBaseStreamerFunc ( TBuffer & b,
void * p )

Definition at line 27 of file ViewVectorBaseStreamer.cxx.

28{
29 static TClass* const cl = TClass::GetClass ("SG::ViewVectorBase");
30 if (b.IsReading()) {
31 cl->ReadBuffer (b, p);
32 } else {
33 SG::ViewVectorBase* vvb = reinterpret_cast<SG::ViewVectorBase*>(p);
34 vvb->toPersistent();
35 cl->WriteBuffer(b, p);
36 }
37}
Hold the persistent representation for a ViewVector.
virtual void toPersistent()=0
Convert the vector to persistent form.

◆ writePackedParameters()

void SG::writePackedParameters ( TBuffer & b,
const SG::PackedParameters & parms )
inline

Write a set of packed parameters to a buffer.

Parameters
bBuffer to which to write.
paramParameters to write.

Definition at line 31 of file PackedContainerStreamer.cxx.

31 {
32 b << parms.nbits();
33 b << parms.flags();
34 if (parms.isFloat()) {
35 b << parms.nmantissa();
36 if (parms.hasScale())
37 b << parms.scale();
38 }
39}
bool hasScale() const
Should floats be rescaled before writing?
bool isFloat() const
Are elements being written as floating-point numbers?
uint8_t nbits() const
The number of bits used to store each element.
uint8_t nmantissa() const
The number of bits used for the mantissa portion of a float-point representation, excluding a sign bi...
float scale() const
Return the scale for floating-point numbers.
uint8_t flags() const
Additional flags describing the packing.

◆ xAODInterfaceSupportingThinning()

template<class T>
bool constexpr SG::xAODInterfaceSupportingThinning ( )
constexpr

Test for an xAOD interface class supporting thinning.

Returns true if T derives from either AuxVectorBase or AuxElement and T::supportsThinning is true.

Definition at line 42 of file supportsThinning.h.

42 {
43
44 constexpr bool isxAODInterfaceObject =
45 std::derived_from<T, SG::AuxVectorBase> ||
46 std::derived_from<T, SG::AuxElement>;
47
48 if constexpr (isxAODInterfaceObject)
49 return T::supportsThinning;
50 else
51 return false;
52}

◆ xAODStoreSupportingThinning()

template<class T, typename std::enable_if_t< is_xAODStoreObject_v< T > > * = nullptr>
bool constexpr SG::xAODStoreSupportingThinning ( )
constexpr

Definition at line 68 of file supportsThinning.h.

68{ return T::supportsThinning; }

◆ ~ArenaHeapAllocator()

SG::ArenaHeapAllocator::~ArenaHeapAllocator ( )
virtual

Destructor.

This will free all the Allocator's storage.

Definition at line 40 of file ArenaHeapAllocator.cxx.

41{
42 if (m_protected) {
43 try {
44 unprotect();
45 }
46 catch (const SG::ExcProtection&) {
47 // Got an error from mprotect...
48 std::abort();
49 }
50 }
52}
void eraseUnprotected()
Free all allocated elements and release memory back to the system.
Exception — Attempt to change memory protection failed.

◆ ~AuxElement()

SG::~AuxElement ( )

Destructor.

Any private store is deleted.

◆ ~AuxStoreInternal()

SG::AuxStoreInternal::~AuxStoreInternal ( )
virtual

Destructor.

All contained data will be deleted.

Definition at line 43 of file AuxStoreInternal.cxx.

44{
45}

Variable Documentation

◆ ArenaBlockBodyOffset

const int SG::ArenaBlockBodyOffset
static
Initial value:

The offset from the start of the block to the first element.

Definition at line 254 of file ArenaBlock.h.

◆ auxAllocatorNamePrefix

const char* SG::auxAllocatorNamePrefix = "std::allocator<"
constexpr

Definition at line 29 of file AuxDataTraits.h.

◆ auxid_set_size_hint

const auxid_t SG::auxid_set_size_hint = 2048
static

A hint for how large we should make the auxid bitsets.

It's best if we don't need to reallocate them later; but on the other hand, we don't want this to be larger than it really needs to be. The largest auxid i saw in a reco job was about 1800, so this is probably good for now.

Definition at line 40 of file AuxTypes.h.

◆ DEFAULTKEY

const std::string SG::DEFAULTKEY = ""

Definition at line 12 of file DefaultKey.h.

◆ defaultQuiet

bool SG::defaultQuiet = false
staticconstexpr

Definition at line 45 of file StoreGate/StoreGate/VarHandleBase.h.

◆ getDataSourcePointerFunc

getDataSourcePointerFunc_t* SG::getDataSourcePointerFunc
extern

◆ is_xAODStoreObject_v

template<class T>
bool SG::is_xAODStoreObject_v
inlineconstexpr
Initial value:
=
std::is_base_of_v<SG::IAuxStore, T>

Test for an xAOD auxiliary store class supporting thinning.

Returns true if T derives from IAuxStore and T::supportsThinning is true. (The enable_if's are to avoid getting undefined symbol errors when T is not an xAOD object.)

Definition at line 64 of file supportsThinning.h.

◆ m_auxid

SG::auxid_t SG::m_auxid
private

The cached auxid.

Definition at line 253 of file Decorator.h.

◆ m_auxids

SG::auxid_set_t SG::m_auxids
private

Set of auxid's for which we've created a vector.

Definition at line 491 of file AuxStoreInternal.h.

◆ m_curStore

IProxyDict * SG::CurrentEventStore::m_curStore = nullptr
thread_localstaticprivate

The current event store.

Definition at line 70 of file SGTools/SGTools/CurrentEventStore.h.

◆ m_decorations

SG::auxid_set_t SG::m_decorations
private

Record which variables are decorations.

Definition at line 488 of file AuxStoreInternal.h.

◆ m_freeptr

pointer SG::m_freeptr
private

Pointer to the next free element.

Definition at line 213 of file ArenaHeapAllocator.h.

◆ m_index

size_t SG::m_index
private

The index of this element within its container. Should be 0 if this object is not within a container.

Definition at line 128 of file IAuxElement.h.

◆ m_locked

bool SG::m_locked
private

Has this container been locked?

Definition at line 494 of file AuxStoreInternal.h.

◆ m_mutex

mutex_t SG::m_mutex
mutableprivate

Definition at line 499 of file AuxStoreInternal.h.

◆ m_privateStoreState

PrivateStoreState SG::m_privateStoreState
private

Definition at line 137 of file IAuxElement.h.

◆ m_standalone

bool SG::m_standalone
private

Are we being written in standalone mode?

Definition at line 481 of file AuxStoreInternal.h.

◆ m_vecs

std::vector<std::unique_ptr<IAuxTypeVector> > SG::m_vecs
private

The collection of vectors of aux data that we're managing, indexed by auxid.

Definition at line 485 of file AuxStoreInternal.h.

◆ null_auxid

const auxid_t SG::null_auxid = static_cast<auxid_t> (-1)
static

To signal no aux data item.

Definition at line 30 of file AuxTypes.h.

◆ s_sgkey_nullval

auto SG::s_sgkey_nullval
staticconstexpr
Initial value:
=
uintptr_t ConcurrentHashmapVal_t
Type used for keys and values — an unsigned big enough to hold a pointer.

Definition at line 24 of file sgkey_utilities.h.

◆ supportsThinning

bool SG::supportsThinning = true
staticconstexpr

Mark that this type supports thinning operations. See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 960 of file AuxElement.h.

◆ viewVectorBaseStreamerInstance

InstallViewVectorBaseStreamer SG::viewVectorBaseStreamerInstance

Definition at line 53 of file ViewVectorBaseStreamer.cxx.