Particle Identification and Tracking
Classes | Typedefs | Enumerations | Functions | Variables
utilities Namespace Reference

Namespace for utilities and helper functions. More...

Classes

class  Accum_case
 A class to hold a stack of accum objects for handing into a hash_case. More...
 
class  Attr_list_hdf
 Wraps the attribute functionality of hdf objects. More...
 
class  CL_parse
 A class to wrap the parsing of the command line to extract the input file, output file and parameter file. More...
 
class  Counted_vector
 A class for computing many averages in parallel. More...
 
class  Data_map
 class to handle translation from D_TYPE to column position for flat data structures. More...
 
struct  Data_store
 A struct to hold the data_map and raw data for input and output wrappers. More...
 
class  Ll_range_error
 Exception class derived from the standard range_error class to indicate when a linked list has stepped over it's range. More...
 
class  Null_field
 Exception to report when a function that should return valid pointer from an object, but the field is NULL in the object. More...
 
class  Filter
 ABC for filter objects. More...
 
class  Filter_trivial
 a trivial filter class that does nothing More...
 
class  Filter_ers
 A basic filter, does rg (top), shift (top) and eccentricity (top) cuts. More...
 
class  Filter_ersI
 A basic filter, does rg (top), shift (top), eccentricity (top), and I (bottom) cuts. More...
 
class  Generic_wrapper
 An interface for extracting data from the internal data structures. More...
 
class  Generic_wrapper_read
 Abstract base class to provide an interface for reading data out of Generic_wrapper objects. More...
 
class  Generic_wrapper_hdf
 generic_wrapper for writing to hdf files More...
 
class  Histogram
 Base class for historgram objects. More...
 
class  Histogram2D
 Implements a 2D histogram. More...
 
class  Md_store
 A class to hold meta data. More...
 
class  ND_Array
 A N-D array. More...
 
class  Read_config
 class for reading configuration from xml files. More...
 
class  SQL_handler
 Class to wrap around the sqlite3 interface to deal with making connections to data basese, cleaning up after them etc. More...
 
class  Tuple
 Class for carrying around the posistion and velocity vectors. More...
 
class  Wrapper_in
 A mostly abstract base class for input wrappers. More...
 
class  Wrapper_i_dummy
 Wrapper class for testing purposes. More...
 
class  Wrapper_i_file
 Wrapper class for dealing with data from a text file. More...
 
class  Wrapper_i_generic
 Wrapper class for eating data from arbitrary sources. More...
 
class  Wrapper_i_hdf
 Wrapper class for eating data from hdf files, take 2. More...
 
class  Wrapper_i_jb_binary
 Wrapper class for dealing with data from Justin's simulations. More...
 
class  Wrapper_out
 ABC for output wrappers. More...
 
class  wrapper_o_file
 wrapper_o class for dealing with writing data to a file. More...
 
class  Wrapper_o_hdf
 Wrapper class for dealing with output to matlab. More...
 
class  Wrapper_o_hdf_group
 Wrapper class for dealing with output to matlab. More...
 

Typedefs

typedef enum utilities::W_TYPE W_TYPE
 Enumeration for wrapper types. More...
 
typedef enum utilities::D_TYPE D_TYPE
 Enumeration for data types (where type is the physical meaning of the data). More...
 
typedef enum utilities::V_TYPE V_TYPE
 Enumeration for the type of value the data is (ie float, int,complex) More...
 
typedef enum utilities::FILT_TYPE FILT_TYPE
 Enumeration for keeping track of which filter type a filter is, useful for checking to make sure that the factory behaved properly. More...
 
typedef Tuple< int, 2 > Tuplei
 
typedef Tuple< float, 2 > Tuplef
 
typedef enum utilities::F_TYPE F_TYPE
 Enumeration for functions that maps to the tables in the database. More...
 

Enumerations

enum  W_TYPE { W_MATLAB = 0, W_TEXT, W_NING, W_HDF }
 Enumeration for wrapper types. More...
 
