GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4CondArray.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 TGO4CONDARRAY_H
15 #define TGO4CONDARRAY_H
16 
17 #include "TGo4Condition.h"
18 
19 class TObjArray;
20 class TGo4PolyCond;
21 class TGo4WinCond;
22 
23 class TGo4CondArray : public TGo4Condition {
24  public:
25  TGo4CondArray();
26 
28  TGo4CondArray(const char *name, Int_t elements, const char *type);
29 
31  TGo4CondArray(const char *name, Int_t elements, Int_t contype);
32 
33  virtual ~TGo4CondArray();
34 
37 
39  void Draw(Option_t *opt = "") override;
40 
44  void SetPainter(TGo4ConditionPainter *painter) override;
45 
47  const TGo4Condition *GetActiveCondition() const override;
48 
53  TGo4Condition *At(Int_t i) const;
54 
60  TGo4WinCond *Win(Int_t i) const;
61 
66  TGo4PolyCond *Poly(Int_t i) const;
67 
72  TGo4Condition *operator[](Int_t i) const;
73 
74  using TGo4Condition::Test;
80  Bool_t Test(Double_t x, Double_t y) override;
81 
87  Bool_t Test(Double_t x) override;
88 
89  Double_t GetXLow() const override;
90  Double_t GetXUp() const override;
91  Double_t GetYLow() const override;
92  Double_t GetYUp() const override;
93 
95 // virtual void SetValues() {}
96 
98 
100  void SetValues(Double_t low1, Double_t up1) override;
101 
103  void SetValues(Double_t low1, Double_t up1, Double_t low2, Double_t up2) override;
104 
106  void SetValues(TCutG * newcut) override;
107 
109 // virtual void SetValues(Double_t * x, Double_t * y, Int_t len) {}
110 
111 
117  void PrintCondition(Bool_t points) override;
118 
120  void PrintBar() override;
121 
122 
125  Int_t GetNumberOfConditions() const override;
126 
131  Int_t GetNumber() const;
132 
134  const char *GetType() const;
135 
137  void GetType(Int_t &type) const;
138 
140  void Enable() override;
141 
143  void Disable(Bool_t result) override;
144 
146  void Invert(Bool_t on) override;
147 
149  void MarkReset(Bool_t on) override;
150 
152  void ResetCounts() override;
153 
156  Int_t Counts() override;
157 
160  Int_t TrueCounts() override;
161 
163  void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset,
164  Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue) override;
165 
167  void SetVisible(Bool_t on) override;
168 
170  Bool_t IsVisible() const override;
171 
173  void SetChanged(Bool_t on = kTRUE) override;
174 
176  Int_t IsChanged() const override;
177 
178  void SetLabelDraw(Bool_t on) override;
179  Bool_t IsLabelDraw() const override;
180  void SetLimitsDraw(Bool_t on) override;
181  Bool_t IsLimitsDraw() const override;
182  void SetIntDraw(Bool_t on) override;
183  Bool_t IsIntDraw() const override;
184  void SetXMeanDraw(Bool_t on) override;
185  Bool_t IsXMeanDraw() const override;
186  void SetXRMSDraw(Bool_t on) override;
187  Bool_t IsXRMSDraw() const override;
188  void SetYMeanDraw(Bool_t on) override;
189  Bool_t IsYMeanDraw() const override;
190  void SetYRMSDraw(Bool_t on) override;
191  Bool_t IsYRMSDraw() const override;
192  void SetXMaxDraw(Bool_t on) override;
193  Bool_t IsXMaxDraw() const override;
194  void SetYMaxDraw(Bool_t on) override;
195  Bool_t IsYMaxDraw() const override;
196  void SetCMaxDraw(Bool_t on) override;
197  Bool_t IsCMaxDraw() const override;
198 
201  Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
202 
204  Double_t GetMean(TH1 *histo, Int_t axis = 1) override;
205 
207  Double_t GetRMS(TH1 *histo, Int_t axis = 1) override;
208 
210  Double_t GetSkewness(TH1 *histo, Int_t axis = 1) override;
211 
213  Double_t GetCurtosis(TH1 *histo, Int_t axis = 1) override;
214 
216  Double_t GetXMax(TH1 *histo) override;
217 
219  Double_t GetYMax(TH1 *histo) override;
220 
222  Double_t GetCMax(TH1 *histo) override;
223 
224  Bool_t IsPolygonType() const override;
225  Bool_t IsArrayType() const override { return kTRUE; }
226 
227  void SetCurrentIndex(Int_t ix) override;
228  Int_t GetCurrentIndex() const override;
229 
230  Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
231 
232  Int_t GetMemorySize() const override;
233 
235  void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
236 
237  private:
239  TObjArray *condarr{nullptr};
240 
242  Int_t fiNumCond{0};
243 
245  Int_t fiType{0};
246 
248  Int_t fiSelectedCond{0};
249 
250  ClassDefOverride(TGo4CondArray,6)
251 };
252 
253 #endif //TGO4CONDARRAY_H
TGo4ConditionPainter * CreatePainter() override
Int_t GetNumberOfConditions() const override
void SetYMaxDraw(Bool_t on) override
Bool_t IsCMaxDraw() const override
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Bool_t IsXMaxDraw() const override
void ResetCounts() override
void Disable(Bool_t result) override
TGo4WinCond * Win(Int_t i) const
Bool_t IsXMeanDraw() const override
void SetLabelDraw(Bool_t on) override
Bool_t IsPolygonType() const override
Bool_t IsXRMSDraw() const override
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
virtual ~TGo4CondArray()
void MarkReset(Bool_t on) override
void SetXMeanDraw(Bool_t on) override
Double_t GetXMax(TH1 *histo) override
Bool_t IsIntDraw() const override
Double_t GetCMax(TH1 *histo) override
const char * GetType() const
Double_t GetYUp() const override
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
virtual void SetValues()
Definition: TGo4Condition.h:93
Int_t IsChanged() const override
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
void SetCMaxDraw(Bool_t on) override
const TGo4Condition * GetActiveCondition() const override
Int_t GetCurrentIndex() const override
void Invert(Bool_t on) override
Bool_t IsYRMSDraw() const override
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
void SetCurrentIndex(Int_t ix) override
Int_t TrueCounts() override
TObjArray * condarr
void SetPainter(TGo4ConditionPainter *painter) override
TGo4Condition * operator[](Int_t i) const
Double_t GetXLow() const override
Bool_t IsArrayType() const override
Bool_t IsYMeanDraw() const override
void SetChanged(Bool_t on=kTRUE) override
Bool_t IsVisible() const override
Int_t GetNumber() const
void SetXMaxDraw(Bool_t on) override
Bool_t IsLimitsDraw() const override
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
void SetYMeanDraw(Bool_t on) override
Double_t GetXUp() const override
void SetLimitsDraw(Bool_t on) override
void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue) override
virtual Bool_t Test()
TGo4PolyCond * Poly(Int_t i) const
Double_t GetYLow() const override
void SetIntDraw(Bool_t on) override
Int_t Counts() override
void SetXRMSDraw(Bool_t on) override
void SetVisible(Bool_t on) override
void Enable() override
void Draw(Option_t *opt="") override
void PrintBar() override
void SetYRMSDraw(Bool_t on) override
Bool_t IsLabelDraw() const override
Int_t fiSelectedCond
Double_t GetYMax(TH1 *histo) override
TGo4Condition * At(Int_t i) const
Double_t GetMean(TH1 *histo, Int_t axis=1) override
Bool_t IsYMaxDraw() const override
Int_t GetMemorySize() const override
void PrintCondition(Bool_t points) override