Particle Identification and Tracking
|
wrapper_o class for dealing with writing data to a file. More...
#include <wrapper_o_file.h>
Public Member Functions | |
void | print () const |
adds another particle to the data table and fills it with zero values. More... | |
void | print (int ind) |
wrapper_o_file (params_file *params) | |
default constructor More... | |
int | num_entries () const |
void | set_new_value (utilities::D_TYPE type, double val) |
void | end_new_particle () |
void | finalize_wrapper () |
Performs any clean up. More... | |
void | initialize_wrapper () |
preforms any initialization that needs to be done the logic for this is to not needlessly open and close files, or creat matlab arrays if they arn't going to be used. More... | |
void | reset_wrapper (params *param) |
void | start_new_particle () |
virtual void | add_meta_store (const Md_store *md_in)=0 |
Adds all the meta data in a Md_store object. More... | |
Output interface | |
New API for output wrappers, which is a bit more carefully thought about. All derived classes must implement these and only these public functions (because of the way that pointers to this base class are used in the code, only these functions are available in the bulk of the code) Typical life cycle: -initialize wrapper -loop over frames (if wrapper knows about frames) –loop over particles —open particle —set values —close particle –close particles -close frames -finalize wrapper | |
virtual void | open_group (int group=0, int p_count=0, int wrapper_size=-1)=0 |
Opens a group to put particles into. More... | |
virtual void | set_all_values (const tracking::particle *)=0 |
sets all of the values that the wrapper knows about by asking the particle More... | |
virtual void | set_all_values (const tracking::Track_box *, const utilities::Tuple< float, 3 > &)=0 |
sets all of the values that the wrapper knows about by asking the particle. More... | |
virtual void | close_group ()=0 |
Closes the currently open group. More... | |
virtual const std::set< D_TYPE > & | get_content_tpyes () const =0 |
Returns a set containing the D_TYPES that the wrapper can cope with. More... | |
Group level metadata | |
adds meta data to a group that is specific the current computation | |
virtual void | add_meta_data (const std::string &key, float val)=0 |
Adds a float meta-data. More... | |
virtual void | add_meta_data (const std::string &key, const Tuple< float, 3 > &val)=0 |
Adds a Triple meta-data. More... | |
virtual void | add_meta_data (const std::string &key, const Tuple< float, 2 > &val)=0 |
Adds a Pair meta-data. More... | |
virtual void | add_meta_data (const std::string &key, const std::string &val)=0 |
Adds a string meta-data. More... | |
virtual void | add_meta_data (const std::string &key, int val)=0 |
Adds an integer meta-data. More... | |
virtual void | add_meta_data_comp (const std::string &key, float val)=0 |
Adds a float meta-data. More... | |
virtual void | add_meta_data_comp (const std::string &key, const Tuple< float, 3 > &val)=0 |
Adds a Triple meta-data. More... | |
virtual void | add_meta_data_comp (const std::string &key, const Tuple< float, 2 > &val)=0 |
Adds a Pair meta-data. More... | |
virtual void | add_meta_data_comp (const std::string &key, const std::string &val)=0 |
Adds a string meta-data. More... | |
virtual void | add_meta_data_comp (const std::string &key, int val)=0 |
Adds an integer meta-data. More... | |
virtual void | add_meta_data (const std::string &key, float val, D_TYPE dset_type)=0 |
Adds metadata for datasets. More... | |
virtual void | add_meta_data (const std::string &key, const Tuple< float, 3 > &val, D_TYPE dset_type)=0 |
Adds a Triple meta-data for a data set. More... | |
virtual void | add_meta_data (const std::string &key, const Tuple< float, 2 > &val, D_TYPE dset_type)=0 |
Adds a Pair meta-data for a data set. More... | |
virtual void | add_meta_data (const std::string &key, const std::string &val, D_TYPE dset_type)=0 |
Adds a string meta-data for a data set. More... | |
virtual void | add_meta_data (const std::string &key, int val, D_TYPE dset_type)=0 |
Adds an integer meta-data for a data set. More... | |
virtual void | add_meta_data_list (const Read_config &, const std::set< D_TYPE > &)=0 |
Adds all parameters from the Read_config object to the data sets in the set. More... | |
Root level | |
adds meta data to the root group | |
virtual void | add_meta_data_root (const std::string &key, float val)=0 |
Adds a float meta-data. More... | |
virtual void | add_meta_data_root (const std::string &key, const Tuple< float, 3 > &val)=0 |
Adds a Triple meta-data. More... | |
virtual void | add_meta_data_root (const std::string &key, const Tuple< float, 2 > &val)=0 |
Adds a Pair meta-data. More... | |
virtual void | add_meta_data_root (const std::string &key, const std::string &val)=0 |
Adds a string meta-data. More... | |
virtual void | add_meta_data_root (const std::string &key, int val)=0 |
Adds an integer meta-data. More... | |
Protected Member Functions | |
void | initialize (params_file *param) |
initializes the wrapper_i class More... | |
void | store_data (int index, int pos, double val) |
takes care of ensuring everything is in range for writing stuff into the data structure. More... | |
Protected Attributes | |
string | fname |
File name to write data to. More... | |
vector< double > | data |
Temperoray data structure for holding current. More... | |
ofstream | f_out |
File stream to write data into. More... | |
int | cols |
number of fields per particle More... | |
map< utilities::D_TYPE, int > | contents |
Map that stores what values go where in what columns. More... | |
wrapper_o class for dealing with writing data to a file.
The data is stored in a vector of vectors. The wrapper must be explicitly told to write the data to disk
wrapper_o_file::wrapper_o_file | ( | params_file * | params) |
default constructor
|
pure virtualinherited |
Adds a float meta-data.
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Track_box::output_to_wrapper().
|
pure virtualinherited |
Adds a Triple meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a Pair meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a string meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds an integer meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds metadata for datasets.
Adds a float meta-data for a data set
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a Triple meta-data for a data set.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a Pair meta-data for a data set.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a string meta-data for a data set.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds an integer meta-data for a data set.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a float meta-data.
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Hash_shelf::output_to_wrapper().
|
pure virtualinherited |
Adds a Triple meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a Pair meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a string meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds an integer meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds all parameters from the Read_config object to the data sets in the set.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a float meta-data.
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Track_shelf::output_link_to_wrapper(), and tracking::hash_case::output_to_wrapper().
|
pure virtualinherited |
Adds a Triple meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a Pair meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds a string meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds an integer meta-data.
Implemented in utilities::Wrapper_o_hdf.
|
pure virtualinherited |
Adds all the meta data in a Md_store object.
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Hash_shelf::output_to_wrapper().
|
pure virtualinherited |
Closes the currently open group.
Throws an error if there is no open group.
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Track_shelf::output_link_to_wrapper(), tracking::Track_box::output_to_wrapper(), and tracking::Hash_shelf::output_to_wrapper().
|
virtual |
Performs any clean up.
that needs to be done such as closing a file
Implements utilities::Wrapper_out.
|
pure virtualinherited |
Returns a set containing the D_TYPES that the wrapper can cope with.
Implemented in utilities::Wrapper_o_hdf.
|
protected |
initializes the wrapper_i class
References utilities::D_E, utilities::D_I, utilities::D_INDEX, utilities::D_R2, utilities::D_XPOS, utilities::D_YPOS, and fname.
|
virtual |
preforms any initialization that needs to be done the logic for this is to not needlessly open and close files, or creat matlab arrays if they arn't going to be used.
It also allows the wrapper object to be reused (ie, do all the processing, output one subset of data to one place, and another subset to another place
Implements utilities::Wrapper_out.
|
inline |
References data.
|
pure virtualinherited |
Opens a group to put particles into.
group | the index of the group to be opened |
p_count | the number of particles to expect |
wrapper_size | the size of the group of the underlying wrapper, if <0, then set equal to p_count |
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Track_shelf::output_link_to_wrapper(), tracking::Track_box::output_to_wrapper(), and tracking::Hash_shelf::output_to_wrapper().
void utilities::wrapper_o_file::print | ( | ) | const |
adds another particle to the data table and fills it with zero values.
Returns the index of the new particle print out a representation of the data
void wrapper_o_file::print | ( | int | ind) |
void wrapper_o_file::reset_wrapper | ( | params * | param) |
|
pure virtualinherited |
sets all of the values that the wrapper knows about by asking the particle
Implemented in utilities::Wrapper_o_hdf.
Referenced by tracking::Track_shelf::output_link_to_wrapper(), tracking::Track_box::output_to_wrapper(), and tracking::hash_box::output_to_wrapper().
|
pure virtualinherited |
sets all of the values that the wrapper knows about by asking the particle.
This function is for outputting the results of 3D linking
Implemented in utilities::Wrapper_o_hdf.
void wrapper_o_file::set_new_value | ( | utilities::D_TYPE | type, |
double | val | ||
) |
References data.
|
protected |
takes care of ensuring everything is in range for writing stuff into the data structure.
|
protected |
number of fields per particle
Referenced by start_new_particle().
|
protected |
Map that stores what values go where in what columns.
|
protected |
Temperoray data structure for holding current.
Referenced by end_new_particle(), num_entries(), set_new_value(), and start_new_particle().
|
protected |
File stream to write data into.
Referenced by end_new_particle(), finalize_wrapper(), and initialize_wrapper().
|
protected |
File name to write data to.
Referenced by finalize_wrapper(), and initialize_wrapper().