Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BDScalar.h

Go to the documentation of this file.
00001 
00030 #ifndef BDSCALAR_H
00031 #define BDSCALAR_H
00032 
00033 #include <BeamDataUtil/BDProcessor.h>
00034 
00035 #include <Util/UtilRunningAverage.h>
00036 
00037 class BDScalar : public BDProcessor {
00038 public:
00049     BDScalar(float max_dev = 5.0, int nspills=10, const char* device_name=0);
00050     ~BDScalar();
00051 
00057     void SetDevice(const char* device_name);
00058 
00059     // BDProcessor API
00060 
00062     void SetSpill(const RawBeamMonHeaderBlock& rbmhb,
00063                   const RawBeamMonBlock& rbmb);
00064 
00067     bool BeamChanged();
00068 
00069     // Configure:
00070 
00073     void SetSpillQueueSize(int nspills);
00074 
00079     void SetAllowedSpillDeviation(float sigmas);
00080 
00082     double GetValue() const;
00083 
00084 protected:
00085 
00086     // Subclass can implement this
00087     virtual double GetScalar(const RawBeamMonHeaderBlock& rbmhb,
00088                              const RawBeamMonBlock& rbmb);
00089 
00090 
00091 private:
00092 
00093     UtilRunningAverage fPastSpills;
00094     float fMaxDev;
00095     bool fBeamChanged;
00096     const char* fDeviceName;
00097 };
00098 
00099 
00100 #endif  // BDSCALAR_H

Generated on Mon Feb 15 11:06:24 2010 for loon by  doxygen 1.3.9.1