Public Member Functions | Private Attributes
VoltDistrCreator Class Reference

Helper class for the volt_distr node. More...

#include <volt_distr_creator.h>

List of all members.

Public Member Functions

void add (const neuro_recv::dish_state &d)
 Adds the values of a dish state to the distribution.
boost::array< double, 60 > getPercents ()
 Gets the percentage of negative dishes for each channel.
void setDoTruncateVolts (int i)
void toFile (const std::string &file_path)
 Saves the distrubution data to file in CSV format.
 VoltDistrCreator ()

Private Attributes

bool do_truncate_volts_
std::ofstream log_file_
boost::array< int, 60 > negatives_
int total_dishes_
std::map< double, std::vector
< int > > 
volts_

Detailed Description

Helper class for the volt_distr node.

Creates a distribution of recorded voltages on each channel.

Author:
Jonathan Hasenzahl

Definition at line 38 of file volt_distr_creator.h.


Constructor & Destructor Documentation

Definition at line 10 of file volt_distr_creator.cpp.


Member Function Documentation

void VoltDistrCreator::add ( const neuro_recv::dish_state &  d)

Adds the values of a dish state to the distribution.

The class maintains a histogram of voltages, as well as a count of negative voltages, for each channel.

Parameters:
dthe dish state being added

Definition at line 25 of file volt_distr_creator.cpp.

boost::array< double, 60 > VoltDistrCreator::getPercents ( )

Gets the percentage of negative dishes for each channel.

Returns:
an array of doubles representing the percentage of negative dishes for each channel

Definition at line 98 of file volt_distr_creator.cpp.

void VoltDistrCreator::setDoTruncateVolts ( int  i) [inline]

Definition at line 47 of file volt_distr_creator.h.

void VoltDistrCreator::toFile ( const std::string &  file_path)

Saves the distrubution data to file in CSV format.

Parameters:
file_paththe path of the file to be saved

Definition at line 64 of file volt_distr_creator.cpp.


Member Data Documentation

Definition at line 52 of file volt_distr_creator.h.

std::ofstream VoltDistrCreator::log_file_ [private]

Definition at line 51 of file volt_distr_creator.h.

boost::array<int, 60> VoltDistrCreator::negatives_ [private]

Definition at line 53 of file volt_distr_creator.h.

Definition at line 54 of file volt_distr_creator.h.

std::map<double, std::vector<int> > VoltDistrCreator::volts_ [private]

Definition at line 50 of file volt_distr_creator.h.


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


volt_distr
Author(s): Jonathan Hasenzahl
autogenerated on Sun Jan 5 2014 11:12:31