GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
TGo4PolyCond Class Reference

#include <TGo4PolyCond.h>

+ Inheritance diagram for TGo4PolyCond:

Public Member Functions

 TGo4PolyCond ()
 
 TGo4PolyCond (const char *name, const char *title="Go4 polygon condition")
 
virtual ~TGo4PolyCond ()
 
virtual TGo4ConditionPainterCreatePainter ()
 
virtual void SetPainter (TGo4ConditionPainter *painter)
 
virtual void SetValues (Double_t *x, Double_t *y, Int_t len)
 
virtual void SetValues (TCutG *newcut)
 
void SetValuesDirect (TCutG *newcut)
 
virtual Bool_t Test (Double_t x, Double_t y)
 
virtual Double_t GetXLow ()
 
virtual Double_t GetXUp ()
 
virtual Double_t GetYLow ()
 
virtual Double_t GetYUp ()
 
TCutG * GetCut (Bool_t changeowner)
 
virtual void PrintCondition (Bool_t points=kTRUE)
 
Bool_t UpdateFrom (TGo4Condition *cond, Bool_t counts)
 
virtual Bool_t UpdateFromUrl (const char *rest_url_opt)
 
virtual Double_t GetIntegral (TH1 *histo, Option_t *opt="")
 
virtual Double_t GetMean (TH1 *histo, Int_t axis=1)
 
virtual Double_t GetRMS (TH1 *histo, Int_t axis=1)
 
virtual Double_t GetSkewness (TH1 *histo, Int_t axis=1)
 
virtual Double_t GetCurtosis (TH1 *histo, Int_t axis=1)
 
virtual Double_t GetXMax (TH1 *histo)
 
virtual Double_t GetYMax (TH1 *histo)
 
virtual Double_t GetCMax (TH1 *histo)
 
virtual Bool_t IsPolygonType ()
 
virtual Int_t GetMemorySize ()
 
virtual void SavePrimitive (std::ostream &fs, Option_t *="")
 
- Public Member Functions inherited from TGo4Condition
 TGo4Condition ()
 
 TGo4Condition (const char *name, const char *title="Go4 Condition")
 
virtual ~TGo4Condition ()
 
virtual void Paint (Option_t *opt="")
 
virtual void Draw (Option_t *opt="")
 
virtual void UnDraw (Option_t *opt="")
 
virtual void Pop ()
 
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 Bool_t Test (Bool_t result)
 
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 ()
 
virtual void Print (Option_t *opt="") const
 
void SetLast (Bool_t value)
 
Bool_t GetLast ()
 
virtual void GetValues (Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
 
virtual TGo4ConditionGetActiveCondition ()
 
virtual void MarkReset (Bool_t on)
 
virtual void Clear (Option_t *opt="")
 
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 ()
 
void SetHistogramLink (Bool_t on)
 
Bool_t IsHistogramLink ()
 
void SetHistogram (const char *name)
 
const char * GetLinkedHistogram ()
 
void SetWorkHistogram (TH1 *histo)
 
TH1 * GetWorkHistogram ()
 
void SetUpdateEpsilon (Double_t val)
 
Double_t GetUpdateEpsilon ()
 
void SaveLabelStyle ()
 
void InitLabelStyle ()
 
void ResetLabel (Option_t *opt="reset")
 
virtual void SetLabelDraw (Bool_t on)
 
virtual Bool_t IsLabelDraw ()
 
virtual void SetLimitsDraw (Bool_t on)
 
virtual Bool_t IsLimitsDraw ()
 
virtual void SetIntDraw (Bool_t on)
 
virtual Bool_t IsIntDraw ()
 
virtual void SetXMeanDraw (Bool_t on)
 
virtual Bool_t IsXMeanDraw ()
 
virtual void SetXRMSDraw (Bool_t on)
 
virtual Bool_t IsXRMSDraw ()
 
virtual void SetYMeanDraw (Bool_t on)
 
virtual Bool_t IsYMeanDraw ()
 
virtual void SetYRMSDraw (Bool_t on)
 
virtual Bool_t IsYRMSDraw ()
 
virtual void SetXMaxDraw (Bool_t on)
 
virtual Bool_t IsXMaxDraw ()
 
virtual void SetYMaxDraw (Bool_t on)
 
virtual Bool_t IsYMaxDraw ()
 
virtual void SetCMaxDraw (Bool_t on)
 
virtual Bool_t IsCMaxDraw ()
 
virtual const char * GetLabelNumFormat ()
 
virtual void SetLabelNumFormat (const char *fmt)
 
virtual void SetChanged (Bool_t on)
 
virtual Int_t IsChanged ()
 
void SetMultiEdit (Bool_t on)
 
virtual Bool_t IsMultiEdit ()
 
void SetDimension (Int_t d)
 
Int_t GetDimension ()
 
void SetOwnedByEditor (Bool_t on)
 
Bool_t IsOwnedByEditor ()
 
virtual void SetCurrentIndex (Int_t ix)
 
virtual Int_t GetCurrentIndex ()
 
virtual Int_t GetNumberOfConditions ()
 
virtual Bool_t IsArrayType ()
 
void DeletePainter ()
 

Static Public Member Functions

static void CleanupSpecials ()
 
static TString NextAvailableName ()
 

Static Public Attributes

static TString fgxURL_NPOINTS ="npolygon"
 
static TString fgxURL_XPRE ="x"
 
static TString fgxURL_YPRE ="y"
 
- Static Public Attributes inherited from TGo4Condition
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)
 
