emcGainFEM.h

Go to the documentation of this file.
00001 #ifndef __EMCGAINFEM_H__
00002 #define __EMCGAINFEM_H__
00003 
00004 #ifndef __EMCTRACEDFEM_H__
00005 #include "emcTracedFEM.h"
00006 #endif
00007 
00012 class emcGainFEM : public emcTracedFEM
00013 {
00014 
00015 public:
00016   
00018   explicit emcGainFEM(int absPosition);
00019 
00021   emcGainFEM(int absPosition,
00022              const PHTimeStamp& tStart, const PHTimeStamp& tEnd);
00023 
00024   virtual emcGainFEM* clone(void) const 
00025     { return new emcGainFEM(*this); }
00026  
00027   virtual emcGainFEM* create(void) const
00028   { return new emcGainFEM(AbsolutePosition(),
00029                           GetStartValTime(),
00030                           GetEndValTime()); }
00031 
00033   virtual void AddNewItem(int ichannel, emcTracedValue* tv);
00034 
00036   static emcGainFEM* Default(int absPosition, 
00037                              const PHTimeStamp& t1, 
00038                              const PHTimeStamp& t2);
00039 
00042   virtual float Compact(float epsilon);
00043 
00045   virtual const char* GetCategory(void) const { return "Gains"; }
00046 
00047 protected:
00048   bool CompactOneChannelLines(int ichannel, float epsilon);
00049   bool CompactOneChannelConstants(int ichannel, float epsilon);
00050   virtual bool AreDifferent(float v1, float v2, float epsilon) const;
00051 };
00052 
00053 #endif