Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
2 #ifndef XAODROOTACCESS_TOOLS_AUXSTOREBASE_H
3 #define XAODROOTACCESS_TOOLS_AUXSTOREBASE_H
16 #include <string_view>
48 const std::string&
prefix()
const;
74 std::size_t capacity)
override;
80 virtual void lock()
override;
89 virtual std::size_t
size()
const override;
104 std::size_t capacity)
override;
110 virtual bool resize(std::size_t
size)
override;
114 virtual void shift(std::size_t
pos, std::ptrdiff_t offs)
override;
191 std::vector<std::unique_ptr<SG::IAuxTypeVector> >
m_vecs{};
206 using guard_t = AthContainers_detail::lock_guard<mutex_t>;
220 #endif // XAODROOTACCESS_TOOLS_AUXSTOREBASE_H
const std::string & prefix() const
Get the currently configured object name prefix.
std::vector< std::unique_ptr< SG::IAuxTypeVector > > m_vecs
Variables handled currently by the object (indexed by auxiliary ID)
virtual const SG::auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
virtual const std::type_info * getInputType(SG::auxid_t auxid) const =0
Get the type of an input object, for getIOType()
virtual StatusCode getEntryFor(SG::auxid_t auxid)=0
Load a single variable from the input.
virtual void selectAux(const std::set< std::string > &attributes)
Select dynamic auxiliary attributes for writing.
void setTopStore(bool value=true)
Set whether the object should behave as a "top store" or not.
virtual bool clearDecorations() override
Remove the decorations added so far.
SG::auxid_set_t m_auxIDs
Internal list of auxiliary variable IDs handled currently by the object.
EStructMode
"Structural" modes of the object
AthContainers_detail::lock_guard< mutex_t > guard_t
Guard type for multithreaded synchronisation.
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return (const) interface for a linked variable.
std::unique_ptr< SG::AuxStoreInternal > m_transientStore
Store for the in-memory-only variables.
std::size_t m_size
The current size of the container being described.
virtual bool hasOutput() const =0
Check if an output is being written by the object.
virtual bool hasEntryFor(SG::auxid_t auxid) const =0
Check if a given variable is available from the input.
@ kObjectStore
The object describes a single object.
EStructMode structMode() const
Get what structure mode the object was constructed with.
@ kContainerStore
The object describes an entire container.
@ u
Enums for curvilinear frames.
virtual std::size_t size() const override
Return the number of elements in the store.
Interface providing I/O for a generic auxiliary store.
SG::auxid_set_t m_decorIDs
Internal list of auxiliary decoration IDs handled currently by the object.
virtual const SG::auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual const SG::auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
Common base class for the auxiliary store implementations.
virtual StatusCode setupInputData(SG::auxid_t auxid)=0
Connect a variable to the input.
virtual ~AuxStoreBase()
Destructor.
virtual const SG::auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
size_t auxid_t
Identifier for a particular aux data item.
virtual void reset()=0
Reset all (transient) information in the object.
Members m_data
Member variables of the base class.
void setStructMode(EStructMode mode)
Set the structure mode of the object to a new value.
AthContainers_detail::mutex mutex_t
Mutex type for multithread synchronization.
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.
Interface providing I/O for a generic auxiliary store.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void setPrefix(std::string_view prefix)=0
Set the object name prefix.
std::string m_prefix
Static prefix for the branch names.
virtual const void * getData(SG::auxid_t auxid) const override
Get a pointer to a given array.
virtual void lock() override
Lock the object, and don't let decorations be added.
virtual bool resize(std::size_t size) override
Resize the arrays to a given size.
virtual StatusCode setupOutputData(SG::auxid_t auxid)=0
Connect a variable to the output.
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected aux variables.
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
Return vector interface for one aux data item.
bool isAuxIDSelected(SG::auxid_t auxid) const
Check if an auxiliary variable is selected for ouput writing.
Class helping in dealing with dynamic branch selection.
AuxStoreBase(bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore)
Constructor.
EStructMode m_structMode
The "structural" mode of the object.
virtual bool insertMove(std::size_t pos, SG::IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
virtual const void * getInputObject(SG::auxid_t auxid) const =0
Get a pointer to an input object, as it is in memory, for getIOData()
virtual void shift(std::size_t pos, std::ptrdiff_t offs) override
Shift the contents of the stored arrays.
Interface for non-const operations on an auxiliary store.
bool m_locked
Is this container locked?
virtual void reserve(std::size_t size) override
Reserve a given size for the arrays.
bool isTopStore() const
Check if the object is a "top store", or not.
virtual void * getDecoration(SG::auxid_t auxid, std::size_t size, std::size_t capacity) override
Get a pointer to a given array, creating the array if necessary.
Abstract interface for manipulating vectors of arbitrary types.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Interface for non-const operations on an auxiliary store.
virtual const void * getIOData(SG::auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
mutex_t m_mutex1
Mutex objects used for multithreaded synchronisation.
@ kUndefinedStore
The structure mode is not defined.
A set of aux data identifiers.
std::vector< bool > m_isDecoration
Per variable lock status (indexed by auxiliary ID)
An auxiliary data store that holds data internally.
std::string m_dynPrefix
Dynamic prefix for the branch names.
virtual bool isDecoration(SG::auxid_t auxid) const override
Test if a variable is a decoration.
bool m_topStore
Flag stating whether this is a "top store".
AuxSelection m_selection
Object helping to select which auxiliary variables to write.
Struct collecting all member variables of this base class.