TH2 * CreateCutHistogram (TH1 *source)
 

Private Attributes

TCutG * fxCut
 

Additional Inherited Members

- Protected Member Functions inherited from TGo4Condition
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=0)
 
- Protected Attributes inherited from TGo4Condition
TGo4ConditionPainterfxPainter
 
TH1 * fxCutHis
 
TObjArray * fxUrlOptionArray
 

Detailed Description

Definition at line 22 of file TGo4PolyCond.h.

Constructor & Destructor Documentation

TGo4PolyCond::TGo4PolyCond ( )

Definition at line 50 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

TGo4PolyCond::TGo4PolyCond ( const char *  name,
const char *  title = "Go4 polygon condition" 
)

Definition at line 59 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

TGo4PolyCond::~TGo4PolyCond ( )
virtual

Definition at line 68 of file TGo4PolyCond.cxx.

References fxCut.

Member Function Documentation

void TGo4PolyCond::CleanupSpecials ( )
static

Remove all references to any TCutGs from ROOT list of specials. To be used after loading condition from file, updating contition, or setting of cut.

Definition at line 512 of file TGo4PolyCond.cxx.

Referenced by CloneCut(), TGo4PolyCondView::CreateCut(), TGo4AnalysisObjectManager::CreateNamesList(), TGo4AnalysisObjectManager::LoadObjects(), TGo4AnalysisObjectManager::SetAnalysisCondition(), SetValues(), TGo4CondArray::TGo4CondArray(), TGo4PolyCondView::TGo4PolyCondView(), TGo4PolyCondView::UpdateCondition(), and UpdateFrom().

TCutG * TGo4PolyCond::CloneCut ( TGo4PolyCond source)
private

Returns pointer to a cloned cut from source. Name is set to callers name. Used internally by UpdateFrom.

Definition at line 136 of file TGo4PolyCond.cxx.

References CleanupSpecials(), and GetCut().

Referenced by UpdateFrom().

TH2 * TGo4PolyCond::CreateCutHistogram ( TH1 *  source)
private

Create clone of source histogram that only has contents for bins inside the current TCutG. For calculation of statistical values.

Definition at line 479 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by GetCMax(), GetCurtosis(), GetIntegral(), GetMean(), GetRMS(), GetSkewness(), GetXMax(), and GetYMax().

TGo4ConditionPainter * TGo4PolyCond::CreatePainter ( )
virtual

Factory method to generate the subclass implementation for painter

Reimplemented from TGo4Condition.

Definition at line 471 of file TGo4PolyCond.cxx.

References TGo4ConditionPainter::SetCondition().

Double_t TGo4PolyCond::GetCMax ( TH1 *  histo)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 443 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetCurtosis ( TH1 *  histo,
Int_t  axis = 1 
)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 401 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

TCutG * TGo4PolyCond::GetCut ( Bool_t  changeowner)
virtual

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 120 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::fxCutHis.

Referenced by CloneCut(), TGo4ViewPanel::CompleteMarkerEdit(), TGo4ConditionEditor::ContextMenuSlot(), TGo4ConditionEditor::CutTable_contextMenuRequested(), TGo4ConditionEditor::CutTable_valueChanged(), TGo4PolyCondView::IsCutChanged(), TGo4ConditionEditor::NPointsSpin_valueChanged(), TGo4ViewPanel::PadClickedSlot(), TGo4PolyCondPainter::PaintCondition(), TGo4ConditionPainter::PaintLabel(), TGo4ConditionEditor::RefreshWidget(), TGo4ConditionEditor::UpdateEllipse(), and UpdateFrom().

Double_t TGo4PolyCond::GetIntegral ( TH1 *  histo,
Option_t *  opt = "" 
)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 356 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), fxCut, and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetMean ( TH1 *  histo,
Int_t  axis = 1 
)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 377 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Int_t TGo4PolyCond::GetMemorySize ( )
virtual

Reimplemented from TGo4Condition.

Definition at line 526 of file TGo4PolyCond.cxx.

References fxCut.

Double_t TGo4PolyCond::GetRMS ( TH1 *  histo,
Int_t  axis = 1 
)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 385 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetSkewness ( TH1 *  histo,
Int_t  axis = 1 
)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 393 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetXLow ( )
virtual

minimum extension of polygon in x axis

Reimplemented from TGo4Condition.

Definition at line 80 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by TGo4ConditionEditor::UpdateEllipse().

Double_t TGo4PolyCond::GetXMax ( TH1 *  histo)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 409 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetXUp ( )
virtual

maximum extension of polygon in x axis

Reimplemented from TGo4Condition.

Definition at line 89 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by TGo4ConditionEditor::UpdateEllipse().

Double_t TGo4PolyCond::GetYLow ( )
virtual

minimum extension of polygon in y axis

Reimplemented from TGo4Condition.

Definition at line 97 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by TGo4ConditionEditor::UpdateEllipse().

Double_t TGo4PolyCond::GetYMax ( TH1 *  histo)
virtual

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 426 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetYUp ( )
virtual

maximum extension of polygon in y axis

Reimplemented from TGo4Condition.

Definition at line 105 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by TGo4ConditionEditor::UpdateEllipse().

Bool_t TGo4PolyCond::IsPolygonType ( )
virtual

Reimplemented from TGo4Condition.

Definition at line 114 of file TGo4PolyCond.cxx.

TString TGo4PolyCond::NextAvailableName ( )
static

Definition at line 39 of file TGo4PolyCond.cxx.

Referenced by TGo4ViewPanel::PadClickedSlot().

void TGo4PolyCond::PrintCondition ( Bool_t  points = kTRUE)
virtual

Printout values. If points is true, printout polygon points.

Reimplemented from TGo4Condition.

Reimplemented in TGo4ShapedCond.

Definition at line 245 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::PrintCondition().

Referenced by TGo4ShapedCond::PrintCondition(), TXXXUnpackProc::TXXXUnpackProc(), TYYYUnpackProc::TYYYUnpackProc(), TXXXUnpackProc::~TXXXUnpackProc(), and TYYYUnpackProc::~TYYYUnpackProc().

void TGo4PolyCond::SavePrimitive ( std::ostream &  fs,
Option_t *  opt = "" 
)
virtual

Standard way to store parameter in form of macro

Definition at line 542 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::MakeScript().

void TGo4PolyCond::SetPainter ( TGo4ConditionPainter painter)
virtual

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 452 of file TGo4PolyCond.cxx.

References TGo4Condition::fxPainter, TGo4ConditionPainter::SetCondition(), and TGo4Log::Warn().

void TGo4PolyCond::SetValues ( Double_t *  x,
Double_t *  y,
Int_t  len 
)
virtual

Delete old cut and create a new cut with X,Y values.

Reimplemented from TGo4Condition.

Definition at line 217 of file TGo4PolyCond.cxx.

References CleanupSpecials(), fxCut, and TGo4Condition::fxCutHis.

Referenced by TGo4CreateNewCondition::MakeCondition(), TGo4ConditionEditor::NPointsSpin_valueChanged(), and TGo4PolyCondView::UpdateCondition().

void TGo4PolyCond::SetValues ( TCutG *  newcut)
virtual

Delete old cut and create new one by cloning newcut.

Reimplemented from TGo4Condition.

Definition at line 151 of file TGo4PolyCond.cxx.

References CleanupSpecials(), fxCut, and TGo4Condition::fxCutHis.

void TGo4PolyCond::SetValuesDirect ( TCutG *  newcut)

Delete old cut and get ownership over newcut.

Definition at line 194 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::fxCutHis.

Referenced by TGo4ViewPanel::PadClickedSlot().

Bool_t TGo4PolyCond::Test ( Double_t  x,
Double_t  y 
)
virtual
Bool_t TGo4PolyCond::UpdateFrom ( TGo4Condition cond,
Bool_t  counts 
)
virtual

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 264 of file TGo4PolyCond.cxx.

References CleanupSpecials(), CloneCut(), fxCut, TGo4Condition::fxCutHis, GetCut(), and TGo4Condition::UpdateFrom().

Referenced by TGo4ShapedCond::UpdateFrom().

Bool_t TGo4PolyCond::UpdateFromUrl ( const char *  rest_url_opt)
virtual

Method used by HTTP server to update some fields, specified in URL syntax

Reimplemented from TGo4Condition.

Reimplemented in TGo4ShapedCond.

Definition at line 322 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().

Member Data Documentation

TString TGo4PolyCond::fgxURL_NPOINTS ="npolygon"
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 129 of file TGo4PolyCond.h.

Referenced by UpdateFromUrl().

TString TGo4PolyCond::fgxURL_XPRE ="x"
static

web condition editor keyword used in UpdateFromUrl.

Definition at line 131 of file TGo4PolyCond.h.

Referenced by UpdateFromUrl().

TString TGo4PolyCond::fgxURL_YPRE ="y"
static

web condition editor keyword used in UpdateFromUrl.

Definition at line 133 of file TGo4PolyCond.h.

Referenced by UpdateFromUrl().

TCutG* TGo4PolyCond::fxCut
private

The documentation for this class was generated from the following files: