00001 // $Id: TGo4FitDataHistogram.h 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4FITDATAHISTOGRAM_H 00015 #define TGO4FITDATAHISTOGRAM_H 00016 00017 #include "TGo4FitData.h" 00018 #include "TGo4FitSlot.h" 00019 00020 class TH1; 00021 00030 class TGo4FitDataHistogram : public TGo4FitData { 00031 public: 00032 00036 TGo4FitDataHistogram(); 00037 00043 TGo4FitDataHistogram(const char* iName, TH1* = 0, Bool_t iHistogramOwned = kFALSE, Bool_t AddAmpl = kFALSE); 00044 00048 virtual ~TGo4FitDataHistogram(); 00049 00053 TH1* GetHistogram() { return (TH1*) fxHistogram.GetObject(); } 00054 00059 void SetHistogram(TH1 *iHistogram, Bool_t iHistogramOwned = kFALSE); 00060 00064 TGo4FitDataIter* MakeIter(); 00065 00069 virtual void FillSlotList(TSeqCollection* list); 00070 00074 virtual void Print(Option_t* option) const; 00075 00076 protected: 00077 00082 TGo4FitSlot fxHistogram; 00083 00084 ClassDef(TGo4FitDataHistogram,1) 00085 }; 00086 00087 // ***************************************************************************** 00088 00089 class TGo4FitDataHistogramIter : public TGo4FitDataIter { 00090 public: 00091 TGo4FitDataHistogramIter(); 00092 TGo4FitDataHistogramIter(TGo4FitDataHistogram* data); 00093 ~TGo4FitDataHistogramIter(); 00094 00095 protected: 00096 virtual TGo4FitData* GetData() const { return fxData; } 00097 virtual Bool_t StartReset(); 00098 virtual Bool_t ReadCurrentPoint(); 00099 virtual Bool_t ShiftToNextPoint(); 00100 00101 private: 00102 TGo4FitDataHistogram* fxData; 00103 TArrayI fxLimits; 00104 TArrayD fxOwnScales; 00105 TArrayD fxOwnWidths; 00106 00107 ClassDef(TGo4FitDataHistogramIter,1) 00108 }; 00109 00110 #endif // TGO4FITDATAHISTOGRAM_H