00001 #ifndef __EMCMIXEDDATAOBJECT_H__
00002 #define __EMCMIXEDDATAOBJECT_H__
00003
00004 #ifndef __EMCDATAOBJECT_H__
00005 #include "emcDataObject.h"
00006 #endif
00007 #include "TString.h"
00008 #include <iosfwd>
00009
00044 class emcMixedDataObject : public emcDataObject
00045 {
00046
00047 public:
00048
00050 emcMixedDataObject();
00051
00053 virtual ~emcMixedDataObject();
00054
00056 void Get(Int_t index, Float_t& adc, Float_t& tdc) const;
00057
00059 void Get(Int_t index, Float_t& adc, Float_t& tdc,
00060 Float_t& hg, Float_t& lg) const;
00061
00063 Float_t GetADC(Int_t index) const;
00064
00066 Float_t GetHG(Int_t index) const;
00067
00069 Float_t GetLG(Int_t index) const;
00070
00071
00078
00079 void GetPointers(float*& ADC, float*& TDC, int*& KEY);
00080
00082 void GetPointers(float*& ADC, float*& TDC,
00083 float*& HG, float*& LG, int*& KEY);
00085
00087 Float_t GetTDC(Int_t index) const;
00088
00090 bool IsPedestalSubtracted(void) const
00091 {
00092 return fPedestal;
00093 }
00094
00096 bool IsUsingHGLG(void) const
00097 {
00098 return fUseHGLG;
00099 }
00101 void SetPedestalFlag(bool value = true)
00102 {
00103 fPedestal = value;
00104 }
00106 bool IsHLRatioReal(void) const
00107 {
00108 return fHLRatio;
00109 }
00111 void Set(int index, float adc, float tdc);
00113 void Set(int index, float adc, float tdc, float hg, float lg);
00115 void SetHLRatioFlag(bool value = true)
00116 {
00117 fHLRatio = value;
00118 }
00120 void SetMaxSize(Int_t thesize);
00122 void SetToZero(int index);
00123
00125 TString Status(void);
00126
00128 void UseHGLG(bool use = false);
00129
00131 bool IsZero(Int_t index) const;
00132
00134 friend std::ostream& operator << (std::ostream&, const emcMixedDataObject&);
00135
00136 private:
00137
00138 emcMixedDataObject(const emcMixedDataObject& obj);
00139 emcMixedDataObject& operator = (const emcMixedDataObject& obj);
00140
00141 protected:
00142
00144 Float_t* fADC;
00146 Float_t* fTDC;
00148 Float_t* fHG;
00150 Float_t* fLG;
00152 bool fPedestal;
00154 bool fHLRatio;
00158 bool fOwnAllocation;
00159
00161 bool fUseHGLG;
00162
00163 public:
00164
00165 ClassDef(emcMixedDataObject, 1)
00166 };
00167
00168 #endif // #ifndef __emcMixedDataObject_h__