enum  D_TYPE {
  D_INDEX =0, D_XPOS =1, D_YPOS =2, D_FRAME =3,
  D_I =4, D_R2 =5, D_E =6, D_NEXT_INDX =7,
  D_PREV_INDX =8, D_DX =9, D_DY =10, D_ORGX =11,
  D_ORGY =12, D_ZPOS =13, D_TRACKID =14, D_S_ORDER_PARAMETER =15,
  D_MULT =16, D_N_SIZE =17, D_SENTRY
}
 Enumeration for data types (where type is the physical meaning of the data). More...
 
enum  V_TYPE {
  V_ERROR = -1, V_UINT = 0, V_INT =1, V_FLOAT =2,
  V_COMPLEX =3, V_STRING =4, V_BOOL =5, V_TIME =6,
  V_GUID =7
}
 Enumeration for the type of value the data is (ie float, int,complex) More...
 
enum  FILT_TYPE { FILT_TRIV = 0, FILT_ERS, FILT_ERSImin }
 Enumeration for keeping track of which filter type a filter is, useful for checking to make sure that the factory behaved properly. More...
 
enum  F_TYPE {
  F_NOFUNCTION = 0, F_IDEN = 1, F_IDEN_AVG = 2, F_GOFR = 3,
  F_GOFR3D = 4, F_GOFR_BY_PLANE = 5, F_LINK3D = 6, F_MSD = 7,
  F_PHI6 = 8, F_TRACK_STATS = 9, F_TRACKING = 10, F_VANHOVE = 11,
  F_MSD_SWEEP = 12
}
 Enumeration for functions that maps to the tables in the database. More...
 

Functions

std::string DT2str_s (D_TYPE in)
 Helper functions to convert D_TYPEs in to short name strings. More...
 
D_TYPE str2DT_s (std::string in)
 Helper functions to convert short name strings in to D_TYPEs. More...
 
V_TYPE v_type (D_TYPE in)
 Helper function to map between D_TYPE and V_TYPE. More...
 
std::string format_dset_name (D_TYPE type, int comp_num)
 Helper function to format dset names with computation numbers attached. More...
 
std::string format_name (const std::string &name,int comp_num)
 Helper function to format computation numbers on to strings. More...
 
V_TYPE str2VT_s (const std::string &type_str)
 Helper function to make string in to V_TYPE. More...
 
V_TYPE str2VT_s (const char *const in)
 Helper function to make string in to V_TYPE. More...
 
std::string VT2str_s (V_TYPE)
 Helper function to make v_types to strings. More...
 
template<typename _CharT , class _Traits >
std::basic_ostream< _CharT,
_Traits > & 
operator<< (std::basic_ostream< _CharT, _Traits > &__os, const Data_map &in)
 prints out the data_map to cout lifted almost whole cloth from c++/4.3/complex More...
 
Filterfilter_factory (const Md_store &filter_prams)
 Guesses which filter to generate from the parameters it is given in the Md_store object. More...
 
Md_store extract_prams (const std::string &fname, int comp_num, const std::vector< std::string > &pram_list)
 Extracts filter parameters from a data file. More...
 
std::string ftype_to_str (F_TYPE f)
 
template<typename _CharT , class _Traits , class T , int length>
std::basic_ostream< _CharT,
_Traits > & 
operator<< (std::basic_ostream< _CharT, _Traits > &__os, const Tuple< T, length > &in)
 prints out the tuple to cout lifted almost whole cloth from c++/4.3/complex More...
 

Variables

const int format_padding_ = 7
 

Detailed Description

Namespace for utilities and helper functions.

Typedef Documentation

Enumeration for data types (where type is the physical meaning of the data).

If you add to this you MUST update the count below this, add the D_TYPE to the V_TYPE conversion function, and D2Str function.

Enumeration for functions that maps to the tables in the database.

The values of the enumeration need to stay synced with the values of func_names table in the database. This should be replaced with something more flexible eventually.

Enumeration for keeping track of which filter type a filter is, useful for checking to make sure that the factory behaved properly.

typedef Tuple<float,2> utilities::Tuplef
typedef Tuple<int,2> utilities::Tuplei

Enumeration for the type of value the data is (ie float, int,complex)

Enumeration for wrapper types.

I do not think that this is used by anything

Todo:
remove this

Enumeration Type Documentation

Enumeration for data types (where type is the physical meaning of the data).

If you add to this you MUST update the count below this, add the D_TYPE to the V_TYPE conversion function, and D2Str function.

Enumerator
D_INDEX 
D_XPOS 
D_YPOS 
D_FRAME 
D_I 
D_R2 
D_E 
D_NEXT_INDX 
D_PREV_INDX 
D_DX 
D_DY 
D_ORGX 
D_ORGY 
D_ZPOS 
D_TRACKID 
D_S_ORDER_PARAMETER 
D_MULT 
D_N_SIZE 
D_SENTRY 

Enumeration for functions that maps to the tables in the database.

The values of the enumeration need to stay synced with the values of func_names table in the database. This should be replaced with something more flexible eventually.

Enumerator
F_NOFUNCTION 
F_IDEN 
F_IDEN_AVG 
F_GOFR 
F_GOFR3D 
F_GOFR_BY_PLANE 
F_LINK3D 
F_MSD 
F_PHI6 
F_TRACK_STATS 
F_TRACKING 
F_VANHOVE 
F_MSD_SWEEP 

Enumeration for keeping track of which filter type a filter is, useful for checking to make sure that the factory behaved properly.

Enumerator
FILT_TRIV 
FILT_ERS 
FILT_ERSImin 

Enumeration for the type of value the data is (ie float, int,complex)

Enumerator
V_ERROR 
V_UINT 
V_INT 
V_FLOAT 
V_COMPLEX 
V_STRING 
V_BOOL 
V_TIME 
V_GUID 

Enumeration for wrapper types.

I do not think that this is used by anything

Todo:
remove this
Enumerator
W_MATLAB 
W_TEXT 
W_NING 
W_HDF 

Function Documentation

std::string utilities::DT2str_s ( D_TYPE  in)
Md_store utilities::extract_prams ( const std::string &  fname,
int  comp_num,
const std::vector< std::string > &  pram_list 
)

Extracts filter parameters from a data file.

Extracts the parameters asked for. This functionality should be folded into the wrapper class.

References utilities::Md_store::add_element(), utilities::Attr_list_hdf::contains_attr(), D_XPOS, format_dset_name(), utilities::Attr_list_hdf::get_type(), utilities::Attr_list_hdf::get_value(), V_BOOL, V_COMPLEX, V_ERROR, V_FLOAT, V_GUID, V_INT, V_STRING, V_TIME, V_UINT, and VT2str_s().

Referenced by main().

Filter * utilities::filter_factory ( const Md_store filter_prams)

Guesses which filter to generate from the parameters it is given in the Md_store object.

The returned object needs to be cleaned up.

References utilities::Md_store::contains_key(), utilities::Filter_ers::init(), and utilities::Filter_ersI::init().

Referenced by main().

std::string utilities::format_dset_name ( D_TYPE  type,
int  comp_num 
)
std::string utilities::format_name ( const std::string &  name,
int  comp_num 
)
std::string utilities::ftype_to_str ( F_TYPE  f)
template<typename _CharT , class _Traits >
std::basic_ostream<_CharT, _Traits>& utilities::operator<< ( std::basic_ostream< _CharT, _Traits > &  __os,
const Data_map &  in 
)

prints out the data_map to cout lifted almost whole cloth from c++/4.3/complex

References D_SENTRY.

template<typename _CharT , class _Traits , class T , int length>
std::basic_ostream<_CharT, _Traits>& utilities::operator<< ( std::basic_ostream< _CharT, _Traits > &  __os,
const Tuple< T, length > &  in 
)

prints out the tuple to cout lifted almost whole cloth from c++/4.3/complex

D_TYPE utilities::str2DT_s ( std::string  in)

Helper functions to convert short name strings in to D_TYPEs.

References D_TRACKID.

V_TYPE utilities::str2VT_s ( const std::string &  type_str)

Helper function to make string in to V_TYPE.

References V_BOOL, V_ERROR, V_FLOAT, V_GUID, V_INT, V_STRING, V_TIME, and V_UINT.

Referenced by utilities::Md_store::add_element(), and str2VT_s().

V_TYPE utilities::str2VT_s ( const char *const  in)

Helper function to make string in to V_TYPE.

References str2VT_s().

V_TYPE utilities::v_type ( D_TYPE  in)
std::string utilities::VT2str_s ( V_TYPE  type)

Variable Documentation

const int utilities::format_padding_ = 7

Referenced by format_name().