emcWalkTofFEM.h

Go to the documentation of this file.
00001 #ifndef __EMCWALKTOFFEM_H__
00002 #define __EMCWALKTOFFEM_H__
00003 
00004 #ifndef __EMCCALFEM_H__
00005 #include "emcCalFEM.h"
00006 #endif
00007 
00008 #include <vector>
00009 
00014 class emcWalkTofFEM : public emcCalFEM
00015 {
00016 
00017  public:
00018 
00020   explicit emcWalkTofFEM(int absPosition);
00021 
00023   emcWalkTofFEM(int absPosition,  
00024             const PHTimeStamp& t1, const PHTimeStamp& t2);
00025 
00027   emcWalkTofFEM(const emcWalkTofFEM&);
00028 
00030   emcWalkTofFEM& operator=(const emcWalkTofFEM&);
00031 
00033   virtual ~emcWalkTofFEM();
00034 
00035   virtual emcWalkTofFEM* clone(void) const 
00036     { return new emcWalkTofFEM(*this); }
00037 
00038   virtual emcWalkTofFEM* create(void) const 
00039   {
00040     return new emcWalkTofFEM(AbsolutePosition(),
00041                              GetStartValTime(),
00042                              GetEndValTime());
00043   }
00044 
00045 #ifndef __CINT__
00046   typedef std::vector<float> vfloat;
00047   typedef std::vector<vfloat> WalkTof;
00048   typedef std::vector<float>::iterator itvfloat;
00049   typedef std::vector<float>::const_iterator citvfloat;
00050   typedef std::vector<vfloat>::iterator itWalkTof;
00051   typedef std::vector<vfloat>::const_iterator citWalkTof;
00052 #endif
00053 
00055   void AppendOneChannel( const float value1, const float value2);
00056 
00057 
00059   static emcWalkTofFEM* Default(const int& absPosition, 
00060                               const PHTimeStamp& t1, 
00061                               const PHTimeStamp& t2);
00062 
00064   virtual const char* GetCategory(void) const { return "WalkTofs"; }
00065 
00067   virtual size_t GetNumberOfChannels(void) const { return fWalkTof.size(); }
00068 
00069   using emcCalFEM::getValue;
00070   using emcCalFEM::getValueFast;
00071 
00073   virtual float getValue(int ichannel) const {
00074     return getValue(ichannel,0); }
00075 
00077   virtual float getValueFast(int ichannel) const {
00078     return getValueFast(ichannel,0);
00079   }
00080 
00082   virtual float getValue(int ichannel, int what) const;
00083 
00085   virtual void  setValue(int ichannel, int what, float value) ;
00086 
00088   virtual float getValueFast(int ichannel, int what) const;
00089 
00091   virtual bool IsEqual(const emcCalFEM&) const;
00092 
00094   virtual void Reset(void); 
00095 
00097   virtual std::ostream& Print(std::ostream& out = std::cout, int level=0) const;
00098 
00099 private:
00100 
00102   void Copy(emcWalkTofFEM&) const;
00103 
00104 #ifndef __CINT__ 
00105  private:
00106   WalkTof  fWalkTof;
00107 #endif
00108 
00109 };
00110 
00111 #endif