Container to hold aux data to be stored in a packed form. More...
#include <PackedContainer.h>
Public Types | |
typedef std::vector< T > | vector_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 PackedParameters & | parms () const |
Return the packing parameters for this container. | |
void | setParms (const PackedParameters &parms) |
Set the packing parameters. |
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.
SG::PackedContainer< T >::PackedContainer | ( | ) | [inline] |
Constructor.
The packing parameters will be initialized to defaults appropriate for type T
. (See PackedParameters
.)
bool SG::PackedContainer< T >::setOption | ( | const std::string & | name, | |
double | val | |||
) | [inline] |
Set a packing option.
name | The option name. | |
val | The option value. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
bool SG::PackedContainer< T >::setOption | ( | const std::string & | name, | |
float | val | |||
) | [inline] |
Set a packing option.
name | The option name. | |
val | The option value. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
bool SG::PackedContainer< T >::setOption | ( | const std::string & | name, | |
int | val | |||
) | [inline] |
Set a packing option.
name | The option name. | |
val | The option value. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
bool SG::PackedContainer< T >::setOption | ( | const AuxDataOption & | option | ) | [inline, virtual] |
Set a packing option.
option | The option to set. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
Implements SG::IAuxSetOption.
void SG::PackedContainer< T >::setParms | ( | const PackedParameters & | parms | ) | [inline] |
Set the packing parameters.
parms | The new packing parameters. |