iRoCS Toolbox
1.1.0
|
#include <StDataHdf5.hh>
Data Structures | |
class | Buffer |
Public Member Functions | |
StDataHdf5Templ (const char *path, unsigned int fm=H5F_ACC_RDONLY) | |
constructor. More... | |
StDataHdf5Templ () | |
this constructor is only for compilation of some template classes. More... | |
bool | exceptionFlag () const |
void | getArray (const std::string &key, const std::vector< std::string >::iterator &arrBegin, int containerSize=-1) const |
getArray. More... | |
template<typename ForwardIter > | |
void | getArray (const std::string &key, const ForwardIter &arrBegin, int containerSize=-1) const |
size_t | getArraySize (std::string key) const |
get size of Array associated with given key. More... | |
size_t | getAttrArraySize (std::string key) const |
template<typename ForwardIter > | |
void | getFVArray (const std::string &key, const ForwardIter &arrBegin, int containerSize=-1) const |
get a list (or a 1D array) of feature vectors. More... | |
size_t | getFVArraySize (std::string key) const |
get number of Feature vectors in the list associated with that key More... | |
template<typename T > | |
void | getValue (const std::string &key, T &value) const |
get a value (with arbitrary type) from the Hdf5 attribute specified by the given key. More... | |
void | getValue (const std::string &key, std::string &value) const |
void | setArray (const std::string &key, const std::vector< std::string >::iterator &arrBegin, size_t size) |
setArray writes/adds an array of values (with arbitrary type) to the netCDF File as attribute. More... | |
void | setArray (const std::string &key, const std::vector< std::string >::const_iterator &arrBegin, size_t size) |
template<typename ForwardIter > | |
void | setArray (const std::string &key, const ForwardIter &arrBegin, size_t size) |
void | setExceptionFlag (bool f) |
Specify, if getValue() should throw expcetions for unknown keys. More... | |
template<typename ForwardIter > | |
void | setFVArray (const std::string &key, const ForwardIter &arrBegin, size_t size) |
setFVPList writes/adds a list (or a 1D array) of feature vectors to the Hdf5 file as 2D Variable. More... | |
template<typename T > | |
void | setValue (const std::string &key, const T &value) |
setValue writes/adds a value (with arbitrary type) to the netCDF File as attribute. More... | |
void | setValue (const std::string &key, const std::string &value) |
void | setValue (const std::string &key, const char *value) |
void | setValue (const char *key, const char *value) |
void | setValue (const char *key, const std::string &value) |
void | setValue (const std::string &key, const unsigned int &value) |
void | setValue (const std::string &key, const unsigned long &value) |
bool | valueExists (const std::string &key) const |
check wether a value exists for requested key More... | |
Protected Member Functions | |
void | _createGroup (const std::string &groupName) |
void | _deleteAttribute (const std::string &attName, const std::string &dsName) |
bool | _existsAttribute (const std::string &attName, const std::string &dsName) const |
bool | _existsDataSet (const std::string &absName) const |
bool | _existsGroup (const std::string &groupName) const |
hid_t | _getAttribute (const std::string &attName, const std::string &dsName) const |
hid_t | _getDataSet (const std::string &dsName) const |
std::string | _getErrorMsg () |
hid_t | _getGroup (const std::string &groupName) const |
template<typename T > | |
const T * | _getVecData (const std::vector< T > &vect) const |
template<typename T > | |
const T * | _getVecData (const std::valarray< T > &vect) const |
const char * | _getVecData (const std::string &vect) const |
const char * | _getVecData (const char *&vect) const |
template<typename T > | |
const T * | _getVecData (const T &vect) const |
template<typename T > | |
T * | _getVecData2 (std::vector< T > &vect) const |
template<typename T > | |
T * | _getVecData2 (std::valarray< T > &vect) const |
template<typename T > | |
T * | _getVecData2 (T &vect) const |
template<typename T > | |
hsize_t | _getVecSize (const std::vector< T > &vect) const |
template<typename T > | |
hsize_t | _getVecSize (const std::valarray< T > &vect) const |
hsize_t | _getVecSize (const std::string &vect) const |
template<typename T > | |
hsize_t | _getVecSize (const T &) const |
template<typename DataT > | |
void | _readAttribute (DataT &val, const std::string &attName, const std::string &dsName) const |
template<typename T > | |
void | _setVecSize (std::vector< T > &vect, size_t size) const |
template<typename T > | |
void | _setVecSize (std::valarray< T > &vect, size_t size) const |
void | _setVecSize (std::string &vect, size_t size) const |
template<typename T > | |
void | _setVecSize (T &, size_t) const |
template<typename DataT > | |
void | _writeAttribute (const DataT &val, const std::string &attName, const std::string &dsName) |
std::string | dataSetGroup (const std::string &dataSetDescriptor) const |
std::string | dataSetName (const std::string &dataSetDescriptor) const |
Static Protected Member Functions | |
static void | getValue (std::valarray< double > const &att, bool &value, size_t index) |
static void | getValue (std::valarray< double > const &att, char &value, size_t index) |
static void | getValue (std::valarray< double > const &att, short &value, size_t index) |
static void | getValue (std::valarray< double > const &att, int &value, long index) |
static void | getValue (std::valarray< double > const &att, unsigned int &value, long index) |
static void | getValue (std::valarray< double > const &att, float &value, long index) |
static void | getValue (std::valarray< double > const &att, double &value, long index) |
Definition at line 231 of file StDataHdf5.hh.
svt::StDataHdf5Templ< Hdf5FilePolicy >::StDataHdf5Templ | ( | const char * | path, |
unsigned int | fm = H5F_ACC_RDONLY |
||
) |
constructor.
Tries to open the specified Hdf5 and throws an error, if it could not be opened
path | filename of Hdf5 file |
fm | open mode (StDataHdf5::ReadOnly, StDataHdf5::Write, StDataHdf5::Replace, StDataHdf5::New) see Hdf5 documentaion for details |
LoadError | can not open file |
|
inline |
this constructor is only for compilation of some template classes.
It just throws a runtime error. Never Use it!
Definition at line 259 of file StDataHdf5.hh.
|
inline |
Specify, if getValue() should throw expcetions for unknown keys.
f | true: getValue() should throw expcetions for unknown keys |
Definition at line 278 of file StDataHdf5.hh.
|
inline |
Definition at line 289 of file StDataHdf5.hh.
|
inline |
check wether a value exists for requested key
key | the key |
Definition at line 303 of file StDataHdf5.hh.
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setValue | ( | const std::string & | key, |
const T & | value | ||
) |
setValue writes/adds a value (with arbitrary type) to the netCDF File as attribute.
key | the key for that value |
value | the value itself |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setValue | ( | const std::string & | key, |
const std::string & | value | ||
) |
|
inline |
Definition at line 322 of file StDataHdf5.hh.
|
inline |
Definition at line 326 of file StDataHdf5.hh.
|
inline |
Definition at line 330 of file StDataHdf5.hh.
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setValue | ( | const std::string & | key, |
const unsigned int & | value | ||
) |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setValue | ( | const std::string & | key, |
const unsigned long & | value | ||
) |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setArray | ( | const std::string & | key, |
const std::vector< std::string >::iterator & | arrBegin, | ||
size_t | size | ||
) |
setArray writes/adds an array of values (with arbitrary type) to the netCDF File as attribute.
key | the key for that value |
arrBegin | begin of container |
size | number of elements |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setArray | ( | const std::string & | key, |
const std::vector< std::string >::const_iterator & | arrBegin, | ||
size_t | size | ||
) |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setArray | ( | const std::string & | key, |
const ForwardIter & | arrBegin, | ||
size_t | size | ||
) |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::setFVArray | ( | const std::string & | key, |
const ForwardIter & | arrBegin, | ||
size_t | size | ||
) |
setFVPList writes/adds a list (or a 1D array) of feature vectors to the Hdf5 file as 2D Variable.
arrBegin must point to the begin of linear array with pointers to the feature vectors, e.g. std::vector<BasicFV*>
key | the key for that value |
arrBegin | begin of container |
size | number of elements in the container |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::getValue | ( | const std::string & | key, |
T & | value | ||
) | const |
get a value (with arbitrary type) from the Hdf5 attribute specified by the given key.
If key is not found, the value remains unchanged and depending on exceptionFlag() a KeyNotFoundError exception is thrown.
key | the key for the requested value |
value | (output) returned value. |
KeyNotFoundError | the requested key does not exist |
InvalidDataTypeError | the value couldn't be converted to the requested type |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::getValue | ( | const std::string & | key, |
std::string & | value | ||
) | const |
size_t svt::StDataHdf5Templ< Hdf5FilePolicy >::getArraySize | ( | std::string | key | ) | const |
get size of Array associated with given key.
key | the key for that value |
size_t svt::StDataHdf5Templ< Hdf5FilePolicy >::getAttrArraySize | ( | std::string | key | ) | const |
size_t svt::StDataHdf5Templ< Hdf5FilePolicy >::getFVArraySize | ( | std::string | key | ) | const |
get number of Feature vectors in the list associated with that key
key | the key for that value |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::getArray | ( | const std::string & | key, |
const std::vector< std::string >::iterator & | arrBegin, | ||
int | containerSize = -1 |
||
) | const |
getArray.
The values must be separated by separatorChar(), e.g. mymap["nr_sv"] = "150 120". See getValue() above for further details.
key | the key for the requested value |
arrBegin | iterator pointing to your container, that has enough space to store all values. You can query the required size with getArraySize(). |
containerSize | optional parameter to tell the size of your container, so that an error can be thrown, wenn it would be exeeded. |
KeyNotFoundError | the requested key does not exist |
InvalidDataTypeError | the value couldn't be converted to the requested type |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::getArray | ( | const std::string & | key, |
const ForwardIter & | arrBegin, | ||
int | containerSize = -1 |
||
) | const |
void svt::StDataHdf5Templ< Hdf5FilePolicy >::getFVArray | ( | const std::string & | key, |
const ForwardIter & | arrBegin, | ||
int | containerSize = -1 |
||
) | const |
get a list (or a 1D array) of feature vectors.
The Iterator must point to a container with Feature vector pointers. The pointers must point to already allocated feature vectors
key | the key for the requested value |
arrBegin | iterator pointing to your container, that has enough space to store all values. You can query the required size with getFVArraySize(). |
containerSize | optional parameter to tell the size of your container, so that an error can be thrown, wenn it would be exeeded. |
KeyNotFoundError | the requested key does not exist |
InvalidDataTypeError | the value string couldn't be converted to the requested type |
|
protected |
|
protected |
|
inlineprotected |
Definition at line 493 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 524 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 540 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 554 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 567 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 580 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 631 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 644 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 663 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 700 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 714 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 720 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 726 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 732 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 738 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 744 of file StDataHdf5.hh.
|
inlinestaticprotected |
Definition at line 750 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 760 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 766 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 772 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 778 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 786 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 792 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 798 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 804 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 811 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 816 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 821 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 826 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 836 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 842 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 848 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 854 of file StDataHdf5.hh.
|
inlineprotected |
Definition at line 861 of file StDataHdf5.hh.