GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#include <TGo4PolyCond.h>
Public Member Functions | |
TGo4PolyCond () | |
TGo4PolyCond (const char *name, const char *title="Go4 polygon condition") | |
virtual | ~TGo4PolyCond () |
void | SetWorkHistogram (TH1 *histo) override |
TGo4ConditionPainter * | CreatePainter () override |
void | SetPainter (TGo4ConditionPainter *painter) override |
void | SetValues (Double_t *x, Double_t *y, Int_t len) override |
void | SetValues (TCutG *newcut) override |
void | SetValuesDirect (TCutG *newcut) |
Bool_t | Test (Double_t x, Double_t y) override |
Double_t | GetXLow () const override |
Double_t | GetXUp () const override |
Double_t | GetYLow () const override |
Double_t | GetYUp () const override |
TCutG * | GetCut (Bool_t changeowner) override |
void | PrintCondition (Bool_t points=kTRUE) override |
Bool_t | UpdateFrom (TGo4Condition *cond, Bool_t counts) override |
Bool_t | UpdateFromUrl (const char *rest_url_opt) override |
Double_t | GetIntegral (TH1 *histo, Option_t *opt="") override |
Double_t | GetMean (TH1 *histo, Int_t axis=1) override |
Double_t | GetRMS (TH1 *histo, Int_t axis=1) override |
Double_t | GetSkewness (TH1 *histo, Int_t axis=1) override |
Double_t | GetCurtosis (TH1 *histo, Int_t axis=1) override |
Double_t | GetXMax (TH1 *histo) override |
Double_t | GetYMax (TH1 *histo) override |
Double_t | GetCMax (TH1 *histo) override |
Bool_t | IsPolygonType () const override |
Int_t | GetMemorySize () const override |
void | SavePrimitive (std::ostream &fs, Option_t *opt="") override |
![]() | |
TGo4Condition () | |
TGo4Condition (const char *name, const char *title="Go4 Condition") | |
virtual | ~TGo4Condition () |
void | Paint (Option_t *opt="") override |
void | Draw (Option_t *opt="") override |
virtual void | UnDraw (Option_t *opt="") |
void | Pop () override |
virtual Int_t | Counts () |
virtual Int_t | TrueCounts () |
virtual void | ResetCounts () |
virtual void | SetCounts (Int_t truecounts, Int_t counts) |
virtual void | Disable (Bool_t result) |
virtual void | Enable () |
Bool_t | IsEnabled () const |
virtual Bool_t | Test () |
virtual Bool_t | Test (Double_t x) |
virtual void | SetValues () |
virtual void | SetValues (Double_t low1, Double_t up1) |
virtual void | SetValues (Double_t low1, Double_t up1, Double_t low2, Double_t up2) |
virtual void | AddCondition (TGo4Condition *next) |
void | IncCounts () |
void | IncTrueCounts () |
Bool_t | IsTrue () const |
Bool_t | IsFalse () const |
Bool_t | FixedResult () const |
virtual void | Invert (Bool_t on) |
virtual void | PrintBar () |
void | Print (Option_t *opt="") const override |
void | SetLast (Bool_t value) |
Bool_t | GetLast () const |
virtual void | GetValues (Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) |
virtual const TGo4Condition * | GetActiveCondition () const |
virtual void | MarkReset (Bool_t on) |
void | Clear (Option_t *opt="") override |
virtual void | SetFlags (Bool_t enabled, Bool_t lastresult, Bool_t markreset, Bool_t result, Bool_t truevalue, Bool_t falsevalue) |
virtual void | GetFlags (Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue) |
virtual void | SetVisible (Bool_t on) |
virtual Bool_t | IsVisible () const |
void | SetHistogramLink (Bool_t on) |
Bool_t | IsHistogramLink () const |
void | SetHistogram (const char *name) |
const char * | GetLinkedHistogram () const |
TH1 * | GetWorkHistogram () const |
void | SetUpdateEpsilon (Double_t val) |
Double_t | GetUpdateEpsilon () const |
void | SaveLabelStyle () |
void | InitLabelStyle () |
void | ResetLabel (Option_t *opt="reset") |
virtual void | SetLabelDraw (Bool_t on) |
virtual Bool_t | IsLabelDraw () const |
virtual void | SetLimitsDraw (Bool_t on) |
virtual Bool_t | IsLimitsDraw () const |
virtual void | SetIntDraw (Bool_t on) |
virtual Bool_t | IsIntDraw () const |
virtual void | SetXMeanDraw (Bool_t on) |
virtual Bool_t | IsXMeanDraw () const |
virtual void | SetXRMSDraw (Bool_t on) |
virtual Bool_t | IsXRMSDraw () const |
virtual void | SetYMeanDraw (Bool_t on) |
virtual Bool_t | IsYMeanDraw () const |
virtual void | SetYRMSDraw (Bool_t on) |
virtual Bool_t | IsYRMSDraw () const |
virtual void | SetXMaxDraw (Bool_t on) |
virtual Bool_t | IsXMaxDraw () const |
virtual void | SetYMaxDraw (Bool_t on) |
virtual Bool_t | IsYMaxDraw () const |
virtual void | SetCMaxDraw (Bool_t on) |
virtual Bool_t | IsCMaxDraw () const |
virtual void | SetLabelNumFormat (const char *fmt) |
virtual const char * | GetLabelNumFormat () const |
virtual void | SetChanged (Bool_t on=kTRUE) |
virtual Int_t | IsChanged () const |
void | SetMultiEdit (Bool_t on) |
virtual Bool_t | IsMultiEdit () const |
void | SetDimension (Int_t d) |
Int_t | GetDimension () const |
void | SetOwnedByEditor (Bool_t on) |
Bool_t | IsOwnedByEditor () const |
virtual void | SetCurrentIndex (Int_t) |
virtual Int_t | GetCurrentIndex () const |
virtual Int_t | GetNumberOfConditions () const |
virtual Bool_t | IsArrayType () const |
void | DeletePainter () |
Static Public Member Functions | |
static void | CleanupSpecials () |
static TString | NextAvailableName () |
![]() | |
static void | SetGlobalStyle (Bool_t LABELDRAW, Bool_t LIMITSDRAW, Bool_t INTDRAW, Bool_t XMEANDRAW, Bool_t YMEANDRAW, Bool_t XRMSDRAW, Bool_t YRMSDRAW, Bool_t XMAXDRAW, Bool_t YMAXDRAW, Bool_t CMAXDRAW, const char *NUMFORMAT) |
static void | GetGlobalStyle (Bool_t &LABELDRAW, Bool_t &LIMITSDRAW, Bool_t &INTDRAW, Bool_t &XMEANDRAW, Bool_t &YMEANDRAW, Bool_t &XRMSDRAW, Bool_t &YRMSDRAW, Bool_t &XMAXDRAW, Bool_t &YMAXDRAW, Bool_t &CMAXDRAW, TString &NUMFORMAT) |
Static Public Attributes | |
static TString | fgxURL_NPOINTS ="npolygon" |
static TString | fgxURL_XPRE ="x" |
static TString | fgxURL_YPRE ="y" |
![]() | |
static const Double_t | fgdUPDATEEPSILON = 0.01 |
static Bool_t | fgbLABELDRAW =kTRUE |
static Bool_t | fgbLIMITSDRAW =kTRUE |
static Bool_t | fgbINTDRAW =kTRUE |
static Bool_t | fgbXMEANDRAW =kTRUE |
static Bool_t | fgbXRMSDRAW =kTRUE |
static Bool_t | fgbYMEANDRAW =kFALSE |
static Bool_t | fgbYRMSDRAW =kFALSE |
static Bool_t | fgbXMAXDRAW =kTRUE |
static Bool_t | fgbYMAXDRAW =kFALSE |
static Bool_t | fgbCMAXDRAW =kTRUE |
static TString | fgxNUMFORMAT ="%.4E" |
static TString | fgxURL_RESET ="resetcounters" |
static TString | fgxURL_RESULT ="resultmode" |
static TString | fgxURL_INVERT ="invertmode" |
static TString | fgxURL_VISIBLE ="visible" |
static TString | fgxURL_LABEL ="labeldraw" |
static TString | fgxURL_LIMITS ="limitsdraw" |
static TString | fgxURL_INTEGRAL ="intdraw" |
static TString | fgxURL_XMEAN ="xmeandraw" |
static TString | fgxURL_XRMS ="xrmsdraw" |
static TString | fgxURL_YMEAN ="ymeandraw" |
static TString | fgxURL_YRMS ="yrmsdraw" |
static TString | fgxURL_XMAX ="xmaxdraw" |
static TString | fgxURL_YMAX ="ymaxdraw" |
static TString | fgxURL_CMAX ="cmaxdraw" |
Private Member Functions | |
TCutG * | CloneCut (TGo4PolyCond *source) |
void | ClearCutHis () |
Bool_t | IsCutHis (TH1 *source) |
Private Attributes | |
TCutG * | fxCut {nullptr} |
TH2 * | fxCutHis {nullptr} |
Additional Inherited Members | |
![]() | |
void | BuildUrlOptionArray (const char *rest_url_opt) |
Bool_t | UrlOptionHasKey (const char *key) |
TString | GetUrlOptionAsString (const char *key, TString def_value) |
Int_t | GetUrlOptionAsInt (const char *key, Int_t def_value) |
Double_t | GetUrlOptionAsDouble (const char *key, Double_t def_value) |
void | SetPainted (Bool_t on) |
Bool_t | IsPainted () const |
const char * | MakeScript (std::ostream &out, const char *varname, Option_t *opt="", const char *arrextraargs=nullptr) |
![]() | |
TGo4ConditionPainter * | fxPainter {nullptr} |
TObjArray * | fxUrlOptionArray {nullptr} |
Definition at line 22 of file TGo4PolyCond.h.
TGo4PolyCond::TGo4PolyCond | ( | ) |
Definition at line 45 of file TGo4PolyCond.cxx.
References TGo4Condition::SetDimension().
TGo4PolyCond::TGo4PolyCond | ( | const char * | name, |
const char * | title = "Go4 polygon condition" |
||
) |
Definition at line 54 of file TGo4PolyCond.cxx.
References TGo4Condition::SetDimension().
|
virtual |
Definition at line 63 of file TGo4PolyCond.cxx.
References ClearCutHis(), and fxCut.
|
static |
Remove all references to any TCutGs from ROOT list of specials. To be used after loading condition from file, updating condition, or setting of cut.
Definition at line 477 of file TGo4PolyCond.cxx.
Referenced by CloneCut(), TGo4PolyCondView::CreateCut(), TGo4AnalysisObjectManager::CreateNamesList(), TGo4AnalysisObjectManager::LoadObjects(), TGo4AnalysisObjectManager::SetAnalysisCondition(), SetValues(), TGo4CondArray::TGo4CondArray(), TGo4PolyCondView::TGo4PolyCondView(), TGo4PolyCondView::UpdateCondition(), and UpdateFrom().
|
private |
Set new cut histogram
Definition at line 83 of file TGo4PolyCond.cxx.
References fxCutHis.
Referenced by GetCut(), SetValues(), SetValuesDirect(), SetWorkHistogram(), UpdateFrom(), and ~TGo4PolyCond().
|
private |
Returns pointer to a cloned cut from source. Name is set to callers name. Used internally by UpdateFrom.
Definition at line 147 of file TGo4PolyCond.cxx.
References CleanupSpecials(), and GetCut().
Referenced by UpdateFrom().
|
overridevirtual |
Factory method to generate the subclass implementation for painter
Reimplemented from TGo4Condition.
Definition at line 432 of file TGo4PolyCond.cxx.
References TGo4ConditionPainter::SetCondition().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 409 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 378 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
Used to return the cut pointer of a TGo4PolyCond. In source, pointer is set to 0, when changeowner is true. Thus source object can be deleted without deleting the cut which is now owned by the caller. When changeowner is false, the pointer can only be used to clone a new cut. The cut must not be deleted!
Reimplemented from TGo4Condition.
Definition at line 135 of file TGo4PolyCond.cxx.
References ClearCutHis(), and fxCut.
Referenced by CloneCut(), TGo4ViewPanel::CompleteMarkerEdit(), TGo4ConditionEditor::CutTable_contextMenuHandler(), TGo4ConditionEditor::CutTable_contextMenuRequested(), TGo4ConditionEditor::CutTable_valueChanged(), TGo4PolyCondView::IsCutChanged(), TGo4ConditionEditor::NPointsSpin_valueChanged(), TGo4ViewPanel::PadClickedSlot(), TGo4PolyCondPainter::PaintCondition(), TGo4ConditionPainter::PaintLabel(), TGo4ConditionEditor::RefreshWidget(), TGo4ConditionEditor::UpdateEllipse(), and UpdateFrom().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 349 of file TGo4PolyCond.cxx.
References fxCut.
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 354 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
Reimplemented from TGo4Condition.
Definition at line 487 of file TGo4PolyCond.cxx.
References fxCut.
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 362 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 370 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
minimum extension of polygon in x axis
Reimplemented from TGo4Condition.
Definition at line 92 of file TGo4PolyCond.cxx.
References fxCut.
Referenced by TGo4ConditionEditor::UpdateEllipse().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 386 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
maximum extension of polygon in x axis
Reimplemented from TGo4Condition.
Definition at line 102 of file TGo4PolyCond.cxx.
References fxCut.
Referenced by TGo4ConditionEditor::UpdateEllipse().
|
overridevirtual |
minimum extension of polygon in y axis
Reimplemented from TGo4Condition.
Definition at line 111 of file TGo4PolyCond.cxx.
References fxCut.
Referenced by TGo4ConditionEditor::UpdateEllipse().
|
overridevirtual |
Calculate value for histogram inside condition limits.
Reimplemented from TGo4Condition.
Definition at line 397 of file TGo4PolyCond.cxx.
References fxCutHis, and IsCutHis().
|
overridevirtual |
maximum extension of polygon in y axis
Reimplemented from TGo4Condition.
Definition at line 120 of file TGo4PolyCond.cxx.
References fxCut.
Referenced by TGo4ConditionEditor::UpdateEllipse().
|
private |
Returns true if fxCutHis can be used, create if possible
Definition at line 440 of file TGo4PolyCond.cxx.
References fxCut, and fxCutHis.
Referenced by GetCMax(), GetCurtosis(), GetMean(), GetRMS(), GetSkewness(), GetXMax(), and GetYMax().
|
overridevirtual |
Reimplemented from TGo4Condition.
Definition at line 129 of file TGo4PolyCond.cxx.
|
static |
Definition at line 34 of file TGo4PolyCond.cxx.
Referenced by TGo4ViewPanel::PadClickedSlot().
|
overridevirtual |
Printout values. If points is true, printout polygon points.
Reimplemented from TGo4Condition.
Reimplemented in TGo4ShapedCond.
Definition at line 247 of file TGo4PolyCond.cxx.
References fxCut, and TGo4Condition::PrintCondition().
Referenced by TGo4ShapedCond::PrintCondition(), TXXXUnpackProc::TXXXUnpackProc(), TYYYUnpackProc::TYYYUnpackProc(), TXXXUnpackProc::~TXXXUnpackProc(), and TYYYUnpackProc::~TYYYUnpackProc().
|
override |
Standard way to store parameter in form of macro
Definition at line 499 of file TGo4PolyCond.cxx.
References fxCut, and TGo4Condition::MakeScript().
|
overridevirtual |
Replace default painter of this condition by external one. if different views of this condition shall exist for different TPads, the painter (i.e. view) can be exchanged before pad is updated.
Reimplemented from TGo4Condition.
Definition at line 417 of file TGo4PolyCond.cxx.
References TGo4Condition::fxPainter, TGo4ConditionPainter::SetCondition(), and TGo4Log::Warn().
|
overridevirtual |
Delete old cut and create a new cut with X,Y values.
Reimplemented from TGo4Condition.
Definition at line 219 of file TGo4PolyCond.cxx.
References CleanupSpecials(), ClearCutHis(), and fxCut.
Referenced by TGo4CreateNewCondition::MakeCondition(), TGo4ConditionEditor::NPointsSpin_valueChanged(), and TGo4PolyCondView::UpdateCondition().
|
overridevirtual |
Delete old cut and create new one by cloning newcut.
Reimplemented from TGo4Condition.
Definition at line 160 of file TGo4PolyCond.cxx.
References CleanupSpecials(), ClearCutHis(), and fxCut.
void TGo4PolyCond::SetValuesDirect | ( | TCutG * | newcut | ) |
Delete old cut and get ownership over newcut.
Definition at line 199 of file TGo4PolyCond.cxx.
References ClearCutHis(), and fxCut.
Referenced by TGo4ViewPanel::PadClickedSlot().
|
overridevirtual |
Set reference to work histogram for statistics functions
Reimplemented from TGo4Condition.
Definition at line 76 of file TGo4PolyCond.cxx.
References ClearCutHis(), and TGo4Condition::SetWorkHistogram().
Referenced by TGo4ViewPanel::PadClickedSlot().
|
overridevirtual |
Test if X,Y are inside.
Reimplemented from TGo4Condition.
Definition at line 233 of file TGo4PolyCond.cxx.
References TGo4Condition::FixedResult(), fxCut, TGo4Condition::IncCounts(), TGo4Condition::IncTrueCounts(), TGo4Condition::IsEnabled(), TGo4Condition::IsFalse(), and TGo4Condition::IsTrue().
Referenced by TXXXProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), and TXXXUnpackProc::CreateRawHistograms().
|
overridevirtual |
Copy values from cond to this. Get a clone cut from cond by CloneCut as new cut. If counts is true, copy counters too.
Reimplemented from TGo4Condition.
Reimplemented in TGo4ShapedCond.
Definition at line 266 of file TGo4PolyCond.cxx.
References CleanupSpecials(), ClearCutHis(), CloneCut(), fxCut, GetCut(), and TGo4Condition::UpdateFrom().
Referenced by TGo4ShapedCond::UpdateFrom().
|
overridevirtual |
Method used by HTTP server to update some fields, specified in URL syntax
Reimplemented from TGo4Condition.
Reimplemented in TGo4ShapedCond.
Definition at line 316 of file TGo4PolyCond.cxx.
References fgxURL_NPOINTS, fgxURL_XPRE, fgxURL_YPRE, TGo4Condition::GetUrlOptionAsDouble(), TGo4Condition::GetUrlOptionAsInt(), TGo4Log::Message(), TGo4Condition::SetValues(), TGo4Condition::UpdateFromUrl(), and TGo4Condition::UrlOptionHasKey().
Referenced by TGo4ShapedCond::UpdateFromUrl().
|
static |
web condition editor keyword used in UpdateFromUrl.
JAM2016: this define switches between cloning when updating condition and simple copy of TCutG points
Definition at line 126 of file TGo4PolyCond.h.
Referenced by UpdateFromUrl().
|
static |
web condition editor keyword used in UpdateFromUrl.
Definition at line 128 of file TGo4PolyCond.h.
Referenced by UpdateFromUrl().
|
static |
web condition editor keyword used in UpdateFromUrl.
Definition at line 130 of file TGo4PolyCond.h.
Referenced by UpdateFromUrl().
|
private |
Cut pointer.
Definition at line 145 of file TGo4PolyCond.h.
Referenced by GetCut(), GetIntegral(), GetMemorySize(), GetXLow(), GetXUp(), GetYLow(), GetYUp(), IsCutHis(), PrintCondition(), SavePrimitive(), SetValues(), SetValuesDirect(), Test(), UpdateFrom(), and ~TGo4PolyCond().
|
private |
temporary histogram used to calculate statistics on polygon cuts. Will be recalculated only if boundaries have changed.
Definition at line 150 of file TGo4PolyCond.h.
Referenced by ClearCutHis(), GetCMax(), GetCurtosis(), GetMean(), GetRMS(), GetSkewness(), GetXMax(), GetYMax(), and IsCutHis().