00001 #ifndef __EMCQAFEM_H__ 00002 #define __EMCQAFEM_H__ 00003 00004 #ifndef __EMCCALFEM_H__ 00005 #include "emcCalFEM.h" 00006 #endif 00007 00008 #include <vector> 00009 #include <map> 00010 #include <iostream> 00011 #include "Rtypes.h" 00012 00013 00014 typedef UInt_t INT32; 00015 00021 class emcQAFEM : public emcCalFEM 00022 { 00023 00024 public: 00025 00027 explicit emcQAFEM(int absPosition); 00028 00030 emcQAFEM(int absPosition, 00031 const PHTimeStamp& t1, const PHTimeStamp& t2); 00032 00034 emcQAFEM(const emcQAFEM&); 00035 00037 emcQAFEM& operator=(const emcQAFEM&); 00038 00040 virtual ~emcQAFEM(); 00041 00042 virtual emcQAFEM* clone(void) const 00043 { return new emcQAFEM(*this); } 00044 00045 virtual emcQAFEM* create(void) const 00046 { 00047 return new emcQAFEM(AbsolutePosition(), 00048 GetStartValTime(), 00049 GetEndValTime()); 00050 } 00051 00052 00054 void AppendOneChannel(int channel, INT32 error, INT32 warning); 00055 00059 static emcQAFEM* Default(int absPosition, 00060 const PHTimeStamp& tStart = PHTimeStamp(0), 00061 const PHTimeStamp& tEnd = 00062 PHTimeStamp(PHTimeStamp::PHFarFuture)); 00063 00065 void First(void); 00066 00068 virtual const char* GetCategory(void) const { return "QAs"; } 00069 00071 virtual size_t GetNumberOfChannels(void) const { return fQA.size(); } 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 00085 virtual float getValue(int ichannel, int what) const; 00086 00088 virtual float getValueFast(int ichannel, int what) const; 00089 00091 virtual bool IsEqual(const emcCalFEM&) const; 00092 00094 bool Next(int& channel, INT32& error, INT32& warning); 00095 00097 virtual std::ostream& Print(std::ostream& out = std::cout, int level=0) const; 00098 00100 virtual void Reset(void); 00101 00102 private: 00103 00105 void Copy(emcQAFEM&) const; 00106 00108 INT32 GetError(int channel) const; 00109 00111 INT32 GetWarning(int channel) const; 00112 00113 00114 private: 00115 00116 #ifndef __CINT__ 00117 std::map<int,std::vector<INT32> > fQA; 00118 std::map<int,std::vector<INT32> >::const_iterator fIterator; 00119 #endif 00120 00121 }; 00122 00123 #endif