Particle Identification and Tracking
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Static Private Attributes | List of all members
utilities::Wrapper_o_hdf_group Class Reference

Wrapper class for dealing with output to matlab. More...

#include <wrapper_o_hdf_group.h>

+ Collaboration diagram for utilities::Wrapper_o_hdf_group:

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 >
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 >
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_TYPEd_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...
 

Detailed Description

Wrapper class for dealing with output to matlab.

Member Typedef Documentation

struct to deal with shoving complex data in to hdf

Member Enumeration Documentation

Enumerator
ERROR 
APPEND_GROUP 
NEW_GROUP 
FILL_GROUP 

Constructor & Destructor Documentation

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

Parameters
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_.

Member Function Documentation

void Wrapper_o_hdf_group::add_meta_store ( const Md_store md_in)
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

template<class T >
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_.

template<class T >
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.

template<class T >
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().

template<class T >
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 )
void Wrapper_o_hdf_group::store_particle_pos ( const utilities::Tuple< float, 3 > &  cord,
float  I 
)
void Wrapper_o_hdf_group::write_to_disk ( )

Member Data Documentation

int utilities::Wrapper_o_hdf_group::added_count_
private

a running count of the particles added

Referenced by store_particle(), store_particle_pos(), and write_to_disk().

int utilities::Wrapper_o_hdf_group::comp_number_
private

the reference number from the database

Referenced by Wrapper_o_hdf_group().

std::vector<complex_t *> utilities::Wrapper_o_hdf_group::complex_data_
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().

Data_map utilities::Wrapper_o_hdf_group::complex_map_
private

look up table for float data

Referenced by store_particle(), Wrapper_o_hdf_group(), and write_to_disk().

const int Wrapper_o_hdf_group::csize_ = 400
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().

std::set<D_TYPE> utilities::Wrapper_o_hdf_group::d_types_add_
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().

Data_map utilities::Wrapper_o_hdf_group::dset_map_
private

look up table for data sets

Referenced by Wrapper_o_hdf_group(), and write_to_disk().

std::vector<H5::DataSet * > utilities::Wrapper_o_hdf_group::dsets_
private

Vector of data set pointers.

Referenced by Wrapper_o_hdf_group(), write_to_disk(), and ~Wrapper_o_hdf_group().

std::vector<float *> utilities::Wrapper_o_hdf_group::float_data_
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().

Data_map utilities::Wrapper_o_hdf_group::float_map_
private

look up table for float data

Referenced by store_particle(), store_particle_pos(), Wrapper_o_hdf_group(), and write_to_disk().

const int utilities::Wrapper_o_hdf_group::format_padding
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.

H5::Group* utilities::Wrapper_o_hdf_group::group_
private
GROUP_T utilities::Wrapper_o_hdf_group::group_type_
private

Sets what sort of group to try to deal with.

Referenced by store_particle(), and store_particle_pos().

std::vector<int *> utilities::Wrapper_o_hdf_group::int_data_
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().

Data_map utilities::Wrapper_o_hdf_group::int_map_
private

look up table for float data

Referenced by store_particle(), Wrapper_o_hdf_group(), and write_to_disk().

int utilities::Wrapper_o_hdf_group::p_count_
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().

H5::CommonFG* utilities::Wrapper_o_hdf_group::parent_
private

Parent object.

Referenced by Wrapper_o_hdf_group().

int utilities::Wrapper_o_hdf_group::size_
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().


The documentation for this class was generated from the following files: