ATLAS Offline Software
|
Container to hold aux data to be stored in a packed form. More...
#include <PackedContainer.h>
Public Types | |
typedef std::vector< T, ALLOC > | vector_type |
We act like this type. More... | |
Public Member Functions | |
PackedContainer () | |
Constructor. More... | |
virtual bool | setOption (const AuxDataOption &option) override |
Set a packing option. More... | |
bool | setOption (const std::string &name, int val) |
Set a packing option. More... | |
bool | setOption (const std::string &name, float val) |
Set a packing option. More... | |
bool | setOption (const std::string &name, double val) |
Set a packing option. More... | |
const PackedParameters & | parms () const |
Return the packing parameters for this container. More... | |
void | setParms (const PackedParameters &parms) |
Set the packing parameters. More... | |
Public Attributes | |
T | elements |
STL member. More... | |
Private Attributes | |
PackedParameters | m_parms |
The packing parameters. More... | |
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.
Definition at line 48 of file PackedContainer.h.
typedef std::vector<T, ALLOC> SG::PackedContainer< T, ALLOC >::vector_type |
We act like this type.
Definition at line 53 of file PackedContainer.h.
SG::PackedContainer< T, ALLOC >::PackedContainer | ( | ) |
Constructor.
The packing parameters will be initialized to defaults appropriate for type T
. (See PackedParameters
.)
const PackedParameters& SG::PackedContainer< T, ALLOC >::parms | ( | ) | const |
Return the packing parameters for this container.
|
overridevirtual |
Set a packing option.
option | The option to set. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
Implements SG::IAuxSetOption.
bool SG::PackedContainer< T, ALLOC >::setOption | ( | const std::string & | name, |
double | val | ||
) |
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, ALLOC >::setOption | ( | const std::string & | name, |
float | val | ||
) |
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, ALLOC >::setOption | ( | const std::string & | name, |
int | val | ||
) |
Set a packing option.
name | The option name. |
val | The option value. |
Returns true on success, false otherwise.
See PackedParameters::setOptions
for details.
void SG::PackedContainer< T, ALLOC >::setParms | ( | const PackedParameters & | parms | ) |
Set the packing parameters.
parms | The new packing parameters. |
|
inherited |
STL member.
|
private |
The packing parameters.
Definition at line 127 of file PackedContainer.h.