GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
19class TH1;
20class TH2;
21
26
28 public:
30
31 TGo4PolyCond(const char *name, const char *title = "Go4 polygon condition");
32
33 virtual ~TGo4PolyCond();
34
36 void SetWorkHistogram(TH1 *histo) override;
37
40
44 void SetPainter(TGo4ConditionPainter *painter) override;
45
47
49 void SetValues(Double_t *x, Double_t *y, Int_t len) override;
50
52 void SetValues(TCutG *newcut) override;
53
55 void SetValuesDirect(TCutG *newcut);
56
58
60 Bool_t Test(Double_t x, Double_t y) override;
61
63 Double_t GetXLow() const override;
64
66 Double_t GetXUp() const override;
67
69 Double_t GetYLow() const override;
70
72 Double_t GetYUp() const override;
73
80 TCutG *GetCut(Bool_t changeowner) override;
81
83 void PrintCondition(Bool_t points = kTRUE) override;
84
87 Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override;
88
90 Bool_t UpdateFromUrl(const char *rest_url_opt) override;
91
93 Double_t GetIntegral(TH1 *histo, Option_t *opt = "") override;
94
96 Double_t GetMean(TH1 *histo, Int_t axis = 1) override;
97
99 Double_t GetRMS(TH1 *histo, Int_t axis = 1) override;
100
102 Double_t GetSkewness(TH1 *histo, Int_t axis = 1) override;
103
105 Double_t GetCurtosis(TH1 *histo, Int_t axis = 1) override;
106
108 Double_t GetXMax(TH1 *histo) override;
109
111 Double_t GetYMax(TH1 *histo) override;
112
114 Double_t GetCMax(TH1 *histo) override;
115
116 Bool_t IsPolygonType() const override;
117
118 Int_t GetMemorySize() const override;
119
121 void SavePrimitive(std::ostream &fs, Option_t *opt = "") override;
122
125 static void CleanupSpecials();
126
127 static TString NextAvailableName();
128
129
131 static TString fgxURL_NPOINTS;
133 static TString fgxURL_XPRE;
135 static TString fgxURL_YPRE;
136
137 private:
141 TCutG *CloneCut(TGo4PolyCond * source);
142
144 void ClearCutHis();
145
147 Bool_t IsCutHis(TH1 *source);
148
150 TCutG *fxCut{nullptr};
151
155 TH2 *fxCutHis{nullptr};
156
157
158 ClassDefOverride(TGo4PolyCond,7)
159};
160
161#endif //TGO4POLYCOND_H
virtual void SetValues()
Set values needed, i.e.
virtual Bool_t Test()
Test if condition is true.
Polygon condition.
TCutG * fxCut
Cut pointer.
Double_t GetCMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
TGo4ConditionPainter * CreatePainter() override
Factory method to generate the subclass implementation for painter.
Double_t GetRMS(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
Bool_t IsCutHis(TH1 *source)
Returns true if fxCutHis can be used, create if possible.
void PrintCondition(Bool_t points=kTRUE) override
Printout values.
virtual ~TGo4PolyCond()
Double_t GetSkewness(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
Double_t GetCurtosis(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
Double_t GetXUp() const override
maximum extension of polygon in x axis
static TString fgxURL_YPRE
web condition editor keyword used in UpdateFromUrl.
void SetPainter(TGo4ConditionPainter *painter) override
Replace default painter of this condition by external one.
void ClearCutHis()
Set new cut histogram.
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Copy values from cond to this.
Bool_t UpdateFromUrl(const char *rest_url_opt) override
Method used by HTTP server to update some fields, specified in URL syntax.
TH2 * fxCutHis
temporary histogram used to calculate statistics on polygon cuts.
virtual void SetValues()
Set values needed, i.e.
Double_t GetYUp() const override
maximum extension of polygon in y axis
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Standard way to store parameter in form of macro.
Double_t GetYLow() const override
minimum extension of polygon in y axis
static TString fgxURL_XPRE
web condition editor keyword used in UpdateFromUrl.
virtual Bool_t Test()
Test if condition is true.
static TString NextAvailableName()
Double_t GetMean(TH1 *histo, Int_t axis=1) override
Calculate value for histogram inside condition limits.
void SetValuesDirect(TCutG *newcut)
Delete old cut and get ownership over newcut.
Double_t GetXMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
Double_t GetIntegral(TH1 *histo, Option_t *opt="") override
Calculate value for histogram inside condition limits.
static void CleanupSpecials()
Remove all references to any TCutGs from ROOT list of specials.
static TString fgxURL_NPOINTS
web condition editor keyword used in UpdateFromUrl.
Int_t GetMemorySize() const override
void SetWorkHistogram(TH1 *histo) override
Set reference to work histogram for statistics functions.
Bool_t IsPolygonType() const override
Double_t GetYMax(TH1 *histo) override
Calculate value for histogram inside condition limits.
TCutG * GetCut(Bool_t changeowner) override
Used to return the cut pointer of a TGo4PolyCond.
Double_t GetXLow() const override
minimum extension of polygon in x axis
TCutG * CloneCut(TGo4PolyCond *source)
Returns pointer to a cloned cut from source.