CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Member Functions | Public Attributes | List of all members
cass::Axis< T > Struct Template Reference

an axis of a more than 0 dimensional container More...

#include <result.hpp>

+ Collaboration diagram for cass::Axis< T >:

Public Types

enum  { serializationVersion =10 }
 the serialization version of this class More...
 
typedef T value_t
 the presision type of the axis boundaries More...
 

Public Member Functions

 Axis ()
 default Constructor More...
 
 Axis (size_t nbrBins, value_t lowerLimit, value_t upperLimit, std::string title="Axis Title")
 Constructor. More...
 
value_t pos (const int bin) const
 calculate the position for a given bin More...
 
int bin (const value_t &val) const
 return the bin that a value will fall in More...
 
bool isUnderflow (int bin) const
 check if a bin is an underflow More...
 
bool isOverflow (int bin) const
 check if a bin is an overflow More...
 

Public Attributes

size_t nBins
 the number of bins in this axis More...
 
value_t low
 lower end of the axis More...
 
value_t up
 upper end of the axis More...
 
std::string title
 the title of the axis More...
 

Detailed Description

template<typename T>
struct cass::Axis< T >

an axis of a more than 0 dimensional container

Template Parameters
thetype in which the bin limits are given
Author
Lutz Foucar

Definition at line 29 of file result.hpp.

Member Typedef Documentation

template<typename T>
typedef T cass::Axis< T >::value_t

the presision type of the axis boundaries

Definition at line 216 of file result.hpp.

Member Enumeration Documentation

template<typename T>
anonymous enum

the serialization version of this class

Enumerator
serializationVersion 

Definition at line 213 of file result.hpp.

Constructor & Destructor Documentation

template<typename T>
cass::Axis< T >::Axis ( )
inline

default Constructor

Definition at line 219 of file result.hpp.

template<typename T>
cass::Axis< T >::Axis ( size_t  nbrBins,
value_t  lowerLimit,
value_t  upperLimit,
std::string  title = "Axis< T > Title" 
)
inline

Constructor.

will set the properties in the initializtion list. Will also set the version for the de / serialization.

Parameters
nbrBinsThe Number of Bins the axis contains
lowerLimitThe lower end of the axis
upperLimitThe upper end of the axis

Definition at line 235 of file result.hpp.

Member Function Documentation

template<typename T>
int cass::Axis< T >::bin ( const value_t val) const
inline

return the bin that a value will fall in

in case the value is nan return a value that states and underflow

Returns
the bin that the value will fall into or -1 in case value is nan
Parameters
valthe value that should be histogrammed

Definition at line 259 of file result.hpp.

References cass::Axis< T >::low, cass::Axis< T >::nBins, and cass::Axis< T >::up.

Referenced by cass::histogramming::bin().

template<typename T>
bool cass::Axis< T >::isOverflow ( int  bin) const
inline

check if a bin is an overflow

Returns
true if bin is overflow
Parameters
binthe bin to check

Definition at line 281 of file result.hpp.

References cass::Axis< T >::nBins.

Referenced by cass::histogramming::bin().

template<typename T>
bool cass::Axis< T >::isUnderflow ( int  bin) const
inline

check if a bin is an underflow

Returns
true if bin is underflow
Parameters
binthe bin to check

Definition at line 271 of file result.hpp.

Referenced by cass::histogramming::bin().

template<typename T>
value_t cass::Axis< T >::pos ( const int  bin) const
inline

calculate the position for a given bin

Returns
the position of the bin
Parameters
binthe bin to calculate the postion for

Definition at line 247 of file result.hpp.

References cass::Axis< T >::low, cass::Axis< T >::nBins, and cass::Axis< T >::up.

Referenced by cass::pp400::ToftoEnergy(), cass::pp406::ToftoEnergy(), cass::pp407::ToftoEnergy(), cass::pp408::ToftoEnergy(), and cass::pp404::ToftoMtC().

Member Data Documentation

template<typename T>
value_t cass::Axis< T >::low
template<typename T>
size_t cass::Axis< T >::nBins
template<typename T>
std::string cass::Axis< T >::title

the title of the axis

Definition at line 296 of file result.hpp.

Referenced by cass::pp65::loadSettings(), lucassview::operator==(), and cass::operator>>().

template<typename T>
value_t cass::Axis< T >::up

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