tracking::wrapper_o_base Class Reference

Abstract base class for data wrapper_o 's. More...

#include <wrapper_o.h>

Inheritance diagram for tracking::wrapper_o_base:
Inheritance graph
[legend]
Collaboration diagram for tracking::wrapper_o_base:
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...
enum  W_TYPE { W_MATLAB = 0, W_TEXT, W_NING, W_HDF }
 

Enumeration for wrapper types.

More...

Public Member Functions

virtual ~wrapper_o_base ()
 Destructor.
virtual void print () const =0
 Prints out the currents contents of the wrapper in some sort of sensible way.
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.
old API Old wrapper_o API, will be depreciated.

(From the one class that uses it, leave me alone, im trying to leave a trail for my self to follow later).



virtual int num_entries () const =0
 returns the number of particles stored
NEW API

adds another particle to the data table and fills it with zero values.

Returns the index of the new particle

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)

If the underlying data struture has a notion of 'order' then the particles are garunteed to be in that structure in the order they were added

Typical life cycle:

-initialize wrapper -loop over particles --open particle --set values --close particles -finalize wrapper



virtual void start_new_particle ()=0
 sets up the wrapper to add new particle to the underlying data structure.
virtual void set_new_value (utilities::D_TYPE type, double val)=0
 sets the data for type to val for the currently activated particle in the data structure.
virtual void end_new_particle ()=0
 'closes' a partcile anc garuntees that the data is written to the underlying data structure.
virtual void finalize_wrapper ()=0
 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.
virtual void initialize_wrapper ()=0
 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.
virtual void reset_wrapper (params *param)=0
 changes where the wrapper is pointing (ie, write out to a different array or file or somethin

Protected Member Functions

 wrapper_o_base (std::map< p_vals, int >map_in)

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]

Detailed Description

Abstract base class for data wrapper_o 's.

In terms of functionality derived classes can declare

Author:
Thomas Caswell

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 
enum tracking::wrapper::W_TYPE [inherited]

Enumeration for wrapper types.

Enumerator:
W_MATLAB 
W_TEXT 
W_NING 
W_HDF 

Constructor & Destructor Documentation

tracking::wrapper_o_base::wrapper_o_base ( std::map< p_vals, int >  map_in  )  [inline, protected]
virtual tracking::wrapper_o_base::~wrapper_o_base (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void tracking::wrapper_o_base::end_new_particle (  )  [pure virtual]

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

Does nothing if a particle isn't open.

virtual void tracking::wrapper_o_base::finalize_wrapper (  )  [pure 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.

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

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

Referenced by tracking::Wrapper_i_hdf5::fill_master_box().

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

Returns a pointer to the map.

References tracking::wrapper::data_types_.

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

virtual int tracking::wrapper_o_base::num_entries (  )  const [pure virtual]

returns the number of particles stored

Implements tracking::wrapper.

virtual void tracking::wrapper::print (  )  const [pure virtual, inherited]

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

Implemented in tracking::wrapper_i_file, tracking::Wrapper_i_hdf5, and tracking::wrapper_i_ning.

virtual void tracking::wrapper_o_base::reset_wrapper ( params param  )  [pure virtual]

changes where the wrapper is pointing (ie, write out to a different array or file or somethin

virtual void tracking::wrapper_o_base::set_new_value ( utilities::D_TYPE  type,
double  val 
) [pure 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
virtual void tracking::wrapper_o_base::start_new_particle (  )  [pure 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


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

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_map_ptr(), tracking::wrapper_i_ning::get_value(), tracking::wrapper_i_file::get_value(), and tracking::wrapper_i_base::print().

Count of the number of particles that have been added.

if a particle is 'opened'

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

if the wrapper is 'open' to get additional particles


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

Generated on Thu Sep 10 01:51:38 2009 for Particle Identification and Tracking by  doxygen 1.5.9-20090622