Analysis Software
Documentation for sPHENIX simulation software
|
#include <OnlMon/blob/main/onlmonutils/runningMean.h>
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 |
double * | refArray |
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
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.
|
virtual |
Definition at line 8 of file runningMean.cc.
View newest version in sPHENIX GitHub at line 8 of file runningMean.cc
References refArray.
|
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.
|
pure virtual |
Implemented in pseudoRunningMean, and fullRunningMean.
|
pure virtual |
Implemented in pseudoRunningMean, and fullRunningMean.
|
pure virtual |
the getMean(i) funtion returns the current mean value of channel i
Implemented in pseudoRunningMean, and fullRunningMean.
Referenced by getPercentDeviation(), and setAsReference().
|
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().
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.
|
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().
|
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.
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.
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.
|
protected |
Definition at line 62 of file runningMean.h.
View newest version in sPHENIX GitHub at line 62 of file runningMean.h
Referenced by fullRunningMean::Add(), pseudoRunningMean::Add(), fullRunningMean::fullRunningMean(), getNumberofChannels(), pseudoRunningMean::pseudoRunningMean(), fullRunningMean::Reset(), pseudoRunningMean::Reset(), and fullRunningMean::~fullRunningMean().
|
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().