Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

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 >:

vector

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().

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(), and SctData::Stats< T >::sumSq().

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(), and SctData::TestSummary::NPtGainSummaryWriter::write().

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().

template<class T>
void SctData::Stats< T >::modified   [inline, protected]
 

Definition at line 58 of file Stat.h.

Referenced by SctData::Stats< T >::clear(), SctData::Stats< T >::modifyAt(), and SctData::Stats< T >::resize().

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::TestSummary::SummaryWriter::write(), and SctData::TestSummary::NPtGainSummaryWriter::write().

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(), SctData::Stats< T >::meanSq(), and SctData::TestSummary::SummaryWriter::write().

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().

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(), and SctData::TrimRangeTestResult::ChipTrimData::getSteps().

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().

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().

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.

Referenced by SctData::TestSummary::NPtGainSummaryWriter::write().


Field Documentation

template<class T>
T SctData::Stats< T >::m_mean [mutable, protected]
 

Definition at line 63 of file Stat.h.

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

template<class T>
unsigned SctData::Stats< T >::m_n [mutable, protected]
 

Definition at line 65 of file Stat.h.

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

template<class T>
T SctData::Stats< T >::m_var [mutable, protected]
 

Definition at line 64 of file Stat.h.

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

template<class T>
bool SctData::Stats< T >::mean_calc [mutable, protected]
 

Definition at line 60 of file Stat.h.

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

template<class T>
bool SctData::Stats< T >::n_calc [mutable, protected]
 

Definition at line 62 of file Stat.h.

Referenced by SctData::Stats< TrimData >::modified(), and SctData::Stats< T >::n().

template<class T>
bool SctData::Stats< T >::var_calc [mutable, protected]
 

Definition at line 61 of file Stat.h.

Referenced by SctData::Stats< TrimData >::modified(), and SctData::Stats< T >::var().


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:37:53 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3