diff --git a/slsDetectorSoftware/slsDetectorAnalysis/movingStat.h b/slsDetectorSoftware/slsDetectorAnalysis/movingStat.h index 45b7a4058..c8daf505c 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/movingStat.h +++ b/slsDetectorSoftware/slsDetectorAnalysis/movingStat.h @@ -5,7 +5,7 @@ #ifndef MOVINGSTAT_H #define MOVINGSTAT_H -#include "sls_detector_defs.h" +//#include "sls_detector_defs.h" #include #include @@ -17,6 +17,13 @@ #include using namespace std; + + +typedef double double32_t; +typedef float float32_t; +typedef int int32_t; + + /** @short class handling pedestal data and moves according to data */ @@ -32,24 +39,24 @@ public: /** * Clear number of data values */ - void Clear(){ + inline void Clear(){ m_n = 0; } /** * Set Pedestal */ - void SetN(int i) {n=i;}; + inline void SetN(int i) {n=i;}; /** * Get Pedestal */ - int GetN() {return n;}; + inline int GetN() {return n;}; /** * Calculate Pedestal */ - void Calc(double x) { + inline void Calc(double x) { if (m_n 0) ? m_newM/m_n : 0.0; } /** * Get mean 2 */ - double M2() const{ + inline double M2() const{ return ( (m_n > 1) ? m_newM2/m_n : 0.0 ); } /** * Get variance */ - double Variance() const{ + inline double Variance() const{ return ( (m_n > 1) ? (M2()-Mean()*Mean()) : 0.0 ); } /** * Get standard deviation */ - double StandardDeviation() const{ + inline double StandardDeviation() const{ return ( (Variance() > 0) ? sqrt( Variance() ) : -1 ); }