|
ATLAS Offline Software
|
Go to the documentation of this file.
34 m_storeIO( nullptr ), m_ownsStore( true ), m_locked( false ),
35 m_parentLink(), m_parentIO( nullptr ), m_shallowIO( true ),
37 m_auxidsValid (false),
44 :
SG::IAuxStore(),
SG::IAuxStoreIO(),
SG::IAuxStoreHolder(),
45 m_store(
parent.m_store ), m_storeIO(
parent.m_storeIO ),
46 m_ownsStore( false ), m_locked(
parent.m_locked ),
47 m_parentLink(
parent.m_parentLink ),
48 m_parentIO(
parent.m_parentIO ), m_shallowIO(
parent.m_shallowIO ),
67 m_storeIO( nullptr ), m_ownsStore( true ), m_locked( false ),
68 m_parentLink(
parent ), m_parentIO( nullptr ), m_shallowIO( true ),
70 m_auxidsValid (false),
110 m_auxids = rhs.m_auxids;
111 m_auxidsValid= rhs.m_auxidsValid;
128 m_auxidsValid =
false;
174 m_auxidsValid =
false;
230 if (!m_auxidsValid) {
240 if (!m_auxidsValid) {
289 if( cptr !=
nullptr ) {
298 if( pptr ==
nullptr ) {
310 if(
type ==
nullptr ) {
312 message <<
"Couldn't find the type of auxiliary ID " << auxid;
313 throw std::runtime_error(
message.str() );
317 const std::type_info* allocType = reg.
getAllocType( auxid );
318 if( allocType ==
nullptr ) {
320 message <<
"Couldn't find the allocator type of auxiliary ID " << auxid;
321 throw std::runtime_error(
message.str() );
327 if( factory ==
nullptr ) {
329 message <<
"Couldn't find a factory for type " <<
type->name();
330 throw std::runtime_error(
message.str() );
334 factory->
copy( auxid,
357 m_auxidsValid =
false;
408 if( cptr !=
nullptr ) {
429 if(
type ==
nullptr ) {
431 message <<
"Couldn't find the type of auxiliary ID " << auxid;
432 throw std::runtime_error(
message.str() );
436 const std::type_info* allocType = reg.
getAllocType( auxid );
437 if( allocType ==
nullptr ) {
439 message <<
"Couldn't find the allocator type of auxiliary ID " << auxid;
440 throw std::runtime_error(
message.str() );
446 if( factory ==
nullptr ) {
448 message <<
"Couldn't find a factory for type " <<
type->name();
449 throw std::runtime_error(
message.str() );
453 factory->
copy( auxid,
475 throw std::runtime_error(
"Trying to call resize on a shallow copy "
482 throw std::runtime_error(
"Trying to call reserve on a shallow copy "
489 throw std::runtime_error(
"Trying to call shift on a shallow copy "
498 throw std::runtime_error(
"Trying to call insertMove on a shallow copy "
529 std::cerr <<
"ERROR xAOD::ShallowAuxContainer::getIOData Unknown "
532 <<
") requested" << std::endl;
555 std::cerr <<
"ERROR xAOD::ShallowAuxContainer::getIOType Unknown "
558 <<
") requested" << std::endl;
619 m_auxidsValid =
true;
const IAuxTypeVectorFactory * getFactory(const std::type_info &ti, const std::type_info &ti_alloc)
Return the vector factory for a given vector element type.
ShallowAuxContainer & operator=(const ShallowAuxContainer &rhs)
Assignment operator.
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
virtual void lockDecoration(SG::auxid_t auxid)=0
Lock a decoration.
bit_t count() const
Count the number of 1 bits in the set.
virtual void lock() override
Lock the container.
virtual const IAuxTypeVector * getVector(SG::auxid_t auxid) const =0
Return vector interface for one aux data item.
virtual const std::type_info * getIOType(auxid_t auxid) const override
Return the type of the data to be stored for one aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Make an AuxVectorData object from either a raw vector or an aux store.
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
const DataLink< SG::IConstAuxStore > & parent() const
Get the parent store.
ShallowAuxContainer(bool standalone=false)
Default constructor.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Exception — Attempted to modify auxiliary data in a locked store.
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override final
Return vector interface for one aux data item.
Exceptions that can be thrown from AthContainers.
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Class creating a shallow copy of an existing auxiliary container.
AthContainers_detail::lock_guard< mutex_t > guard_t
const std::type_info * getAllocType(SG::auxid_t auxid) const
Return the type of the vector allocator.
const char * name() const
Get the name of the container instance.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
AuxSelection m_selection
Dynamic attributes selection implementation.
bool m_shallowIO
Flag for whether to do "shallow IO" or not.
virtual const std::type_info * getIOType(SG::auxid_t auxid) const =0
Return the type of the data to be stored for one aux data item.
void setParent(const DataLink< SG::IConstAuxStore > &link)
Set the parent store.
virtual size_t size() const override
Get the size of the container.
virtual size_t size() const =0
Return the number of elements in the store.
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
Interface providing I/O for a generic auxiliary store.
Handle mappings between names and auxid_t.
void setShallowIO(bool value)
Set whether only the overriden parameters should be written out.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
std::string m_name
Name of the container in memory. Set externally.
size_t auxid_t
Identifier for a particular aux data item.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
DataLink< SG::IConstAuxStore > m_parentLink
Link to the parent object.
bit_t size() const
Count the number of 1 bits in the set.
virtual bool clearDecorations()=0
Clear all decorations.
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Interface for factory objects that create vectors.
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data decoration item.
bool shallowIO() const
Check whether only the overriden parameters will be written out or not.
virtual void copy(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const =0
Copy elements between vectors.
bool isValid() const
Test to see if the link is dereferencable.
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
const_pointer cptr() const
Dereference the link.
const SG::IAuxStoreIO * m_parentIO
Optional pointer to the IO interface of the parent object.
bool m_locked
Flag keeping track of whether this object is locked or not.
virtual const void * getIOData(SG::auxid_t auxid) const =0
Return a pointer to the data to be stored for one aux data item.
void setName(const char *name)
Set the name of the container instance.
virtual const SG::auxid_set_t & getWritableAuxIDs() const =0
Return a set of identifiers for writable data items in this store.
Interface for non-const operations on an auxiliary store.
Make an AuxVectorData object from either a raw array or an aux store.
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
Interface for factory objects that create vectors.
Abstract interface for manipulating vectors of arbitrary types.
virtual const SG::auxid_set_t & getDecorIDs() const =0
Return a set of identifiers for decorations in this store.
Handle mappings between names and auxid_t.
virtual void lock()=0
Lock the container.
A set of aux data identifiers.
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
virtual bool isDecoration(auxid_t auxid) const =0
Test if a particular variable is tagged as a decoration.
virtual SG::auxid_set_t getSelectedAuxIDs(const SG::auxid_set_t &fullset) const
Return which variables were selected to be written out.
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
SG::auxid_t auxid_t
The aux ID type definition.
An auxiliary data store that holds data internally.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
virtual auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
~ShallowAuxContainer()
Destructor.
virtual bool resize(size_t size) override
Resize the arrays to a given size.
void remakeAuxIDs() const
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
bool test(bit_t bit) const
Test to see if a bit is set.
virtual bool clearDecorations() override
Clear all decorations.