GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4PolyCond.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 TGO4POLYCOND_H
15 #define TGO4POLYCOND_H
16 
17 #include "TGo4Condition.h"
18 
19 class TH1;
20 class TH2;
21 
22 class TGo4PolyCond : public TGo4Condition {
23  public:
24  TGo4PolyCond();
25 
26  TGo4PolyCond(const char *name, const char *title = "Go4 polygon condition");
27 
28  virtual ~TGo4PolyCond();
29 
31  void SetWorkHistogram(TH1 *histo) override;
32 
35 
39  void SetPainter(TGo4ConditionPainter *painter) override;
40 
42 
44  void SetValues(Double_t *x, Double_t *y, Int_t len) override;
45 
47  void SetValues(TCutG *newcut) override;
48 
50  void SetValuesDirect(TCutG *newcut);
51 
52  using TGo4Condition::Test;
53 
55  Bool_t Test(Double_t x, Double_t y) override;
56 
58  Double_t GetXLow() const override;
59 
61  Double_t GetXUp() const override;
62 
64  Double_t GetYLow() const override;
65 
67  Double_t GetYUp() const override;
68 
75  TCutG *GetCut(Bool_t changeowner) override;
76 
78  void PrintCondition(Bool_t points = kTRUE) override;
79 
82  Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
83 
85  Bool_t UpdateFromUrl(const char *rest_url_opt) override;
86 
88  Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
89 
91  Double_t GetMean(TH1 *histo, Int_t axis = 1) override;
92 
94  Double_t GetRMS(TH1 *histo, Int_t axis = 1) override;
95 
97  Double_t GetSkewness(TH1 *histo, Int_t axis = 1) override;
98 
100  Double_t GetCurtosis(TH1 *histo, Int_t axis = 1) override;
101 
103  Double_t GetXMax(TH1 *histo) override;
104 
106  Double_t GetYMax(TH1 *histo) override;
107 
109  Double_t GetCMax(TH1 *histo) override;
110 
111  Bool_t IsPolygonType() const override;
112 
113  Int_t GetMemorySize() const override;
114 
116  void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
117 
120  static void CleanupSpecials();
121 
122  static TString NextAvailableName();
123 
124 
126  static TString fgxURL_NPOINTS;
128  static TString fgxURL_XPRE;
130  static TString fgxURL_YPRE;
131 
132  private:
136  TCutG *CloneCut(TGo4PolyCond * source);
137 
139  void ClearCutHis();
140 
142  Bool_t IsCutHis(TH1 *source);
143 
145  TCutG *fxCut{nullptr};
146 
150  TH2 *fxCutHis{nullptr};
151 
152 
153  ClassDefOverride(TGo4PolyCond,7)
154 };
155 
156 #endif //TGO4POLYCOND_H
void SetPainter(TGo4ConditionPainter *painter) override
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
void ClearCutHis()
static TString fgxURL_XPRE
Definition: TGo4PolyCond.h:128
Double_t GetMean(TH1 *histo, Int_t axis=1) override
TCutG * GetCut(Bool_t changeowner) override
static TString NextAvailableName()
Double_t GetYLow() const override
TCutG * CloneCut(TGo4PolyCond *source)
void SetValuesDirect(TCutG *newcut)
Bool_t IsCutHis(TH1 *source)
TCutG * fxCut
Definition: TGo4PolyCond.h:145
static void CleanupSpecials()
virtual void SetValues()
Definition: TGo4Condition.h:93
Double_t GetXLow() const override
Bool_t IsPolygonType() const override
static TString fgxURL_YPRE
Definition: TGo4PolyCond.h:130
Double_t GetXUp() const override
Double_t GetYUp() const override
Int_t GetMemorySize() const override
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
Double_t GetYMax(TH1 *histo) override
virtual ~TGo4PolyCond()
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
virtual Bool_t Test()
TGo4ConditionPainter * CreatePainter() override
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
void SetWorkHistogram(TH1 *histo) override
Double_t GetCMax(TH1 *histo) override
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Double_t GetXMax(TH1 *histo) override
static TString fgxURL_NPOINTS
Definition: TGo4PolyCond.h:126
Bool_t UpdateFromUrl(const char *rest_url_opt) override
void PrintCondition(Bool_t points=kTRUE) override