ATLAS Offline Software
|
Class managing concrete vector variables. More...
#include <AuxPersVector.h>
Public Types | |
typedef VEC & | vector_type |
Convenience type definition. More... | |
typedef AuxDataTraits< T >::element_type | element_type |
Type that the user sees. More... | |
typedef vector_type::value_type | vector_value_type |
Vector element type. More... | |
Public Member Functions | |
AuxPersVector (SG::auxid_t auxid, vector_type vec) | |
Constructor. More... | |
virtual std::unique_ptr< SG::IAuxTypeVector > | clone () const |
Make a copy of this vector. More... | |
vector_type & | vec () |
Return a reference to the payload vector. More... | |
virtual std::unique_ptr< IAuxTypeVector > | clone () const override |
Make a copy of this vector. More... | |
virtual auxid_t | auxid () const override |
Return the auxid of the variable this vector represents. More... | |
virtual auxid_t | auxid () const =0 |
Return the auxid of the variable this vector represents. More... | |
virtual void * | toPtr () override |
Return a pointer to the start of the vector's data. More... | |
virtual const void * | toPtr () const override |
Return a pointer to the start of the vector's data. More... | |
virtual const void * | toPtr () const =0 |
Return a pointer to the start of the vector's data. More... | |
virtual void * | toVector () override |
Return a pointer to the STL vector itself. More... | |
virtual const std::type_info * | objType () const override |
Return the type of the payload object for this instance. More... | |
virtual const std::type_info * | objType () const |
Return the type of the complete object to be saved. More... | |
virtual size_t | size () const override |
Return the size of the vector. More... | |
virtual size_t | size () const =0 |
Return the size of the vector. More... | |
virtual bool | resize (size_t sz) override |
Change the size of the vector. More... | |
virtual void | reserve (size_t sz) override |
Change the capacity of the vector. More... | |
virtual bool | setOption (const AuxDataOption &option) override |
Make an option setting. More... | |
virtual bool | shift (size_t pos, ptrdiff_t offs) override |
Shift the elements of the vector. More... | |
virtual bool | insertMove (size_t pos, void *beg, void *end, IAuxStore &srcStore) override |
Insert elements into the vector via move semantics. More... | |
virtual std::unique_ptr< IAuxTypeVector > | toPacked () override |
Try to convert this aux vector to a PackedContainer . More... | |
Protected Attributes | |
auxid_t | m_auxid |
The auxid of the variable this vector represents. More... | |
Static Protected Attributes | |
static const int | SCALE |
1 for the usual case of V being vector<T> . More... | |
Private Member Functions | |
void | insertMove1 (typename CONT::iterator pos, element_type *beg, element_type *end, std::true_type) |
Helper for insertMove . More... | |
void | insertMove1 (typename CONT::iterator pos, element_type *beg, element_type *end, std::false_type) |
Helper for insertMove . More... | |
Private Attributes | |
vector_type * | m_vecPtr |
The contained vector. More... | |
bool | m_ownFlag |
True if we need to delete the object. More... | |
Class managing concrete vector variables.
This class is used internally by the "special" auxiliary store objects to manage the auxiliary variables handled by them. User code probably doesn't want to touch it directly...
Definition at line 28 of file AuxPersVector.h.
|
inherited |
Type that the user sees.
Definition at line 57 of file AuxTypeVector.h.
typedef VEC& xAOD::AuxPersVector< T, VEC >::vector_type |
Convenience type definition.
Definition at line 32 of file AuxPersVector.h.
|
inherited |
Vector element type.
Definition at line 60 of file AuxTypeVector.h.
|
inline |
|
pure virtualinherited |
Return the auxid of the variable this vector represents.
Implemented in SG::AuxTypeVectorHolder< T, CONT >, SG::RootAuxVector, xAOD::TAuxVector, and xAOD::AuxPersInfo< T >.
|
overridevirtualinherited |
Return the auxid of the variable this vector represents.
|
inlinevirtual |
Make a copy of this vector.
Implements SG::IAuxTypeVector.
Definition at line 38 of file AuxPersVector.h.
|
overridevirtualinherited |
Make a copy of this vector.
|
overridevirtualinherited |
Insert elements into the vector via move semantics.
pos | The starting index of the insertion. |
beg | Start of the range of elements to insert. |
end | End of the range of elements to insert. |
srcStore | The source store. |
beg
and end
define a range of container elements, with length len
defined by the difference of the pointers divided by the element size.
The size of the container will be increased by len
, with the elements starting at pos
copied to pos+len
.
The contents of the beg:end
range will then be moved to our vector starting at pos
. This will be done via move semantics if possible; otherwise, it will be done with a copy.
Returns true if it is known that the vector's memory did not move, false otherwise.
Implements SG::IAuxTypeVector.
|
privateinherited |
Helper for insertMove
.
pos | The starting index of the insertion. |
beg | Start of the range of elements to insert. |
end | End of the range of elements to insert. |
This does the actual move for non-POD types.
|
privateinherited |
Helper for insertMove
.
pos | The starting index of the insertion. |
beg | Start of the range of elements to insert. |
end | End of the range of elements to insert. |
This does the actual move for POD types.
|
inlinevirtualinherited |
Return the type of the complete object to be saved.
For example, if the object is a std::vector
, then we return the type_info
of the vector. But if we're holding a PackedContainer
, then we return the type_info
of the PackedContainer
.
Can return null if the operation is not supported. In that case, I/O will use the type found from the variable registry.
Reimplemented in SG::RootAuxVector, SG::AuxTypeVectorHolder< T, CONT >, and xAOD::AuxPersInfo< T >.
Definition at line 192 of file IAuxTypeVector.h.
|
overridevirtualinherited |
Return the type of the payload object for this instance.
May be different from what we get from the registry; if packing is used, for example.
|
overridevirtualinherited |
Change the capacity of the vector.
sz | The new vector capacity. |
Implements SG::IAuxTypeVector.
|
overridevirtualinherited |
Change the size of the vector.
sz | The new vector size. Returns true if it is known that iterators have not been invalidated; false otherwise. (Will always return false when increasing the size of an empty container.) |
Implements SG::IAuxTypeVector.
|
overridevirtualinherited |
Make an option setting.
option | The option to set. |
The interpretation of the option depends on the concrete class.
Returns true if the option setting was successful; false otherwise.
Reimplemented from SG::IAuxTypeVector.
|
overridevirtualinherited |
Shift the elements of the vector.
pos | The starting index for the shift. |
offs | The (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).
Returns true if it is known that iterators have not been invalidated; false otherwise. (Will always return false when increasing the size of an empty container.)
Implements SG::IAuxTypeVector.
|
pure virtualinherited |
Return the size of the vector.
Implemented in SG::AuxTypeVectorHolder< T, CONT >, SG::RootAuxVector, xAOD::TAuxVector, and xAOD::AuxPersInfo< T >.
|
overridevirtualinherited |
Return the size of the vector.
|
overridevirtualinherited |
Try to convert this aux vector to a PackedContainer
.
If successful, returns a newly-allocated IAuxTypeVector
. In this case, the contents of the vector will have been moved to the new vector (and this object will be empty).
Returns null on failure.
Reimplemented from SG::IAuxTypeVector.
|
pure virtualinherited |
Return a pointer to the start of the vector's data.
Implemented in SG::AuxTypeVectorHolder< T, CONT >, SG::RootAuxVector, xAOD::TAuxVector, and xAOD::AuxPersInfo< T >.
|
overridevirtualinherited |
Return a pointer to the start of the vector's data.
Implements SG::IAuxTypeVector.
|
overridevirtualinherited |
Return a pointer to the start of the vector's data.
Implements SG::IAuxTypeVector.
|
overridevirtualinherited |
Return a pointer to the STL vector itself.
Implements SG::IAuxTypeVector.
|
inherited |
Return a reference to the payload vector.
|
protectedinherited |
The auxid of the variable this vector represents.
Definition at line 293 of file AuxTypeVector.h.
|
privateinherited |
True if we need to delete the object.
Definition at line 289 of file AuxTypeVector.h.
|
privateinherited |
The contained vector.
Definition at line 286 of file AuxTypeVector.h.
|
staticprotectedinherited |
1 for the usual case of V
being vector<T>
.
If V
is vector<char>
, then this is sizeof(T)
.
Definition at line 66 of file AuxTypeVector.h.