GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
19class TObjArray;
20class TGo4PolyCond;
21class TGo4WinCond;
22
26
28 public:
30
32 TGo4CondArray(const char *name, Int_t elements, const char *type);
33
35 TGo4CondArray(const char *name, Int_t elements, Int_t contype);
36
37 virtual ~TGo4CondArray();
38
41
43 void Draw(Option_t *opt = "") override;
44
48 void SetPainter(TGo4ConditionPainter *painter) override;
49
51 const TGo4Condition *GetActiveCondition() const override;
52
57 TGo4Condition *At(Int_t i) const;
58
64 TGo4WinCond *Win(Int_t i) const;
65
70 TGo4PolyCond *Poly(Int_t i) const;
71
76 TGo4Condition *operator[](Int_t i) const;
77
84 Bool_t Test(Double_t x, Double_t y) override;
85
91 Bool_t Test(Double_t x) override;
92
93 Double_t GetXLow() const override;
94 Double_t GetXUp() const override;
95 Double_t GetYLow() const override;
96 Double_t GetYUp() const override;
97
99// virtual void SetValues() {}
100
102
104 void SetValues(Double_t low1, Double_t up1) override;
105
107 void SetValues(Double_t low1, Double_t up1, Double_t low2, Double_t up2) override;
108
110 void SetValues(TCutG * newcut) override;
111
113// virtual void SetValues(Double_t * x, Double_t * y, Int_t len) {}
114
115
121 void PrintCondition(Bool_t points) override;
122
124 void PrintBar() override;
125
126
129 Int_t GetNumberOfConditions() const override;
130
135 Int_t GetNumber() const;
136
138 const char *GetType() const;
139
141 void GetType(Int_t &type) const;
142
144 void Enable() override;
145
147 void Disable(Bool_t result) override;
148
150 void Invert(Bool_t on) override;
151
153 void MarkReset(Bool_t on) override;
154
156 void ResetCounts() override;
157
160 Int_t Counts() override;
161
164 Int_t TrueCounts() override;
165
167 void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset,
168 Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue) override;
169
171 void SetVisible(Bool_t on) override;
172
174 Bool_t IsVisible() const override;
175
177 void SetChanged(Bool_t on = kTRUE) override;
178
180 Int_t IsChanged() const override;
181
182 void SetLabelDraw(Bool_t on) override;
183 Bool_t IsLabelDraw() const override;
184 void SetLimitsDraw(Bool_t on) override;
185 Bool_t IsLimitsDraw() const override;
186 void SetIntDraw(Bool_t on) override;
187 Bool_t IsIntDraw() const override;
188 void SetXMeanDraw(Bool_t on) override;
189 Bool_t IsXMeanDraw() const override;
190 void SetXRMSDraw(Bool_t on) override;
191 Bool_t IsXRMSDraw() const override;
192 void SetYMeanDraw(Bool_t on) override;
193 Bool_t IsYMeanDraw() const override;
194 void SetYRMSDraw(Bool_t on) override;
195 Bool_t IsYRMSDraw() const override;
196 void SetXMaxDraw(Bool_t on) override;
197 Bool_t IsXMaxDraw() const override;
198 void SetYMaxDraw(Bool_t on) override;
199 Bool_t IsYMaxDraw() const override;
200 void SetCMaxDraw(Bool_t on) override;
201 Bool_t IsCMaxDraw() const override;
202
205 Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
206
208 Double_t GetMean(TH1 *histo, Int_t axis = 1) override;
209
211 Double_t GetRMS(TH1 *histo, Int_t axis = 1) override;
212
214 Double_t GetSkewness(TH1 *histo, Int_t axis = 1) override;
215
217 Double_t GetCurtosis(TH1 *histo, Int_t axis = 1) override;
218
220 Double_t GetXMax(TH1 *histo) override;
221
223 Double_t GetYMax(TH1 *histo) override;
224
226 Double_t GetCMax(TH1 *histo) override;
227
228 Bool_t IsPolygonType() const override;
229 Bool_t IsArrayType() const override { return kTRUE; }
230
231 void SetCurrentIndex(Int_t ix) override;
232 Int_t GetCurrentIndex() const override;
233
234 Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
235
236 Int_t GetMemorySize() const override;
237
239 void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
240
241 private:
243 TObjArray *condarr{nullptr};
244
246 Int_t fiNumCond{0};
247
249 Int_t fiType{0};
250
253
254 ClassDefOverride(TGo4CondArray,6)
255};
256
257#endif //TGO4CONDARRAY_H
Array of conditions.
Bool_t IsXMaxDraw() const override
Int_t GetNumberOfConditions() const override
for condition aggregates: return total number of conditions, i.e.size of condition array
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
Calculate value for histogram inside condition limits.
Bool_t IsYRMSDraw() const override
Double_t GetYLow() const override
Double_t GetMean(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
TGo4ConditionPainter * CreatePainter() override
Factory method to generate the subclass implementation for painter.
Int_t GetNumber() const
Returns number of conditions in array.
void SetXMaxDraw(Bool_t on) override
Int_t GetMemorySize() const override
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Standard way to store parameter in form of macro.
void SetXMeanDraw(Bool_t on) override
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
void SetYMeanDraw(Bool_t on) override
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue) override
Sets values of internal boolean flags to external variables.
Double_t GetYUp() const override
Int_t fiNumCond
Number of conditions in array.
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Copy values from cond to this.
void Enable() override
Calls Enable for all conditions (multi edit mode) or for currently selected (single edit mode)
Bool_t IsYMeanDraw() const override
TGo4WinCond * Win(Int_t i) const
Returns window condition object i from object array.
void PrintCondition(Bool_t points) override
Noop.
Bool_t IsIntDraw() const override
void Invert(Bool_t on) override
Calls Invert for all conditions (multi edit mode) or for currently selected (single edit mode)
Bool_t IsXRMSDraw() const override
void SetPainter(TGo4ConditionPainter *painter) override
Replace default painter of this condition by external one.
virtual void SetValues()
Noop.
Bool_t IsPolygonType() const override
Double_t GetXMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
TObjArray * condarr
The object array of conditions.
const TGo4Condition * GetActiveCondition() const override
Access to the currently selected condition.
Bool_t IsXMeanDraw() const override
void SetLabelDraw(Bool_t on) override
TGo4Condition * operator[](Int_t i) const
Returns condition object i from object array.
void SetVisible(Bool_t on) override
we overwrite single condition visibility setter
TGo4PolyCond * Poly(Int_t i) const
Returns polygon condition object i from object array.
Int_t fiType
Condition type ID (kGO4CONDWINDOW or kGO4CONDPOLYGON)
Double_t GetYMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
void SetCMaxDraw(Bool_t on) override
Int_t GetCurrentIndex() const override
get index for array type subclasses
Bool_t IsVisible() const override
we overwrite single condition visibility getter
Int_t TrueCounts() override
Return number of true results of the Test method call.
virtual Bool_t Test()
Test if condition is true.
Bool_t IsArrayType() const override
Double_t GetXUp() const override
void MarkReset(Bool_t on) override
defines if condition counters shall be reset in UpdateFrom method
void Draw(Option_t *opt="") override
Reimplement Draw to set painted flag for all array conditions.
Bool_t IsCMaxDraw() const override
Int_t IsChanged() const override
we overwrite single condition changed property
Int_t Counts() override
Return number of calls of the Test method.
void SetChanged(Bool_t on=kTRUE) override
we overwrite single condition changed property
Bool_t IsLabelDraw() const override
void PrintBar() override
Prints counters and bar.
void SetYMaxDraw(Bool_t on) override
Bool_t IsYMaxDraw() const override
Bool_t IsLimitsDraw() const override
Double_t GetXLow() const override
TGo4Condition * At(Int_t i) const
Returns condition object i from object array.
void Disable(Bool_t result) override
Calls Disable for all conditions (multi edit mode) or for currently selected (single edit mode)
void SetXRMSDraw(Bool_t on) override
Double_t GetCMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
Int_t fiSelectedCond
Index of selected condition.
void SetYRMSDraw(Bool_t on) override
void SetCurrentIndex(Int_t ix) override
set index for array type subclasses
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
virtual ~TGo4CondArray()
void ResetCounts() override
Calls ResetCounts for all conditions (multi edit mode) or for currently selected (single edit mode)
const char * GetType() const
Returns class name of conditions.
void SetIntDraw(Bool_t on) override
void SetLimitsDraw(Bool_t on) override
Go4 condition class.
virtual void SetValues()
Set values needed, i.e.
virtual Bool_t Test()
Test if condition is true.
Polygon condition.
Window condition.
Definition TGo4WinCond.h:26