SctData::Stats< T > Class Template Reference

holds lots of Stat<T> objects, and has useful functions More...

#include <Stat.h>

Inheritance diagram for SctData::Stats< T >:

Inheritance graph
[legend]
Collaboration diagram for SctData::Stats< T >:

Collaboration graph
[legend]

Public Member Functions

 Stats ()
 default constructor
 Stats (const unsigned n)
 default fill constructor
 Stats (const unsigned n, const T t)
 fill constructor
 Stats (const unsigned n, const Stat< T > s)
 fill constructor
void resize (const unsigned n)
 default resize
void resize (const unsigned n, const T t)
 default resize
void clear ()
 clear
mean () const
 The mean value of the valid Stat s -- E(t).
var () const
 The variance value of the valid Stat s E(t**2) - E(t)**2.
unsigned n () const
 The number of valid Stat s.
sum () const
 The sum of the valid Stat s.
sumSq () const
 The sum of the squares of valid Stat s.
meanSq () const
 The meam of the squares of valid Stat s.
const Stat< T > & getAt (const unsigned i) const
 const index operator
Stat< T > & modifyAt (const unsigned i)
 non-const index operator

Protected Member Functions

void modified ()

Protected Attributes

bool mean_calc
bool var_calc
bool n_calc
m_mean
m_var
unsigned m_n

Private Member Functions

const Stat< T > operator[] (const unsigned i) const
 use getAt instead
Stat< T > & operator[] (const unsigned i)
 use modifyAt() instead

Detailed Description

template<class T>
class SctData::Stats< T >

holds lots of Stat<T> objects, and has useful functions

Definition at line 24 of file Stat.h.


Constructor & Destructor Documentation

template<class T>
SctData::Stats< T >::Stats< T >  )  [inline]
 

default constructor

template<class T>
SctData::Stats< T >::Stats< T > const unsigned  n  )  [inline]
 

default fill constructor

template<class T>
SctData::Stats< T >::Stats< T > const unsigned  n,
const T  t
[inline]
 

fill constructor

template<class T>
SctData::Stats< T >::Stats< T > const unsigned  n,
const Stat< T >  s
[inline]
 

fill constructor


Member Function Documentation

template<class T>
void SctData::Stats< T >::clear  )  [inline]
 

clear

Definition at line 95 of file Stat.h.

References SctData::Stats< T >::modified().

Here is the call graph for this function:

template<class T>
const Stat< T > & SctData::Stats< T >::getAt const unsigned  i  )  const
 

const index operator

Definition at line 178 of file Stat.h.

Referenced by SctData::TrimRangeTestResult::ChipTrimData::getOffsets(), SctData::TrimRangeTestResult::ChipTrimData::getSteps(), SctData::Stats< T >::n(), SctData::Stats< T >::sum(), SctData::Stats< T >::sumSq(), and SctData::IO::TrimRangeTestResult_ChipTrimDataStreamer_v1::write().

template<class T>
T SctData::Stats< T >::mean  )  const [inline]
 

The mean value of the valid Stat s -- E(t).

Definition at line 117 of file Stat.h.

References SctData::Stats< T >::m_mean, SctData::Stats< T >::mean_calc, SctData::Stats< T >::n(), and SctData::Stats< T >::sum().

Referenced by SctData::Stats< T >::var().

Here is the call graph for this function:

template<class T>
T SctData::Stats< T >::meanSq  )  const [inline]
 

The meam of the squares of valid Stat s.

Definition at line 160 of file Stat.h.

References SctData::Stats< T >::n(), and SctData::Stats< T >::sumSq().

Referenced by SctData::Stats< T >::var().

Here is the call graph for this function:

template<class T>
Stat< T > & SctData::Stats< T >::modifyAt const unsigned  i  ) 
 

non-const index operator

Definition at line 183 of file Stat.h.

References SctData::Stats< T >::modified().

Referenced by SctData::TrimRangeTestResult::ChipTrimData::getOffsets(), SctData::TrimRangeTestResult::ChipTrimData::getSteps(), SctData::IO::TrimRangeTestResult_ChipTrimStreamer_v1::read(), and SctData::IO::TrimRangeTestResult_ChipTrimDataStreamer_v1::read().

Here is the call graph for this function:

template<class T>
unsigned SctData::Stats< T >::n  )  const [inline]
 

The number of valid Stat s.

Definition at line 127 of file Stat.h.

References SctData::Stats< T >::getAt(), SctData::Stats< T >::m_n, and SctData::Stats< T >::n_calc.

Referenced by SctData::Stats< T >::mean(), and SctData::Stats< T >::meanSq().

Here is the call graph for this function:

template<class T>
Stat<T>& SctData::Stats< T >::operator[] const unsigned  i  )  [private]
 

use modifyAt() instead

template<class T>
const Stat<T> SctData::Stats< T >::operator[] const unsigned  i  )  const [private]
 

use getAt instead

template<class T>
void SctData::Stats< T >::resize const unsigned  n,
const T  t
[inline]
 

default resize

Definition at line 109 of file Stat.h.

References SctData::Stats< T >::modified(), and SctData::Stats< T >::resize().

Here is the call graph for this function:

template<class T>
void SctData::Stats< T >::resize const unsigned  n  )  [inline]
 

default resize

Definition at line 101 of file Stat.h.

References SctData::Stats< T >::modified().

Referenced by SctData::TrimRangeTestResult::ChipTrimData::getOffsets(), SctData::TrimRangeTestResult::ChipTrimData::getSteps(), SctData::IO::TrimRangeTestResult_ChipTrimStreamer_v1::read(), SctData::IO::TrimRangeTestResult_ChipTrimDataStreamer_v1::read(), and SctData::Stats< T >::resize().

Here is the call graph for this function:

template<class T>
T SctData::Stats< T >::sum  )  const [inline]
 

The sum of the valid Stat s.

Definition at line 139 of file Stat.h.

References SctData::Stats< T >::getAt().

Referenced by SctData::Stats< T >::mean().

Here is the call graph for this function:

template<class T>
T SctData::Stats< T >::sumSq  )  const [inline]
 

The sum of the squares of valid Stat s.

Definition at line 148 of file Stat.h.

References SctData::Stats< T >::getAt().

Referenced by SctData::Stats< T >::meanSq().

Here is the call graph for this function:

template<class T>
T SctData::Stats< T >::var  )  const
 

The variance value of the valid Stat s E(t**2) - E(t)**2.

Definition at line 168 of file Stat.h.

References SctData::Stats< T >::m_mean, SctData::Stats< T >::m_var, SctData::Stats< T >::mean(), SctData::Stats< T >::meanSq(), and SctData::Stats< T >::var_calc.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Mon Feb 6 14:07:54 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6