Particle Identification and Tracking
Public Member Functions | Protected Attributes | List of all members
tracking::hash_box Class Reference

Class for storing particles in the hash table. More...

#include <hash_box.h>

+ Collaboration diagram for tracking::hash_box:

Public Member Functions

void pass_fun_to_part (void(particle::*fun)())
 Passes functions down the pyramid, this one for void, argument-less functions noncosnst. More...
 
void pass_fun_to_part (void(particle::*fun)() const) const
 Passes functions down the pyramid, this one for void, argument-less functions const. More...
 
void output_to_wrapper (utilities::Wrapper_out &wrapper) const
 loops over particles to More...
 
void compute_corr (tracking::Corr &) const
 passes a Corr object down the pyramid More...
 
void compute_accum (Accumulator &in) const
 Passes an Accumulator object down the pyramid. More...
 
over all control

Constructors, destructor, and clear all data

 hash_box (const Hash_shelf *in, int hash_indx, bool own_part)
 constructor with Hash_shelf information More...
 
 hash_box ()
 empty constructor More...
 
 ~hash_box ()
 Destructor. Clears all the pointers to try and avoid stale pointers. More...
 
void clear ()
 clears all the pointers, but doesn't destroy the box. More...
 
void push (particle *next)
 add next particle More...
 
void append (hash_box *next)
 appends the box 'next' to this box. More...
 
void print ()
 prints out a representation of this in some useful way More...
 
Getter Functions
int get_size ()
 Returns the size of the box, ie number of particles. More...
 
void get_val_vec (std::vector< float > &vec, utilities::D_TYPE type)
 Returns a vector of the data of p_vals type for the box. More...
 
std::vector< particle * >::iterator begin ()
 Returns an iterator to the front of the contents vector, a-la the vector.begin() function. More...
 
std::vector< particle * >
::const_iterator 
begin () const
 a very const version More...
 
std::vector< particle * >::iterator end ()
 Returns an iterator to past the end of the contents vector, a-la the vector.end() function. More...
 
void box_to_list (std::list< particle * > &p_list) const
 A safer version of converting a hash_box to a list. More...
 

Protected Attributes

std::vector< particle * > contents_
 Contents of the box. More...
 
const Hash_shelfshelf_
 pointer to the Hash_shelf that contains this box More...
 
int hash_indx_
 position in hash shelf More...
 
bool owns_particles_
 If the hash box owns the particles or not. More...
 

Detailed Description

Class for storing particles in the hash table.

This class will hold a list of the particle set in part_def.h. The primary purpose of this class is to sit in a shelf that corresponds to a hash table of the data. It can also be used to be passed out of shelf functions as a list of the particles selected, however this is confusing and should not be done.

Todo:
rename to proper capitalization

Constructor & Destructor Documentation

tracking::hash_box::hash_box ( const Hash_shelf in,
int  hash_indx,
bool  own_part 
)
inline

constructor with Hash_shelf information

tracking::hash_box::hash_box ( )
inline

empty constructor

hash_box::~hash_box ( )

Destructor. Clears all the pointers to try and avoid stale pointers.

References contents_, and owns_particles_.

Member Function Documentation

void hash_box::append ( hash_box next)

appends the box 'next' to this box.

References contents_.

Referenced by tracking::Hash_shelf::get_region().

std::vector<particle*>::iterator tracking::hash_box::begin ( )
inline

Returns an iterator to the front of the contents vector, a-la the vector.begin() function.

Todo:
change hash_shelf::get_region() to not use this, then remove this

References contents_.

Referenced by tracking::Hash_shelf::get_region().

std::vector<particle*>::const_iterator tracking::hash_box::begin ( ) const
inline

a very const version

Todo:
remove this

References contents_.

void hash_box::box_to_list ( std::list< particle * > &  p_list) const

A safer version of converting a hash_box to a list.

References contents_.

Referenced by tracking::hash_case::fill_pos_link_next().

void tracking::hash_box::clear ( )
inline

clears all the pointers, but doesn't destroy the box.

References contents_.

Referenced by tracking::hash_case::fill_pos_link_next().

void hash_box::compute_accum ( Accumulator in) const

Passes an Accumulator object down the pyramid.

References tracking::Accumulator::add_particle(), and contents_.

void hash_box::compute_corr ( tracking::Corr in) const
std::vector<particle*>::iterator tracking::hash_box::end ( )
inline

Returns an iterator to past the end of the contents vector, a-la the vector.end() function.

figure out who uses this function is used and make private or kill

References contents_.

Referenced by tracking::Hash_shelf::get_region().

int tracking::hash_box::get_size ( )
inline

Returns the size of the box, ie number of particles.

References contents_.

void tracking::hash_box::get_val_vec ( std::vector< float > &  vec,
utilities::D_TYPE  type 
)

Returns a vector of the data of p_vals type for the box.

void hash_box::output_to_wrapper ( utilities::Wrapper_out wrapper) const

loops over particles to

References contents_, and utilities::Wrapper_out::set_all_values().

void hash_box::pass_fun_to_part ( void(particle::*)()  fun)

Passes functions down the pyramid, this one for void, argument-less functions noncosnst.

References contents_.

void hash_box::pass_fun_to_part ( void(particle::*)() const  fun) const

Passes functions down the pyramid, this one for void, argument-less functions const.

References contents_.

void hash_box::print ( )

prints out a representation of this in some useful way

References contents_.

void tracking::hash_box::push ( particle next)
inline

add next particle

References contents_.

Referenced by tracking::Hash_shelf::push().

Member Data Documentation

std::vector<particle*> tracking::hash_box::contents_
protected
int tracking::hash_box::hash_indx_
protected

position in hash shelf

Referenced by compute_corr().

bool tracking::hash_box::owns_particles_
protected

If the hash box owns the particles or not.

Referenced by ~hash_box().

const Hash_shelf* tracking::hash_box::shelf_
protected

pointer to the Hash_shelf that contains this box

Referenced by compute_corr().


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