Particle Identification and Tracking
|
Wrapper class for dealing with output to matlab. More...
#include <wrapper_o_hdf_group.h>
Classes | |
struct | complex_t |
struct to deal with shoving complex data in to hdf More... | |
Public Types | |
enum | GROUP_T { ERROR = -1, APPEND_GROUP =0, NEW_GROUP, FILL_GROUP } |
typedef enum utilities::Wrapper_o_hdf_group::GROUP_T | GROUP_T |
Public Member Functions | |
Wrapper_o_hdf_group (H5::CommonFG *parent, const std::string &g_name, std::set< D_TYPE > dset, int p_count, int size, int comp_num, GROUP_T type) | |
constructor More... | |
void | write_to_disk () |
Write data to disk. More... | |
void | store_particle (const tracking::particle *) |
Add a particle. More... | |
void | store_particle_pos (const utilities::Tuple< float, 3 > &cord, float I) |
Add a particle position. More... | |
bool | contains_meta (const std::string &key) |
check if the group contains the meta data key More... | |
template<class T > | |
void | set_meta_data (const std::string &key, const T &val) |
Sets meta data to the group (frame) More... | |
template<class T > | |
T | get_meta_data (const std::string &key, T &val) const |
gets meta data from the group (frame) More... | |
void | add_meta_store (const Md_store *md_in) |
Adds an entire Md_store to the group (frame) More... | |
bool | contains_meta (const std::string &key, D_TYPE dtype) |
check if a data set contains meta data key More... | |
template<class T > | |
void | set_meta_data (const std::string &key, const T &val, D_TYPE dtype) |
sets meta data for a data set More... | |
template<class T > | |
T | get_meta_data (const std::string &key, T &val, D_TYPE dtype) |
Gets meta data for a data set. More... | |
~Wrapper_o_hdf_group () | |
Destructor. More... | |
Static Public Attributes | |
static const int | format_padding |
set the size of the data chunks if compression is used. More... | |
Private Types | |
typedef struct utilities::Wrapper_o_hdf_group::complex_t | complex_t |
struct to deal with shoving complex data in to hdf More... | |
Private Attributes | |
H5::CommonFG * | parent_ |
Parent object. More... | |
H5::Group * | group_ |
The group object. More... | |
std::vector< H5::DataSet * > | dsets_ |
Vector of data set pointers. More... | |
Data_map | dset_map_ |
look up table for data sets More... | |
int | comp_number_ |
the reference number from the database More... | |
int | p_count_ |
the number of particles to be added to the group, this is used as a check to make sure that particles don't get left out. More... | |
int | size_ |
the size of the to array that data will be added to, this must be known at creation time and must match the size of the under lying wrapper if appending to a wrapper. More... | |
int | added_count_ |
a running count of the particles added More... | |
GROUP_T | group_type_ |
Sets what sort of group to try to deal with. More... | |
std::set< D_TYPE > | d_types_add_ |
The data types to add to the group, must be set at construction time. More... | |
std::vector< float * > | float_data_ |
vector of pointers to temporary arrays for floats More... | |
Data_map | float_map_ |
look up table for float data More... | |
std::vector< int * > | int_data_ |
vector of pointers to temporary arrays for ints More... | |
Data_map | int_map_ |
look up table for float data More... | |
std::vector< complex_t * > | complex_data_ |
vector of pointers to temporary arrays for floats More... | |
Data_map | complex_map_ |
look up table for float data More... | |
Static Private Attributes | |
static const int | csize_ = 400 |
set the size of the data chunks if compression is used. More... | |
Wrapper class for dealing with output to matlab.
|
private |
struct to deal with shoving complex data in to hdf
Wrapper_o_hdf_group::Wrapper_o_hdf_group | ( | H5::CommonFG * | parent, |
const std::string & | g_name, | ||
std::set< D_TYPE > | dset, | ||
int | p_count, | ||
int | size, | ||
int | comp_num, | ||
GROUP_T | type | ||
) |
constructor
parent | [in] the hdf object that the group will be a child of |
g_name | [in] the name of the group |
dset | [in] the data types that the group will include |
p_count | [in] the number of particles in the frame |
size | [in] the number of entries to allocate, this is to deal with skipped particles |
comp_num | [in] the computation number |
type | [in] enumeration to control group creation behavior |
References comp_number_, complex_data_, complex_map_, csize_, d_types_add_, dset_map_, dsets_, float_data_, float_map_, utilities::format_dset_name(), group_, utilities::Wrapper_o_hdf_group::complex_t::im, int_data_, int_map_, NEW_GROUP, parent_, utilities::Wrapper_o_hdf_group::complex_t::re, utilities::Data_map::set_lookup(), size_, utilities::V_BOOL, utilities::V_COMPLEX, utilities::V_ERROR, utilities::V_FLOAT, utilities::V_GUID, utilities::V_INT, utilities::V_STRING, utilities::V_TIME, utilities::v_type(), utilities::V_UINT, and utilities::VT2str_s().
Wrapper_o_hdf_group::~Wrapper_o_hdf_group | ( | ) |
Destructor.
References complex_data_, dsets_, float_data_, group_, and int_data_.
void Wrapper_o_hdf_group::add_meta_store | ( | const Md_store * | md_in) |
Adds an entire Md_store to the group (frame)
References utilities::Md_store::get_key(), utilities::Md_store::get_type(), utilities::Md_store::get_val(), utilities::Md_store::get_value(), group_, utilities::Attr_list_hdf::set_value(), utilities::Md_store::size(), utilities::V_BOOL, utilities::V_COMPLEX, utilities::V_ERROR, utilities::V_FLOAT, utilities::V_GUID, utilities::V_INT, utilities::V_STRING, utilities::V_TIME, and utilities::V_UINT.
Referenced by utilities::Wrapper_o_hdf::add_meta_store().
bool utilities::Wrapper_o_hdf_group::contains_meta | ( | const std::string & | key) |
check if the group contains the meta data key
bool utilities::Wrapper_o_hdf_group::contains_meta | ( | const std::string & | key, |
D_TYPE | dtype | ||
) |
check if a data set contains meta data key
T Wrapper_o_hdf_group::get_meta_data | ( | const std::string & | key, |
T & | val | ||
) | const |
gets meta data from the group (frame)
References utilities::Attr_list_hdf::get_value(), and group_.
T utilities::Wrapper_o_hdf_group::get_meta_data | ( | const std::string & | key, |
T & | val, | ||
D_TYPE | dtype | ||
) |
Gets meta data for a data set.
void Wrapper_o_hdf_group::set_meta_data | ( | const std::string & | key, |
const T & | val | ||
) |
Sets meta data to the group (frame)
References group_, and utilities::Attr_list_hdf::set_value().
Referenced by local_add_meta_data().
void utilities::Wrapper_o_hdf_group::set_meta_data | ( | const std::string & | key, |
const T & | val, | ||
D_TYPE | dtype | ||
) |
sets meta data for a data set
void Wrapper_o_hdf_group::store_particle | ( | const tracking::particle * | ) |
Add a particle.
References added_count_, APPEND_GROUP, complex_data_, complex_map_, d_types_add_, float_data_, float_map_, group_type_, utilities::Wrapper_o_hdf_group::complex_t::im, int_data_, int_map_, p_count_, utilities::Wrapper_o_hdf_group::complex_t::re, size_, utilities::V_BOOL, utilities::V_COMPLEX, utilities::V_ERROR, utilities::V_FLOAT, utilities::V_GUID, utilities::V_INT, utilities::V_STRING, utilities::V_TIME, utilities::v_type(), utilities::V_UINT, and utilities::VT2str_s().
void Wrapper_o_hdf_group::store_particle_pos | ( | const utilities::Tuple< float, 3 > & | cord, |
float | I | ||
) |
Add a particle position.
References added_count_, utilities::D_I, d_types_add_, utilities::D_XPOS, utilities::D_YPOS, utilities::D_ZPOS, float_data_, float_map_, group_type_, NEW_GROUP, and p_count_.
Referenced by utilities::Wrapper_o_hdf::set_all_values().
void Wrapper_o_hdf_group::write_to_disk | ( | ) |
Write data to disk.
References added_count_, complex_data_, complex_map_, d_types_add_, dset_map_, dsets_, float_data_, float_map_, int_data_, int_map_, p_count_, utilities::V_COMPLEX, utilities::V_FLOAT, utilities::V_INT, and utilities::v_type().
Referenced by utilities::Wrapper_o_hdf::close_group().
|
private |
a running count of the particles added
Referenced by store_particle(), store_particle_pos(), and write_to_disk().
|
private |
the reference number from the database
Referenced by Wrapper_o_hdf_group().
|
private |
vector of pointers to temporary arrays for floats
Referenced by store_particle(), Wrapper_o_hdf_group(), write_to_disk(), and ~Wrapper_o_hdf_group().
|
private |
look up table for float data
Referenced by store_particle(), Wrapper_o_hdf_group(), and write_to_disk().
|
staticprivate |
set the size of the data chunks if compression is used.
Compression is used if the group has more than 5 times this many entries.
Referenced by Wrapper_o_hdf_group().
|
private |
The data types to add to the group, must be set at construction time.
Referenced by store_particle(), store_particle_pos(), Wrapper_o_hdf_group(), and write_to_disk().
|
private |
look up table for data sets
Referenced by Wrapper_o_hdf_group(), and write_to_disk().
|
private |
Vector of data set pointers.
Referenced by Wrapper_o_hdf_group(), write_to_disk(), and ~Wrapper_o_hdf_group().
|
private |
vector of pointers to temporary arrays for floats
Referenced by store_particle(), store_particle_pos(), Wrapper_o_hdf_group(), write_to_disk(), and ~Wrapper_o_hdf_group().
|
private |
look up table for float data
Referenced by store_particle(), store_particle_pos(), Wrapper_o_hdf_group(), and write_to_disk().
|
static |
set the size of the data chunks if compression is used.
Compression is used if the group has more than 5 times this many entries.
|
private |
The group object.
Referenced by add_meta_store(), get_meta_data(), set_meta_data(), Wrapper_o_hdf_group(), and ~Wrapper_o_hdf_group().
|
private |
Sets what sort of group to try to deal with.
Referenced by store_particle(), and store_particle_pos().
|
private |
vector of pointers to temporary arrays for ints
Referenced by store_particle(), Wrapper_o_hdf_group(), write_to_disk(), and ~Wrapper_o_hdf_group().
|
private |
look up table for float data
Referenced by store_particle(), Wrapper_o_hdf_group(), and write_to_disk().
|
private |
the number of particles to be added to the group, this is used as a check to make sure that particles don't get left out.
Referenced by store_particle(), store_particle_pos(), and write_to_disk().
|
private |
Parent object.
Referenced by Wrapper_o_hdf_group().
|
private |
the size of the to array that data will be added to, this must be known at creation time and must match the size of the under lying wrapper if appending to a wrapper.
Referenced by store_particle(), and Wrapper_o_hdf_group().