SG::PackedContainer< T > Class Template Reference

Container to hold aux data to be stored in a packed form. More...

#include <PackedContainer.h>

Inheritance diagram for SG::PackedContainer< T >:
SG::IAuxSetOption

List of all members.

Public Types

typedef std::vector< Tvector_type
 We act like this type.

Public Member Functions

 PackedContainer ()
 Constructor.
virtual bool setOption (const AuxDataOption &option) ATH_OVERRIDE
 Set a packing option.
bool setOption (const std::string &name, int val)
 Set a packing option.
bool setOption (const std::string &name, float val)
 Set a packing option.
bool setOption (const std::string &name, double val)
 Set a packing option.
const PackedParametersparms () const
 Return the packing parameters for this container.
void setParms (const PackedParameters &parms)
 Set the packing parameters.

Detailed Description

template<class T>
class SG::PackedContainer< T >

Container to hold aux data to be stored in a packed form.

This class acts as a std::vector<T> (in fact, it derives from that type). However, we set up a special ROOT streamer for this type so that when it is saved, it is written in a packed format. The details of the packing are given by the PackedParameters (which see) instance that we hold.

User code should generally not interact with this class directly.

PackedContainer may be used as a static auxiliary variable by using it instead of the corresponding vector class in the auxiliary store class. Packing parameters may then be set by calling setOption from the constructor for the aux store object.

For dynamic auxiliary variables, the stored vector is automatically converted to a PackedContainer when setOption is called for the variable.


Constructor & Destructor Documentation

template<class T >
SG::PackedContainer< T >::PackedContainer (  )  [inline]

Constructor.

The packing parameters will be initialized to defaults appropriate for type T. (See PackedParameters.)


Member Function Documentation

template<class T >
bool SG::PackedContainer< T >::setOption ( const std::string &  name,
double  val 
) [inline]

Set a packing option.

Parameters:
name The option name.
val The option value.

Returns true on success, false otherwise.

See PackedParameters::setOptions for details.

template<class T >
bool SG::PackedContainer< T >::setOption ( const std::string &  name,
float  val 
) [inline]

Set a packing option.

Parameters:
name The option name.
val The option value.

Returns true on success, false otherwise.

See PackedParameters::setOptions for details.

template<class T >
bool SG::PackedContainer< T >::setOption ( const std::string &  name,
int  val 
) [inline]

Set a packing option.

Parameters:
name The option name.
val The option value.

Returns true on success, false otherwise.

See PackedParameters::setOptions for details.

template<class T >
bool SG::PackedContainer< T >::setOption ( const AuxDataOption option  )  [inline, virtual]

Set a packing option.

Parameters:
option The option to set.

Returns true on success, false otherwise.

See PackedParameters::setOptions for details.

Implements SG::IAuxSetOption.

template<class T >
void SG::PackedContainer< T >::setParms ( const PackedParameters parms  )  [inline]

Set the packing parameters.

Parameters:
parms The new packing parameters.

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

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1