GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
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 
19 class TH1;
20 
21 class TGo4WinCond : public TGo4Condition {
22  public:
23  TGo4WinCond();
24 
25  TGo4WinCond(const char *name, const char *title = "Go4 window condition");
26 
27  virtual ~TGo4WinCond();
28 
31 
35  void SetPainter(TGo4ConditionPainter *painter) override;
36 
38 
40  void SetValues(Double_t low1, Double_t up1) override;
41 
43  void SetValues(Double_t low1, Double_t up1, Double_t low2, Double_t up2) override;
44 
45  using TGo4Condition::Test;
46 
48  Bool_t Test(Double_t v1) override;
49 
52  Bool_t Test(Double_t v1, Double_t v2) override;
53 
55  void GetValues(Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override;
56 
57  Double_t GetXLow() const override { return fLow1; }
58  Double_t GetXUp() const override { return fUp1; }
59  Double_t GetYLow() const override { return fLow2; }
60  Double_t GetYUp() const override { return fUp2; }
61 
62  void SetXLow(Double_t v) { fLow1 = v; }
63  void SetXUp(Double_t v) { fUp1 = v; }
64  void SetYLow(Double_t v) { fLow2 = v; }
65  void SetYUp(Double_t v) { fUp2 = v; }
66 
68  void PrintCondition(Bool_t full = kTRUE) override;
69 
71  Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
72 
74  Bool_t UpdateFromUrl(const char *rest_url_opt) override;
75 
77  Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
78 
80  Double_t GetMean(TH1 *histo, Int_t axis=1) override;
81 
83  Double_t GetRMS(TH1 *histo, Int_t axis=1) override;
84 
86  Double_t GetSkewness(TH1 *histo, Int_t axis=1) override;
87 
89  Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override;
90 
92  Double_t GetXMax(TH1 *histo) override;
93 
95  Double_t GetYMax(TH1 *histo) override;
96 
98  Double_t GetCMax(TH1 *histo) override;
99 
100  Bool_t IsPolygonType() const override { return kFALSE; }
101 
102  Int_t GetMemorySize() const override;
103 
105  void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
106 
108  static TString fgxURL_XLOW;
110  static TString fgxURL_XUP;
112  static TString fgxURL_YLOW;
114  static TString fgxURL_YUP;
115 
116  private:
117 
119  Double_t fLow1{0};
120 
122  Double_t fUp1{0};
123 
125  Double_t fLow2{0};
126 
128  Double_t fUp2{0};
129 
131  Int_t fiSaveXMin{0};
132 
134  Int_t fiSaveXMax{0};
135 
137  Int_t fiSaveYMin{0};
138 
140  Int_t fiSaveYMax{0};
141 
143  void SetHistogramRanges(TH1 *histo);
144 
146  void RestoreHistogramRanges(TH1 *histo);
147 
148  ClassDefOverride(TGo4WinCond,7)
149 };
150 
151 #endif //TGO4WINCOND_H
static TString fgxURL_YLOW
Definition: TGo4WinCond.h:112
Bool_t IsPolygonType() const override
Definition: TGo4WinCond.h:100
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
Double_t GetCMax(TH1 *histo) override
Double_t GetMean(TH1 *histo, Int_t axis=1) override
Int_t fiSaveYMax
Definition: TGo4WinCond.h:140
Int_t fiSaveXMin
Definition: TGo4WinCond.h:131
Double_t fUp2
Definition: TGo4WinCond.h:128
Int_t GetMemorySize() const override
void SetYLow(Double_t v)
Definition: TGo4WinCond.h:64
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Double_t GetYMax(TH1 *histo) override
virtual void SetValues()
Definition: TGo4Condition.h:93
Int_t fiSaveYMin
Definition: TGo4WinCond.h:137
TGo4ConditionPainter * CreatePainter() override
Double_t GetYLow() const override
Definition: TGo4WinCond.h:59
static TString fgxURL_XUP
Definition: TGo4WinCond.h:110
void GetValues(Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
void SetHistogramRanges(TH1 *histo)
Double_t GetXUp() const override
Definition: TGo4WinCond.h:58
Int_t fiSaveXMax
Definition: TGo4WinCond.h:134
Double_t fLow1
Definition: TGo4WinCond.h:119
void SetXLow(Double_t v)
Definition: TGo4WinCond.h:62
Double_t fLow2
Definition: TGo4WinCond.h:125
static TString fgxURL_XLOW
Definition: TGo4WinCond.h:108
Bool_t UpdateFromUrl(const char *rest_url_opt) override
void PrintCondition(Bool_t full=kTRUE) override
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
void SetXUp(Double_t v)
Definition: TGo4WinCond.h:63
Double_t GetYUp() const override
Definition: TGo4WinCond.h:60
static TString fgxURL_YUP
Definition: TGo4WinCond.h:114
void SetYUp(Double_t v)
Definition: TGo4WinCond.h:65
Double_t fUp1
Definition: TGo4WinCond.h:122
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
void SetPainter(TGo4ConditionPainter *painter) override
virtual Bool_t Test()
Double_t GetXLow() const override
Definition: TGo4WinCond.h:57
void RestoreHistogramRanges(TH1 *histo)
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
virtual ~TGo4WinCond()
Definition: TGo4WinCond.cxx:59
Double_t GetXMax(TH1 *histo) override