mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-11 23:20:03 +02:00

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@12 113b152e-814d-439b-b186-022a431db7b5
25 lines
584 B
C++
25 lines
584 B
C++
#ifndef PEDESTALSUBTRACTION_H
|
|
#define PEDESTALSUBTRACTION_H
|
|
|
|
#include "MovingStat.h"
|
|
|
|
class pedestalSubtraction {
|
|
|
|
public:
|
|
pedestalSubtraction (int nn=1000) : stat(nn) {};
|
|
virtual ~pedestalSubtraction() {};
|
|
|
|
virtual void Clear() {stat.Clear();}
|
|
virtual void addToPedestal(double val){ stat.Calc(val);};
|
|
virtual double getPedestal(){return stat.Mean();};
|
|
virtual double getPedestalRMS(){return stat.StandardDeviation();};
|
|
virtual int SetNPedestals(int i=-1) {if (i>0) stat.SetN(i); return stat.GetN();};
|
|
|
|
|
|
|
|
private:
|
|
MovingStat stat;
|
|
|
|
};
|
|
#endif
|