GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4WinCond.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 TGO4WINCOND_H
15#define TGO4WINCOND_H
16
17#include "TGo4Condition.h"
18
19class TH1;
20
25
26class TGo4WinCond : public TGo4Condition {
27 public:
29
30 TGo4WinCond(const char *name, const char *title = "Go4 window condition");
31
32 virtual ~TGo4WinCond();
33
36
40 void SetPainter(TGo4ConditionPainter *painter) override;
41
43
45 void SetValues(Double_t low1, Double_t up1) override;
46
48 void SetValues(Double_t low1, Double_t up1, Double_t low2, Double_t up2) override;
49
51
53 Bool_t Test(Double_t v1) override;
54
57 Bool_t Test(Double_t v1, Double_t v2) override;
58
60 void GetValues(Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override;
61
62 Double_t GetXLow() const override { return fLow1; }
63 Double_t GetXUp() const override { return fUp1; }
64 Double_t GetYLow() const override { return fLow2; }
65 Double_t GetYUp() const override { return fUp2; }
66
67 void SetXLow(Double_t v) { fLow1 = v; }
68 void SetXUp(Double_t v) { fUp1 = v; }
69 void SetYLow(Double_t v) { fLow2 = v; }
70 void SetYUp(Double_t v) { fUp2 = v; }
71
73 void PrintCondition(Bool_t full = kTRUE) override;
74
76 Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
77
79 Bool_t UpdateFromUrl(const char *rest_url_opt) override;
80
82 Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
83
85 Double_t GetMean(TH1 *histo, Int_t axis=1) override;
86
88 Double_t GetRMS(TH1 *histo, Int_t axis=1) override;
89
91 Double_t GetSkewness(TH1 *histo, Int_t axis=1) override;
92
94 Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override;
95
97 Double_t GetXMax(TH1 *histo) override;
98
100 Double_t GetYMax(TH1 *histo) override;
101
103 Double_t GetCMax(TH1 *histo) override;
104
105 Bool_t IsPolygonType() const override { return kFALSE; }
106
107 Int_t GetMemorySize() const override;
108
110 void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
111
113 static TString fgxURL_XLOW;
115 static TString fgxURL_XUP;
117 static TString fgxURL_YLOW;
119 static TString fgxURL_YUP;
120
121 private:
122
124 Double_t fLow1{0};
125
127 Double_t fUp1{0};
128
130 Double_t fLow2{0};
131
133 Double_t fUp2{0};
134
136 Int_t fiSaveXMin{0};
137
139 Int_t fiSaveXMax{0};
140
142 Int_t fiSaveYMin{0};
143
145 Int_t fiSaveYMax{0};
146
148 void SetHistogramRanges(TH1 *histo);
149
151 void RestoreHistogramRanges(TH1 *histo);
152
153 ClassDefOverride(TGo4WinCond,7)
154};
155
156#endif //TGO4WINCOND_H
Go4 condition class.
virtual void SetValues()
Set values needed, i.e.
virtual Bool_t Test()
Test if condition is true.
Window condition.
Definition TGo4WinCond.h:26
virtual ~TGo4WinCond()
void GetValues(Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
Returns limits.
Double_t GetMean(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
void SetPainter(TGo4ConditionPainter *painter) override
Replace default painter of this condition by external one.
static TString fgxURL_YUP
web condition editor keyword used in UpdateFromUrl.
Double_t GetXLow() const override
Definition TGo4WinCond.h:62
Int_t GetMemorySize() const override
Int_t fiSaveYMax
Saved maximum y-axis bin number for active histogram range.
void SetXUp(Double_t v)
Definition TGo4WinCond.h:68
Bool_t IsPolygonType() const override
Double_t fLow2
inclusive lower limit
static TString fgxURL_XUP
web condition editor keyword used in UpdateFromUrl.
void SetYUp(Double_t v)
Definition TGo4WinCond.h:70
Int_t fiSaveYMin
Saved minimum y-axis bin number for active histogram range.
Double_t GetYLow() const override
Definition TGo4WinCond.h:64
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
virtual void SetValues()
Set values needed, i.e.
Double_t fUp1
exclusive upper limit
static TString fgxURL_XLOW
web condition editor keyword used in UpdateFromUrl.
Int_t fiSaveXMin
Saved minimum x-axis bin number for active histogram range.
Bool_t UpdateFromUrl(const char *rest_url_opt) override
Method used by HTTP server to update some fields, specified in URL syntax.
Double_t fUp2
exclusive upper limit
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
Calculate value for histogram inside condition limits.
void SetHistogramRanges(TH1 *histo)
Remember ranges of current histo and set range to active window.
void SetYLow(Double_t v)
Definition TGo4WinCond.h:69
virtual Bool_t Test()
Test if condition is true.
Int_t fiSaveXMax
Saved maximum x-axis bin number for active histogram range.
static TString fgxURL_YLOW
web condition editor keyword used in UpdateFromUrl.
Double_t GetXMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
Double_t GetXUp() const override
Definition TGo4WinCond.h:63
Double_t GetCMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
Double_t fLow1
inclusive lower limit
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Standard way to store parameter in form of macro.
void PrintCondition(Bool_t full=kTRUE) override
Printout.
Double_t GetYMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
void RestoreHistogramRanges(TH1 *histo)
Restore original ranges of current histo.
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Copy values from cond to this.
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
Double_t GetYUp() const override
Definition TGo4WinCond.h:65
TGo4ConditionPainter * CreatePainter() override
Factory method to generate the subclass implementation for painter.
void SetXLow(Double_t v)
Definition TGo4WinCond.h:67