tracking::wrapper_o_matlab Class Reference

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

#include <wrapper_o_matlab.h>

Inheritance diagram for tracking::wrapper_o_matlab:
Inheritance graph
[legend]
Collaboration diagram for tracking::wrapper_o_matlab:
Collaboration graph
[legend]

List of all members.

Public Types

enum  p_vals {
  D_INDEX = 0, D_XPOS, D_YPOS, D_FRAME,
  D_I, D_R2, D_E, D_NEXT,
  D_PREV, D_DX, D_DY, D_ORGX,
  D_ORGY, D_ZPOS, D_UNQID, D_TRACKID,
  D_S_ORDER_PARAMETER
}
 

enumeration for data types

More...

Public Member Functions

void set_new_value (wrapper::p_vals type, double val)
 sets the data for type to val for the currently activated particle in the data structure.
void end_new_particle ()
 'closes' a partcile anc garuntees that the data is written to the underlying data structure.
void finalize_wrapper ()
 Preforms any clean up (not of data structures, that is taken care of by destructor) that needs to be done such as closing a file.
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.
void reset_wrapper (params *param)
 changes where the wrapper is pointing (ie, write out to a different array or file or somethin
void start_new_particle ()
 sets up the wrapper to add new particle to the underlying data structure.
 wrapper_o_matlab (params_matlab *parms)
 ~wrapper_o_matlab ()
void print () const
 Prints out the currents contents of the wrapper in some sort of sensible way.
int num_entries () const
 returns the number of particles stored
virtual std::set< p_valsget_data_types () const
 Returns a set of the types of data that the wrapper knows how to deal with.
std::map< p_vals, int > * get_map_ptr ()
 Returns a pointer to the map.

Protected Attributes

int part_count
 Count of the number of particles that have been added.
int seq_count
 to be removed, move this accounting to derived classes posistion in squence
bool part_open
 if a particle is 'opened'
bool wrapper_open
 if the wrapper is 'open' to get additional particles
bool clone
 Boolean value to determine if this is a cloned wrapper or not.
std::map< p_vals, int > data_types_
 A map between the data types and a posistion in the data structure.
int data_layout_ [16]

Private Attributes

mxArray ** data_array_
 Pointer to matlab array that holds the data.
int rows
 The number of rows in the array.
int cols
 The number of columns (and hence number of values in the array.
double * first
 anchor to data with in array
int part_index
 index of current open particle

Detailed Description

Wrapper class for dealing with output to matlab.


Member Enumeration Documentation

enum tracking::wrapper::p_vals [inherited]

enumeration for data types

Enumerator:
D_INDEX 
D_XPOS 
D_YPOS 
D_FRAME 
D_I 
D_R2 
D_E 
D_NEXT 
D_PREV 
D_DX 
D_DY 
D_ORGX 
D_ORGY 
D_ZPOS 
D_UNQID 
D_TRACKID 
D_S_ORDER_PARAMETER 

Constructor & Destructor Documentation

wrapper_o_matlab::wrapper_o_matlab ( params_matlab parms  ) 
wrapper_o_matlab::~wrapper_o_matlab (  ) 

Member Function Documentation

void wrapper_o_matlab::end_new_particle (  )  [virtual]

'closes' a partcile anc garuntees that the data is written to the underlying data structure.

Does nothing if a particle isn't open.

Implements tracking::wrapper_o_base.

References part_index, and tracking::wrapper_o_base::part_open.

void wrapper_o_matlab::finalize_wrapper (  )  [virtual]

Preforms any clean up (not of data structures, that is taken care of by destructor) that needs to be done such as closing a file.

Implements tracking::wrapper_o_base.

References tracking::wrapper_o_base::wrapper_open.

Referenced by ~wrapper_o_matlab().

std::set< wrapper::p_vals > wrapper::get_data_types (  )  const [virtual, inherited]

Returns a set of the types of data that the wrapper knows how to deal with.

References tracking::wrapper::data_types_.

Referenced by tracking::Wrapper_i_hdf5::fill_master_box(), and tracking::master_box_t< particle >::init().

std::map<p_vals, int>* tracking::wrapper::get_map_ptr (  )  [inline, inherited]

Returns a pointer to the map.

References tracking::wrapper::data_types_.

void wrapper_o_matlab::initialize_wrapper (  )  [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 tracking::wrapper_o_base.

References cols, data_array_, first, rows, and tracking::wrapper_o_base::wrapper_open.

int tracking::wrapper_o_matlab::num_entries (  )  const [inline, virtual]

returns the number of particles stored

Implements tracking::wrapper_o_base.

void wrapper_o_matlab::print (  )  const [virtual]

Prints out the currents contents of the wrapper in some sort of sensible way.

Implements tracking::wrapper.

References cols, and rows.

void wrapper_o_matlab::reset_wrapper ( params param  )  [virtual]
void wrapper_o_matlab::set_new_value ( wrapper::p_vals  type,
double  val 
) [virtual]

sets the data for type to val for the currently activated particle in the data structure.

If the wrapper doesn't know about the p_val type, then [[throw an exception|ignore]] )(have not decided yet)

Parameters:
type the parameter to be set
val the value to set the parameter to

Implements tracking::wrapper_o_base.

References tracking::wrapper::data_layout_, first, part_index, tracking::wrapper_o_base::part_open, and rows.

void wrapper_o_matlab::start_new_particle (  )  [virtual]

sets up the wrapper to add new particle to the underlying data structure.

Behavior of this function if a particle is alread 'open' is currently undefined(either close it and move on, or nuke the old data, or just keep appending to it)

This function can either write straight in to the underlyign data structure or work through a temporary buffer

Implements tracking::wrapper_o_base.

References part_index, tracking::wrapper_o_base::part_open, rows, tracking::wrapper_o_base::seq_count, and tracking::wrapper_o_base::wrapper_open.


Member Data Documentation

bool tracking::wrapper::clone [protected, inherited]

Boolean value to determine if this is a cloned wrapper or not.

If the data structure of this is pointing at the same chunk of memory as another wrapper, then it only needs to be deleted once. Currently none of this is implemented

The number of columns (and hence number of values in the array.

This isn't strictly needed, hoever it should make returning values faster by amoritizing the dereference cost, maybe

Referenced by initialize_wrapper(), and print().

Pointer to matlab array that holds the data.

Referenced by initialize_wrapper(), and reset_wrapper().

int tracking::wrapper::data_layout_[16] [protected, inherited]
std::map<p_vals, int> tracking::wrapper::data_types_ [protected, inherited]

A map between the data types and a posistion in the data structure.

This orginally had been burried down in the derived classes, but I couldn't think of a data structure for storing particle data where this sort of thing wasn't uesful. Thus, it has been dragged up to the top level.

Referenced by tracking::wrapper::get_data_types(), tracking::wrapper::get_map_ptr(), tracking::wrapper_i_ning::get_value(), tracking::wrapper_i_matlab::get_value(), tracking::wrapper_i_file::get_value(), tracking::wrapper_i_base::print(), and tracking::wrapper::wrapper().

anchor to data with in array

Referenced by initialize_wrapper(), and set_new_value().

int tracking::wrapper_o_base::part_count [protected, inherited]

Count of the number of particles that have been added.

Referenced by reset_wrapper().

index of current open particle

Referenced by end_new_particle(), set_new_value(), and start_new_particle().

bool tracking::wrapper_o_base::part_open [protected, inherited]

The number of rows in the array.

This isn't strictly needed, hoever it should make returning values faster by amoritizing the dereference cost, maybe

Referenced by initialize_wrapper(), print(), set_new_value(), and start_new_particle().

int tracking::wrapper_o_base::seq_count [protected, inherited]

to be removed, move this accounting to derived classes posistion in squence

Referenced by reset_wrapper(), and start_new_particle().

bool tracking::wrapper_o_base::wrapper_open [protected, inherited]

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

Generated on Thu Aug 27 10:50:54 2009 for Particle Identification and Tracking by  doxygen 1.5.9-20090622