xAOD::AuxPersVector< T, VEC > Class Template Reference

#include <AuxPersVector.h>

Inheritance diagram for xAOD::AuxPersVector< T, VEC >:
SG::IAuxTypeVector

List of all members.

Public Types

typedef VEC & vector_type
 Convenience type definition.

Public Member Functions

 AuxPersVector (vector_type vec)
 Constructor.
virtual SG::IAuxTypeVectorclone () const
 Make a copy of this vector.
virtual void * toPtr ()
 Return a pointer to the start of the vector's data.
virtual void * toVector ()
 Return a pointer to the STL vector itself.
virtual size_t size () const
 Return the size of the vector.
virtual void resize (size_t sz)
 Change the size of the vector.
virtual void reserve (size_t sz)
 Change the capacity of the vector.
virtual void shift (size_t pos, ptrdiff_t offs)
 Shift the elements of the vector.
virtual bool setOption (const SG::AuxDataOption &option)
 Set an option for this variable.
virtual const std::type_info * objType () const
 Return the type of the complete object to be saved.

Detailed Description

template<class T, class VEC = std::vector< T >>
class xAOD::AuxPersVector< T, VEC >

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...

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
785202
Date
2016-11-18 19:42:53 +0100 (Fri, 18 Nov 2016)

Member Function Documentation

template<class T, class VEC = std::vector< T >>
virtual const std::type_info* xAOD::AuxPersVector< T, VEC >::objType (  )  const [inline, virtual]

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 from SG::IAuxTypeVector.

template<class T, class VEC = std::vector< T >>
virtual void xAOD::AuxPersVector< T, VEC >::reserve ( size_t  sz  )  [inline, virtual]

Change the capacity of the vector.

Parameters:
sz The new vector capacity.

Implements SG::IAuxTypeVector.

template<class T, class VEC = std::vector< T >>
virtual void xAOD::AuxPersVector< T, VEC >::resize ( size_t  sz  )  [inline, virtual]

Change the size of the vector.

Parameters:
sz The new vector size.

Implements SG::IAuxTypeVector.

template<class T, class VEC = std::vector< T >>
virtual bool xAOD::AuxPersVector< T, VEC >::setOption ( const SG::AuxDataOption  )  [inline, virtual]

Set an option for this variable.

Parameters:
option The option to set.

The interpretation of the option depends on the particular representation of the variable provided by the concrete class.

Returns true if the option setting was successful; false otherwise.

Reimplemented from SG::IAuxTypeVector.

template<class T, class VEC = std::vector< T >>
virtual void xAOD::AuxPersVector< T, VEC >::shift ( size_t  pos,
ptrdiff_t  offs 
) [inline, virtual]

Shift the elements of the vector.

Parameters:
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).

Implements SG::IAuxTypeVector.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1