GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitDataHistogram.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4FITDATAHISTOGRAM_H
15 #define TGO4FITDATAHISTOGRAM_H
16 
17 #include "TGo4FitData.h"
18 #include "TGo4FitSlot.h"
19 
20 class TH1;
21 
31  public:
32 
37 
43  TGo4FitDataHistogram(const char *iName, TH1 *iHistogram = nullptr, Bool_t iHistogramOwned = kFALSE, Bool_t AddAmpl = kFALSE);
44 
48  virtual ~TGo4FitDataHistogram();
49 
53  TH1 *GetHistogram() { return (TH1 *) fxHistogram.GetObject(); }
54 
59  void SetHistogram(TH1 *iHistogram, Bool_t iHistogramOwned = kFALSE);
60 
64  std::unique_ptr<TGo4FitDataIter> MakeIter() override;
65 
69  void FillSlotList(TSeqCollection *list) override;
70 
74  void Print(Option_t *option = "") const override;
75 
76  protected:
77 
83 
84  ClassDefOverride(TGo4FitDataHistogram,1)
85 };
86 
87 // *****************************************************************************
88 
90  public:
94 
95  protected:
96  TGo4FitData *GetData() const override { return fxData; }
97  Bool_t StartReset() override;
98  Bool_t ReadCurrentPoint() override;
99  Bool_t ShiftToNextPoint() override;
100 
101  private:
102  TGo4FitDataHistogram *fxData{nullptr};
103  TArrayI fxLimits;
104  TArrayD fxOwnScales;
105  TArrayD fxOwnWidths;
106 
107  ClassDefOverride(TGo4FitDataHistogramIter,1)
108 };
109 
110 #endif // TGO4FITDATAHISTOGRAM_H
void SetHistogram(TH1 *iHistogram, Bool_t iHistogramOwned=kFALSE)
void Print(Option_t *option="") const override
std::unique_ptr< TGo4FitDataIter > MakeIter() override
void FillSlotList(TSeqCollection *list) override
TObject * GetObject() const
TGo4FitData * GetData() const override