00001 #ifndef __EMCHLRATIOFEM_H__
00002 #define __EMCHLRATIOFEM_H__
00003
00004 #ifndef __EMCCALFEM_H__
00005 #include "emcCalFEM.h"
00006 #endif
00007 #include <vector>
00008
00020 class emcHLRatioFEM : public emcCalFEM
00021 {
00022
00023 public:
00024
00026 explicit emcHLRatioFEM(int absPosition);
00027
00029 emcHLRatioFEM(int absPosition,const PHTimeStamp& t1,const PHTimeStamp& t2);
00030
00032 emcHLRatioFEM(const emcHLRatioFEM&);
00033
00035 emcHLRatioFEM& operator=(const emcHLRatioFEM&);
00036
00038 virtual ~emcHLRatioFEM();
00039
00040 virtual emcHLRatioFEM* clone(void) const
00041 { return new emcHLRatioFEM(*this); }
00042
00043 virtual emcHLRatioFEM* create(void) const
00044 {
00045 return new emcHLRatioFEM(AbsolutePosition(),
00046 GetStartValTime(),
00047 GetEndValTime());
00048 }
00049
00050 #ifndef __CINT__
00051 typedef std::vector<float> Ratio;
00052 typedef std::vector<Ratio> RatioVector;
00053 typedef std::vector<float>::iterator itRatio;
00054 typedef std::vector<float>::const_iterator citRatio;
00055 typedef std::vector<Ratio>::iterator itRatioVector;
00056 typedef std::vector<Ratio>::const_iterator citRatioVector;
00057 #endif
00058
00060 void AppendOneChannel(float average, float rms,
00061 float intercept, float slope);
00062
00063
00066 static emcHLRatioFEM* Default(const int& absPosition,
00067 const PHTimeStamp& t1,
00068 const PHTimeStamp& t2);
00069
00071 virtual const char* GetCategory(void) const { return "HLRatios"; }
00072
00073 using emcCalFEM::getValue;
00074 using emcCalFEM::getValueFast;
00075
00077 virtual float getValue(int ichannel) const {
00078 return getValue(ichannel,0); }
00079
00081 virtual float getValueFast(int ichannel) const {
00082 return getValueFast(ichannel,0);
00083 }
00084
00091 virtual float getValue(int ichannel, int what) const;
00092
00094 virtual float getValueFast(int ichannel, int what) const;
00095
00097 static float GetGlobalAverage(void) { return fGlobalAverage; }
00098
00100 static float GetGlobalRMS(void) { return fGlobalRMS; }
00101
00103 virtual size_t GetNumberOfChannels(void) const {
00104 return fHLRatioVector.size();}
00105
00107 virtual bool IsEqual(const emcCalFEM& obj) const;
00108
00110 virtual void Reset(void);
00111
00113 virtual std::ostream& Print(std::ostream& out = std::cout, int level=0) const;
00114
00115 #ifndef __CINT__
00116
00117 private:
00118
00120 void Copy(emcHLRatioFEM& o) const;
00121
00122 private:
00123
00124 RatioVector fHLRatioVector;
00125
00126 static float fGlobalAverage;
00127 static float fGlobalRMS;
00128
00129 #endif
00130
00131 };
00132
00133 #endif