Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
runningMean Class Referenceabstract

#include <OnlMon/blob/main/onlmonutils/runningMean.h>

+ Inheritance diagram for runningMean:

Public Member Functions

 runningMean ()
 
virtual ~runningMean ()
 
virtual double getMean (const int) const =0
 the getMean(i) funtion returns the current mean value of channel i
 
virtual double getReference (const int) const
 
virtual int getNumberofChannels () const
 
virtual int Reset ()=0
 Reset will reset the mean values (not the references)
 
virtual int Add (const int[])=0
 
virtual int Add (const float[])=0
 
virtual int Add (const double[])=0
 
int setRefArray (const double[])
 
int setRefChannel (const int, const double)
 
int setAsReference ()
 
double getPercentDeviation (const int) const
 

Protected Attributes

int NumberofChannels = 0
 
doublerefArray
 

Detailed Description

This is the abstract running mean parent class.

We have two different running mean classes derive from it, a "real" (mathematically correct) running mean value, and a "pseudo" value of the running mean, which is a lot more efficient and fully adequate for most monitoring purposes.

These classes are meant to monitor lots of values (such as all channels of a given detector) simultaneously; In the constructor you specify the "width" (how many channels) and the depth of the running mean.

This class is meant to be lightweight, so there is not much in the way of bounds checking of the input data going on.

Definition at line 25 of file runningMean.h.

View newest version in sPHENIX GitHub at line 25 of file runningMean.h

Constructor & Destructor Documentation

runningMean::runningMean ( )

Definition at line 3 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 3 of file runningMean.cc

References refArray.

runningMean::~runningMean ( )
virtual

Definition at line 8 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 8 of file runningMean.cc

References refArray.

Member Function Documentation

virtual int runningMean::Add ( const int  [])
pure virtual

Add will add a new list of readings. It is your responsibility to provide an approriate array of readings. (Typically you can get the array of int's from the Packet object's fillIntArray function).

Implemented in pseudoRunningMean, and fullRunningMean.

virtual int runningMean::Add ( const float  [])
pure virtual

Implemented in pseudoRunningMean, and fullRunningMean.

virtual int runningMean::Add ( const double  [])
pure virtual

Implemented in pseudoRunningMean, and fullRunningMean.

virtual double runningMean::getMean ( const int  ) const
pure virtual

the getMean(i) funtion returns the current mean value of channel i

Implemented in pseudoRunningMean, and fullRunningMean.

Referenced by getPercentDeviation(), and setAsReference().

+ Here is the caller graph for this function:

virtual int runningMean::getNumberofChannels ( ) const
inlinevirtual

Definition at line 35 of file runningMean.h.

View newest version in sPHENIX GitHub at line 35 of file runningMean.h

References NumberofChannels.

Referenced by getPercentDeviation(), getReference(), setAsReference(), setRefArray(), and setRefChannel().

+ Here is the caller graph for this function:

double runningMean::getPercentDeviation ( const int  channel) const

Definition at line 60 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 60 of file runningMean.cc

References getMean(), getNumberofChannels(), getReference(), and refArray.

+ Here is the call graph for this function:

double runningMean::getReference ( const int  channel) const
virtual

Definition at line 52 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 52 of file runningMean.cc

References channel(), getNumberofChannels(), and refArray.

Referenced by getPercentDeviation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual int runningMean::Reset ( )
pure virtual

Reset will reset the mean values (not the references)

Implemented in pseudoRunningMean, and fullRunningMean.

int runningMean::setAsReference ( )

Definition at line 41 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 41 of file runningMean.cc

References getMean(), getNumberofChannels(), i, and refArray.

+ Here is the call graph for this function:

int runningMean::setRefArray ( const double  darr[])

Definition at line 13 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 13 of file runningMean.cc

References getNumberofChannels(), i, and refArray.

+ Here is the call graph for this function:

int runningMean::setRefChannel ( const int  channel,
const double  refvalue 
)

Definition at line 26 of file runningMean.cc.

View newest version in sPHENIX GitHub at line 26 of file runningMean.cc

References channel(), getNumberofChannels(), i, and refArray.

+ Here is the call graph for this function:

Member Data Documentation

double* runningMean::refArray
protected

Definition at line 63 of file runningMean.h.

View newest version in sPHENIX GitHub at line 63 of file runningMean.h

Referenced by getPercentDeviation(), getReference(), runningMean(), setAsReference(), setRefArray(), setRefChannel(), and ~runningMean().


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