Particle Identification and Tracking
|
Wrapper class for eating data from arbitrary sources. More...
#include <wrapper_i_generic.h>
Public Member Functions | |
int | get_value (int &out, int ind, D_TYPE type, int frame) const |
Returns the value of the type specified from the particle selected. More... | |
float | get_value (float &out, int ind, D_TYPE type, int frame) const |
Returns the value of the type specified from the particle selected. More... | |
std::complex< float > | get_value (std::complex< float > &out, int ind, D_TYPE type, int frame) const |
Returns the value of the type specified from the particle selected. More... | |
Tuplef | get_dims () const |
Returns the dimension of each 'frame' of the data in the wrapper. More... | |
std::set< D_TYPE > | get_data_types () const |
Returns a set of the data types. More... | |
int | get_num_entries (unsigned int frame) const |
Return the number of entries the specified frame. More... | |
int | get_num_entries () const |
Return the total number of entries in the wrapper. More... | |
int | get_num_frames () const |
Return the number of frames. More... | |
bool | contains_type (D_TYPE type) const |
Returns if the wrapper contains the specified data type. More... | |
~Wrapper_i_generic () | |
Wrapper_i_generic () | |
Constructor. More... | |
bool | open_wrapper () |
open wrapper to accept data, nukes everything currently in the wrapper More... | |
bool | setup (const std::set< D_TYPE > &, int N, const Tuplef &) |
Sets the number of frames to expect. More... | |
bool | open_frame (unsigned int frame, int N, float z) |
Opens a frame to add data to it. More... | |
bool | set_data_type (D_TYPE dtype) |
Configures the object to take data of the given type. More... | |
bool | clear_data_type () |
Clears the current data type, no questions asked. More... | |
bool | add_int_data (int *data, int N) |
adds data, must have an active data type set More... | |
bool | add_float_data (float *data, int N) |
adds data, must have an active data type set More... | |
bool | set_meta_data (const Md_store &md_store) |
Sets frame meta-data for the frame. More... | |
bool | close_frame () |
Closes frame. More... | |
bool | finalize_wrapper () |
Closes wrapper from taking any new data. More... | |
Meta data handling functions | |
const Md_store * | get_Md_store (unsigned int j) const |
Returns a pointer to plane j's meta data store. More... | |
Md_store * | get_Md_store (unsigned int j) |
Returns a pointer to plane j's meta data store. More... | |
void | set_Md_store (unsigned int j, Md_store *in) |
Sets the Md_store for plane j. More... | |
void | set_Md_store_size (unsigned int j) |
Sets the size of the md_stores_ vector. More... | |
unsigned int | get_Md_store_size () |
Gets the size of the md_stores_ vector. More... | |
void | clear_Md_store (unsigned int j) |
Deletes plane j's Md_store. More... | |
Private Member Functions | |
void | clean_data () |
Deletes all allocated data. More... | |
bool | set_dims (const Tuplef &dim) |
Sets the dimensions. More... | |
Private Attributes | |
std::set< utilities::D_TYPE > | data_types_set_ |
Set of data types in the wrapper. More... | |
Data_map | d_mapi_ |
Data map for integer data. More... | |
Data_map | d_mapf_ |
Data map for float data. More... | |
Data_map | d_mapc_ |
Data map for complex<float> data. More... | |
std::vector< std::vector< int * > > | data_i_ |
Data structure for integer data. More... | |
std::vector< std::vector < float * > > | data_f_ |
Data structure for float data. More... | |
std::vector< std::vector < std::complex< float > * > > | data_c_ |
Data structure for complex<float> data. More... | |
std::vector< int > | frame_c_ |
the number of particles in each frame More... | |
unsigned int | frame_count_ |
The number of frames. More... | |
unsigned int | total_part_count_ |
The total number of particles in all frames. More... | |
std::vector< float > | frame_zdata_ |
A vector of the z-position of each frame. More... | |
bool | locked_ |
if the parameters are locked More... | |
std::set< utilities::D_TYPE > * | frame_added_datatypes_ |
set of added data types More... | |
bool | frame_open_ |
if there is a frame open to add data too More... | |
D_TYPE | cur_dtype_ |
Current data_type. More... | |
bool | two_d_data_ |
2D data flag More... | |
int | cur_frame_size_ |
current frame size More... | |
int | cur_frame_number_ |
current frame number More... | |
Tuplef | dims_ |
dimensions of data More... | |
Wrapper class for eating data from arbitrary sources.
Primarily written for the interface with python.
life cycle:
open_wrapper() setup(data_type,num_frames) { open_frame { set_data_type set_data } close_frame } finalize_wrapper
Wrapper_i_generic::~Wrapper_i_generic | ( | ) |
References clean_data().
Wrapper_i_generic::Wrapper_i_generic | ( | ) |
Constructor.
|
private |
Deletes all allocated data.
References data_c_, data_f_, data_i_, and locked_.
Referenced by open_wrapper(), and ~Wrapper_i_generic().
|
inherited |
Deletes plane j's Md_store.
References utilities::Wrapper_in::md_stores_.
|
virtual |
Returns if the wrapper contains the specified data type.
Implements utilities::Wrapper_in.
References data_types_set_.
Referenced by utilities::Wrapper_i_jb_binary::contains_type(), and get_value().
|
virtual |
Returns a set of the data types.
Use the other version
Implements utilities::Wrapper_in.
References data_types_set_.
Referenced by utilities::Wrapper_i_jb_binary::get_data_types().
|
virtual |
Returns the dimension of each 'frame' of the data in the wrapper.
Implements utilities::Wrapper_in.
References dims_.
Referenced by utilities::Wrapper_i_jb_binary::get_dims().
|
inherited |
Returns a pointer to plane j's meta data store.
Const version
References utilities::Wrapper_in::md_stores_.
Referenced by tracking::Master_box::get_Md_store(), and tracking::hash_case::init().
|
inherited |
Returns a pointer to plane j's meta data store.
Const version
References utilities::Wrapper_in::md_stores_.
|
inherited |
Gets the size of the md_stores_ vector.
References utilities::Wrapper_in::md_stores_.
|
virtual |
Return the number of entries the specified frame.
Implements utilities::Wrapper_in.
References frame_c_.
Referenced by utilities::Wrapper_i_jb_binary::get_num_entries().
|
virtual |
Return the total number of entries in the wrapper.
Implements utilities::Wrapper_in.
References total_part_count_.
|
virtual |
Return the number of frames.
Implements utilities::Wrapper_in.
References frame_count_.
Referenced by utilities::Wrapper_i_jb_binary::get_num_frames().
|
virtual |
Returns the value of the type specified from the particle selected.
out | [out] the value |
ind | [in] the index of the particle |
type | [in] the D_TYPE |
frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
References contains_type(), d_mapi_, data_i_, utilities::DT2str_s(), utilities::V_INT, and utilities::v_type().
Referenced by utilities::Wrapper_i_jb_binary::get_value().
|
virtual |
Returns the value of the type specified from the particle selected.
out | [out] the value |
ind | [in] the index of the particle |
type | [in] the D_TYPE |
frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
References contains_type(), d_mapf_, utilities::D_ZPOS, data_f_, utilities::DT2str_s(), frame_zdata_, two_d_data_, utilities::V_FLOAT, and utilities::v_type().
|
virtual |
Returns the value of the type specified from the particle selected.
out | [out] the value |
ind | [in] the index of the particle |
type | [in] the D_TYPE |
frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
References contains_type(), d_mapc_, data_c_, utilities::DT2str_s(), utilities::V_COMPLEX, and utilities::v_type().
|
private |
|
inherited |
Sets the Md_store for plane j.
When the pointer is assigned the wrapper takes ownership of the pointer and will clean it up.
References utilities::Wrapper_in::md_stores_.
Referenced by iden::Iden::fill_wrapper(), iden::Iden::fill_wrapper_avg(), main(), utilities::Wrapper_i_hdf::priv_init(), and iden::Iden::process_frame().
|
inherited |
Sets the size of the md_stores_ vector.
References utilities::Wrapper_in::md_stores_.
Referenced by iden::Iden::fill_wrapper(), iden::Iden::fill_wrapper_avg(), main(), utilities::Wrapper_i_hdf::priv_init(), and iden::Wrapper_i_plu::Wrapper_i_plu().
|
private |
Current data_type.
Referenced by add_float_data(), add_int_data(), clear_data_type(), and set_data_type().
|
private |
current frame number
Referenced by add_float_data(), add_int_data(), and open_frame().
|
private |
current frame size
Referenced by add_float_data(), add_int_data(), close_frame(), and open_frame().
|
private |
Data map for complex<float> data.
Referenced by get_value(), and setup().
|
private |
Data map for float data.
Referenced by add_float_data(), get_value(), open_frame(), and setup().
|
private |
Data map for integer data.
Referenced by add_int_data(), get_value(), open_frame(), and setup().
|
private |
Data structure for complex<float> data.
First dimension is data type, second is frame, third in particle index
Referenced by clean_data(), get_value(), and setup().
|
private |
Data structure for float data.
First dimension is data type, second is frame, third in particle index
Referenced by add_float_data(), clean_data(), get_value(), open_frame(), and setup().
|
private |
Data structure for integer data.
First dimension is data type, second is frame, third in particle index
Referenced by add_int_data(), clean_data(), get_value(), open_frame(), and setup().
|
private |
Set of data types in the wrapper.
This is mostly redundant, but useful.
Referenced by contains_type(), get_data_types(), open_frame(), and setup().
|
private |
dimensions of data
Referenced by get_dims(), and set_dims().
|
private |
set of added data types
Referenced by close_frame(), open_frame(), and set_data_type().
|
private |
the number of particles in each frame
Referenced by get_num_entries(), open_frame(), and setup().
|
private |
The number of frames.
Referenced by get_num_frames(), open_frame(), and setup().
|
private |
if there is a frame open to add data too
Referenced by close_frame(), open_frame(), and set_data_type().
|
private |
A vector of the z-position of each frame.
For 2D data this is the center of the plane, for 3D this provides if we have any drift.
Referenced by get_value(), open_frame(), and setup().
|
private |
if the parameters are locked
Referenced by clean_data(), and setup().
|
private |
The total number of particles in all frames.
Referenced by get_num_entries(), and open_frame().
|
private |
2D data flag
Referenced by get_value().