32 if( allowDynamicVars ) {
53 guard_t guard( parent.m_mutex );
57 if( parent.m_store ) {
88 std::vector< SG::IAuxTypeVector* >::iterator itr =
m_vecs.begin();
89 std::vector< SG::IAuxTypeVector* >::iterator end =
m_vecs.end();
90 for( ; itr != end; ++itr ) {
91 if( ! *itr )
continue;
108 if(
this == &rhs )
return *
this;
209 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
215 auxids_nc.insert( auxid );
217 auxid_t linked_id =
r.linkedVariable( auxid );
219 auxids_nc.insert( linked_id );
224 std::cout <<
"ERROR xAOD::AuxInfoBase::getData "
225 <<
"Unknown variable ("
227 <<
") requested" << std::endl;
243 return m_store->isDecoration (auxid);
272 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
279 auxid_t linked_id =
r.linkedVariable( auxid );
288 std::cout <<
"ERROR xAOD::AuxInfoBase::getDecoration "
289 <<
"Can't provide variable "
328 bool anycleared =
false;
330 anycleared =
m_store->clearDecorations();
333 if (!anycleared)
return false;
343 ids.insert (
m_store->getAuxIDs());
355 m_store->lockDecoration (auxid);
362 auxid_t linked_id =
r.linkedVariable( auxid );
366 return m_vecs[ linked_id ];
379 auxid_t linked_id =
r.linkedVariable( auxid );
383 return m_vecs[ linked_id ];
386 return m_store->linkedVector( auxid );
430 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
437 auxid_t linked_id =
r.linkedVariable( auxid );
444 std::cout <<
"ERROR xAOD::AuxInfoBase::getData "
445 <<
"Unknown variable ("
447 <<
") requested" << std::endl;
451 m_vecs[ auxid ]->reserve( capacity );
456 return m_vecs[ auxid ]->toPtr();
479 throw std::runtime_error(
"Calling resize with != 1 on a "
486 if(v && !v->isLinked()) {
487 if (!v->resize(
size ))
513 throw std::runtime_error(
"Calling reserve with != 1 on a "
519 if(v && !v->isLinked()) {
543 throw std::runtime_error(
"Calling shift on a non-vector" );
561 throw std::runtime_error(
"Calling insertMove on a non-vector" );
570 return m_vecs[id]->setOption( option );
572 return m_store->setOption(
id, option );
590 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
594 std::cout <<
"ERROR xAOD::AuxInfoBase::getIOData "
595 <<
"Unknown variable ("
597 <<
") requested" << std::endl;
606 if(
m_vecs[ auxid ]->isLinked() )
607 return m_vecs[ auxid ]->toVector();
609 return m_vecs[ auxid ]->toPtr();
617 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
621 std::cout <<
"ERROR xAOD::AuxInfoBase::getIOType "
622 <<
"Unknown variable ("
624 <<
") requested" << std::endl;
629 if(
m_vecs[ auxid ]->isLinked() )
Hold information about an option setting request.
Auxiliary data store for standalone objects.
Handle mappings between names and auxid_t.
Exceptions that can be thrown from AthContainers.
static const Attributes_t empty
Helper for getting a const version of a pointer.
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
Hold information about an option setting request.
Auxiliary data store for standalone objects.
Handle mappings between names and auxid_t.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
const std::type_info * getVecType(SG::auxid_t auxid) const
Return the type of the STL vector used to hold an aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Exception — Attempted to modify auxiliary data in a locked store.
Interface providing I/O for a generic auxiliary store.
Interface for non-const operations on an auxiliary store.
Abstract interface for manipulating vectors of arbitrary types.
A set of aux data identifiers.
Common base class for auxiliary info objects.
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
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.
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
const char * name() const
Get the name of the container instance.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
~AuxInfoBase()
Destructor.
auxid_set_t m_auxids
Internal list of all available variables.
void setName(const char *name)
Set the name of the container instance.
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
AuxInfoBase & operator=(const AuxInfoBase &rhs)
Assignment operator.
std::vector< SG::IAuxTypeVector * > m_vecs
Internal list of all managed variables.
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
virtual void lock() override
Lock the container.
virtual size_t size() const override
Get the size of the container.
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
AuxInfoBase(bool allowDynamicVars=true)
Default constructor.
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
virtual bool setOption(auxid_t id, const SG::AuxDataOption &option) override
Make an option setting on an aux variable.
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override final
Return vector interface for one aux data item.
SG::auxid_t auxid_t
The aux ID type definition.
AthContainers_detail::lock_guard< mutex_t > guard_t
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
bool m_locked
Has the container been locked?
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
virtual bool resize(size_t size) override
Resize the arrays to a given size.
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return interface for a linked variable.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
std::string m_name
Name of the container in memory. Set externally.
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
virtual bool clearDecorations() override
Clear all decorations.
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
ReadStats & stats()
Access the object belonging to the current thread.
static IOStats & instance()
Singleton object accessor.
void readBranch(const std::string &prefix, SG::auxid_t auxid)
Function incrementing the read counter on a specific branch.
const T * as_const_ptr(const T *p)
Helper for getting a const version of a pointer.
static const auxid_t null_auxid
To signal no aux data item.
size_t auxid_t
Identifier for a particular aux data item.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.