Particle Identification and Tracking
Public Member Functions | Private Attributes | List of all members
utilities::Wrapper_i_jb_binary Class Reference

Wrapper class for dealing with data from Justin's simulations. More...

#include <wrapper_i_jb_binary.h>

+ Inheritance diagram for utilities::Wrapper_i_jb_binary:
+ Collaboration diagram for utilities::Wrapper_i_jb_binary:

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...
 
std::set< D_TYPEget_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...
 
Tuplef get_dims () const
 Returns the dimension of each 'frame' of the data in the wrapper. More...
 
 ~Wrapper_i_jb_binary ()
 
 Wrapper_i_jb_binary ()
 
bool set_file_name (const std::string &fname)
 Sets the file name. More...
 
bool proc_file (unsigned int N)
 reads in the binary file. More...
 
Meta data handling functions
const Md_storeget_Md_store (unsigned int j) const
 Returns a pointer to plane j's meta data store. More...
 
Md_storeget_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 Attributes

std::string fname_
 path to file to read More...
 
utilities::Wrapper_i_genericwrapper_int_
 pointer to Wrapper_i_generic object that deals with actual data wrangling. More...
 

Detailed Description

Wrapper class for dealing with data from Justin's simulations.

The format is a binary file with a stream X1Y1Z1X2Y2Z2... for order million particles.

Only one 3D packing per file, but this can be split up into any number of planes for faking 3D data.

Constructor & Destructor Documentation

Wrapper_i_jb_binary::~Wrapper_i_jb_binary ( )

References wrapper_int_.

Wrapper_i_jb_binary::Wrapper_i_jb_binary ( )

References wrapper_int_.

Member Function Documentation

void Wrapper_in::clear_Md_store ( unsigned int  j)
inherited

Deletes plane j's Md_store.

References utilities::Wrapper_in::md_stores_.

bool Wrapper_i_jb_binary::contains_type ( D_TYPE  type) const
virtual

Returns if the wrapper contains the specified data type.

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::contains_type(), and wrapper_int_.

std::set< D_TYPE > Wrapper_i_jb_binary::get_data_types ( ) const
virtual

Returns a set of the data types.

Use the other version

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_data_types(), and wrapper_int_.

Tuplef Wrapper_i_jb_binary::get_dims ( ) const
virtual

Returns the dimension of each 'frame' of the data in the wrapper.

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_dims(), and wrapper_int_.

const Md_store * Wrapper_in::get_Md_store ( unsigned int  j) const
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().

Md_store * Wrapper_in::get_Md_store ( unsigned int  j)
inherited

Returns a pointer to plane j's meta data store.

Const version

References utilities::Wrapper_in::md_stores_.

unsigned int Wrapper_in::get_Md_store_size ( )
inherited

Gets the size of the md_stores_ vector.

References utilities::Wrapper_in::md_stores_.

int Wrapper_i_jb_binary::get_num_entries ( unsigned int  frame) const
virtual

Return the number of entries the specified frame.

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_num_entries(), and wrapper_int_.

int Wrapper_i_jb_binary::get_num_entries ( ) const
virtual

Return the total number of entries in the wrapper.

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_num_entries(), and wrapper_int_.

int Wrapper_i_jb_binary::get_num_frames ( ) const
virtual

Return the number of frames.

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_num_frames(), and wrapper_int_.

int Wrapper_i_jb_binary::get_value ( int &  out,
int  ind,
D_TYPE  type,
int  frame 
) const
virtual

Returns the value of the type specified from the particle selected.

Parameters
out[out] the value
ind[in] the index of the particle
type[in] the D_TYPE
frame[in] the frame the particle is in
Returns
the value

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_value(), and wrapper_int_.

float Wrapper_i_jb_binary::get_value ( float &  out,
int  ind,
D_TYPE  type,
int  frame 
) const
virtual

Returns the value of the type specified from the particle selected.

Parameters
out[out] the value
ind[in] the index of the particle
type[in] the D_TYPE
frame[in] the frame the particle is in
Returns
the value

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_value(), and wrapper_int_.

std::complex< float > Wrapper_i_jb_binary::get_value ( std::complex< float > &  out,
int  ind,
D_TYPE  type,
int  frame 
) const
virtual

Returns the value of the type specified from the particle selected.

Parameters
out[out] the value
ind[in] the index of the particle
type[in] the D_TYPE
frame[in] the frame the particle is in
Returns
the value

Implements utilities::Wrapper_in.

References utilities::Wrapper_i_generic::get_value(), and wrapper_int_.

bool Wrapper_i_jb_binary::proc_file ( unsigned int  N)
bool Wrapper_i_jb_binary::set_file_name ( const std::string &  fname)

Sets the file name.

References fname, and fname_.

Referenced by main().

void Wrapper_in::set_Md_store ( unsigned int  j,
Md_store in 
)
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().

void Wrapper_in::set_Md_store_size ( unsigned int  j)
inherited

Member Data Documentation

std::string utilities::Wrapper_i_jb_binary::fname_
private

path to file to read

Referenced by proc_file(), and set_file_name().

utilities::Wrapper_i_generic* utilities::Wrapper_i_jb_binary::wrapper_int_
private

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