GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4ListCond Class Reference

Condition that checks a value against a list of "good" (or bad) values. More...

#include <TGo4ListCond.h>

+ Inheritance diagram for TGo4ListCond:

Public Member Functions

 TGo4ListCond ()
 
 TGo4ListCond (const char *name, const char *title, const Int_t num, const Int_t *values)
 
 TGo4ListCond (const char *name, const char *title, const Int_t start, const Int_t stop, const Int_t step=1)
 
 TGo4ListCond (const char *name, const char *title="Go4 list condition")
 
virtual ~TGo4ListCond ()
 
UInt_t GetNumValues () const
 
Int_t GetValue (UInt_t ix) const
 
Double_t GetXLow () const override
 For base class displays: minimum value of test list.
 
Double_t GetXUp () const override
 For base class displays: maximum value of test list.
 
Double_t GetYLow () const override
 For base class displays: not used for 1d list.
 
Double_t GetYUp () const override
 For base class displays: not used for 1d list.
 
void InsertValue (UInt_t ix, Int_t val)
 
void PrintCondition (Bool_t full=kFALSE) override
 Prints counters and boolean members.
 
void PrintValues ()
 
void RemoveValue (UInt_t ix)
 
void Resize (size_t newsize)
 
void SetValue (UInt_t ix, Int_t val)
 
virtual void SetValues ()
 Set values needed, i.e.
 
virtual void SetValues (const Int_t num, const Int_t *values)
 
virtual void SetValues (const Int_t start, const Int_t stop, const Int_t step)
 
virtual void SetValues (Double_t *x, Double_t *y, Int_t len)
 
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 SetValues (TCutG *newcut)
 
virtual Bool_t Test ()
 Test if condition is true.
 
Bool_t Test (Double_t value) override
 
virtual Bool_t Test (Double_t x, Double_t y)
 
Bool_t UpdateFrom (TGo4Condition *cond, Bool_t counts) override
 Copy values from cond to this.
 
- Public Member Functions inherited from TGo4Condition
 TGo4Condition ()
 
 TGo4Condition (const char *name, const char *title="Go4 Condition")
 
virtual ~TGo4Condition ()
 
virtual void AddCondition (TGo4Condition *next)
 Add another condition to this one.
 
void Clear (Option_t *opt="") override
 
virtual Int_t Counts ()
 Return number of calls of the Test method.
 
virtual TGo4ConditionPainterCreatePainter ()
 Factory method to generate the subclass implementation for painter.
 
void DeletePainter ()
 
virtual void Disable (Bool_t result)
 Freeze condition, on Test() return result.
 
void Draw (Option_t *opt="") override
 Draw this condition on current pad.
 
virtual void Enable ()
 Enable (unfreeze) Test execution.
 
Bool_t FixedResult () const
 Returns the value set by Disable(value).
 
virtual const TGo4ConditionGetActiveCondition () const
 To be overwritten for condition array.
 
virtual Double_t GetCMax (TH1 *)
 Calculate value for histogram inside condition limits.
 
virtual Int_t GetCurrentIndex () const
 get index for array type subclasses
 
virtual Double_t GetCurtosis (TH1 *, Int_t=1)
 Calculate value for histogram inside condition limits.
 
virtual TCutG * GetCut (Bool_t owner)
 
Int_t GetDimension () const
 
virtual void GetFlags (Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue)
 Sets values of internal boolean flags to external variables.
 
virtual Double_t GetIntegral (TH1 *, Option_t *="")
 Calculate value for histogram inside condition limits.
 
virtual const char * GetLabelNumFormat () const
 
Bool_t GetLast () const
 Returns result of last Test.
 
const char * GetLinkedHistogram () const
 Access name of the associated histogram.
 
virtual Double_t GetMean (TH1 *, Int_t=1)
 Calculate value for histogram inside condition limits.
 
virtual Int_t GetMemorySize () const
 
virtual Int_t GetNumberOfConditions () const
 for condition aggregates: return total number of conditions, i.e.size of condition array
 
virtual Double_t GetRMS (TH1 *, Int_t=1)
 Calculate value for histogram inside condition limits.
 
virtual Double_t GetSkewness (TH1 *, Int_t=1)
 Calculate value for histogram inside condition limits.
 
Double_t GetUpdateEpsilon () const
 
virtual void GetValues (Int_t &dim, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
 
TH1 * GetWorkHistogram () const
 access work histogram reference
 
virtual Double_t GetXMax (TH1 *)
 Calculate value for histogram inside condition limits.
 
virtual Double_t GetYMax (TH1 *)
 Calculate value for histogram inside condition limits.
 
void IncCounts ()
 Increment the test counter.
 
void IncTrueCounts ()
 Increment the "test was true" counter.
 
void InitLabelStyle ()
 Initialize label setup from static default variables.
 
virtual void Invert (Bool_t on)
 Inverts return values, when on is true, i.e.
 
virtual Bool_t IsArrayType () const
 
virtual Int_t IsChanged () const
 
virtual Bool_t IsCMaxDraw () const
 
Bool_t IsEnabled () const
 Returns true if condition is enabled.
 
Bool_t IsFalse () const
 Use this as return, if test was false.
 
Bool_t IsHistogramLink () const
 True if the histogram of given name is linked to this.
 
virtual Bool_t IsIntDraw () const
 
virtual Bool_t IsLabelDraw () const
 
virtual Bool_t IsLimitsDraw () const
 
virtual Bool_t IsMultiEdit () const
 
Bool_t IsOwnedByEditor () const
 
virtual Bool_t IsPolygonType () const
 
Bool_t IsTrue () const
 Use this as return, if test was true.
 
virtual Bool_t IsVisible () const
 Visibility property for gui display in editor.
 
virtual Bool_t IsXMaxDraw () const
 
virtual Bool_t IsXMeanDraw () const
 
virtual Bool_t IsXRMSDraw () const
 
virtual Bool_t IsYMaxDraw () const
 
virtual Bool_t IsYMeanDraw () const
 
virtual Bool_t IsYRMSDraw () const
 
virtual void MarkReset (Bool_t on)
 defines if condition counters shall be reset in UpdateFrom method
 
void Paint (Option_t *opt="") override
 Display condition with plain root canvas and in go4 viewpanel.
 
void Pop () override
 Re-implement TObject method to pop all our views to front.
 
void Print (Option_t *opt="") const override
 Default printout for root object lists.
 
virtual void PrintBar ()
 Prints counters and bar.
 
virtual void ResetCounts ()
 Clear counters.
 
void ResetLabel (Option_t *opt="reset")
 Will reset label position to defaults with other option than reset, just pop label to front.
 
void SaveLabelStyle ()
 This will save draw flags into static default setup.
 
virtual void SetChanged (Bool_t on=kTRUE)
 
virtual void SetCMaxDraw (Bool_t on)
 
virtual void SetCounts (Int_t truecounts, Int_t counts)
 Set counters.
 
virtual void SetCurrentIndex (Int_t)
 set index for array type subclasses
 
void SetDimension (Int_t d)
 
virtual void SetFlags (Bool_t enabled, Bool_t lastresult, Bool_t markreset, Bool_t result, Bool_t truevalue, Bool_t falsevalue)
 Sets values of external boolean flags to internal variables.
 
void SetHistogram (const char *name)
 Define the name of the associated histogram.
 
void SetHistogramLink (Bool_t on)
 Define if this condition has association with an analysis histogram.
 
virtual void SetIntDraw (Bool_t on)
 
virtual void SetLabelDraw (Bool_t on)
 
virtual void SetLabelNumFormat (const char *fmt)
 
void SetLast (Bool_t value)
 Can be used in Test to store the result.
 
virtual void SetLimitsDraw (Bool_t on)
 
void SetMultiEdit (Bool_t on)
 
void SetOwnedByEditor (Bool_t on)
 
virtual void SetPainter (TGo4ConditionPainter *painter)
 Replace default painter of this condition by external one.
 
void SetUpdateEpsilon (Double_t val)
 Configure graphical update tolerance for this condition individually.
 
virtual void SetVisible (Bool_t on)
 Set/Unset visibility.
 
virtual void SetWorkHistogram (TH1 *histo)
 Set reference to work histogram for statistics functions.
 
virtual void SetXMaxDraw (Bool_t on)
 
virtual void SetXMeanDraw (Bool_t on)
 
virtual void SetXRMSDraw (Bool_t on)
 
virtual void SetYMaxDraw (Bool_t on)
 
virtual void SetYMeanDraw (Bool_t on)
 
virtual void SetYRMSDraw (Bool_t on)
 
virtual Int_t TrueCounts ()
 Return number of true results of the Test method call.
 
virtual void UnDraw (Option_t *opt="")
 Erase view of this condition from the pad.
 
virtual Bool_t UpdateFromUrl (const char *rest_url_opt)
 Method used by HTTP server to update some fields, specified in URL syntax.
 

Private Member Functions

 ClassDefOverride (TGo4ListCond, 1)
 number of values in list: todo: use vector here?
 

Private Attributes

std::vector< Int_t > fxValues
 Factory method to generate the subclass implementation for painter TODO: do we need graphical representation of whitelist, e.g.
 

Additional Inherited Members

- Static Public Member Functions inherited from TGo4Condition
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 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 Public Attributes inherited from TGo4Condition
static Bool_t fgbCMAXDRAW =kTRUE
 default setting for all conditions for label draw cmax flag.
 
static Bool_t fgbINTDRAW =kTRUE
 default setting for all conditions for label draw integral flag.
 
static Bool_t fgbLABELDRAW =kTRUE
 default setting for all conditions for label draw on/off flag.
 
static Bool_t fgbLIMITSDRAW =kTRUE
 default setting for all conditions for label draw limits flag.
 
static Bool_t fgbXMAXDRAW =kTRUE
 default setting for all conditions for label draw xmax flag.
 
static Bool_t fgbXMEANDRAW =kTRUE
 default setting for all conditions for label draw xmean flag.
 
static Bool_t fgbXRMSDRAW =kTRUE
 default setting for all conditions for label draw xrms flag.
 
static Bool_t fgbYMAXDRAW =kFALSE
 default setting for all conditions for label draw ymax flag.
 
static Bool_t fgbYMEANDRAW =kFALSE
 default setting for all conditions for label draw ymean flag.
 
static Bool_t fgbYRMSDRAW =kFALSE
 default setting for all conditions for label draw yrms flag.
 
static const Double_t fgdUPDATEEPSILON = 0.01
 default value for graphical update tolerance.
 
static TString fgxNUMFORMAT ="%.4E"
 default setting for all conditions with format string for numbers.
 
static TString fgxURL_CMAX ="cmaxdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_INTEGRAL ="intdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_INVERT ="invertmode"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_LABEL ="labeldraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_LIMITS ="limitsdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_RESET ="resetcounters"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_RESULT ="resultmode"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_VISIBLE ="visible"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_XMAX ="xmaxdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_XMEAN ="xmeandraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_XRMS ="xrmsdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_YMAX ="ymaxdraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_YMEAN ="ymeandraw"
 web condition editor keyword used in UpdateFromUrl.
 
static TString fgxURL_YRMS ="yrmsdraw"
 web condition editor keyword used in UpdateFromUrl.
 
- Protected Member Functions inherited from TGo4Condition
void BuildUrlOptionArray (const char *rest_url_opt)
 re-build the list of url options from string
 
Double_t GetUrlOptionAsDouble (const char *key, Double_t def_value)
 Scan list of url options for key.
 
Int_t GetUrlOptionAsInt (const char *key, Int_t def_value)
 Scan list of url options for key.
 
TString GetUrlOptionAsString (const char *key, TString def_value)
 Scan list of url options for key.
 
Bool_t IsPainted () const
 
const char * MakeScript (std::ostream &out, const char *varname, Option_t *opt="", const char *arrextraargs=nullptr)
 
void SetPainted (Bool_t on)
 
Bool_t UrlOptionHasKey (const char *key)
 returns true if key is present in list of url options.
 
- Protected Attributes inherited from TGo4Condition
TGo4ConditionPainterfxPainter {nullptr}
 Painter instance to display the condition in root pad.
 
TObjArray * fxUrlOptionArray {nullptr}
 array with TObjStrings evaluated by UpdateFromUrl
 

Detailed Description

Condition that checks a value against a list of "good" (or bad) values.

Developed from TRemiWhitelistCond class by Sven Augustin

Definition at line 25 of file TGo4ListCond.h.

Constructor & Destructor Documentation

◆ TGo4ListCond() [1/4]

TGo4ListCond::TGo4ListCond ( )

Definition at line 18 of file TGo4ListCond.cxx.

References TGo4Condition::TGo4Condition(), and TGo4Condition::SetDimension().

Referenced by ClassDefOverride(), and UpdateFrom().

◆ TGo4ListCond() [2/4]

TGo4ListCond::TGo4ListCond ( const char * name,
const char * title = "Go4 list condition" )

◆ TGo4ListCond() [3/4]

TGo4ListCond::TGo4ListCond ( const char * name,
const char * title,
const Int_t num,
const Int_t * values )

◆ TGo4ListCond() [4/4]

TGo4ListCond::TGo4ListCond ( const char * name,
const char * title,
const Int_t start,
const Int_t stop,
const Int_t step = 1 )

◆ ~TGo4ListCond()

TGo4ListCond::~TGo4ListCond ( )
virtual

Definition at line 67 of file TGo4ListCond.cxx.

Member Function Documentation

◆ ClassDefOverride()

TGo4ListCond::ClassDefOverride ( TGo4ListCond ,
1  )
private

number of values in list: todo: use vector here?

array with values to test: todo: use vector here?

References TGo4ListCond().

◆ GetNumValues()

◆ GetValue()

Int_t TGo4ListCond::GetValue ( UInt_t ix) const
inline

◆ GetXLow()

Double_t TGo4ListCond::GetXLow ( ) const
overridevirtual

For base class displays: minimum value of test list.

Reimplemented from TGo4Condition.

Definition at line 125 of file TGo4ListCond.cxx.

References fxValues.

◆ GetXUp()

Double_t TGo4ListCond::GetXUp ( ) const
overridevirtual

For base class displays: maximum value of test list.

Reimplemented from TGo4Condition.

Definition at line 120 of file TGo4ListCond.cxx.

References fxValues.

◆ GetYLow()

Double_t TGo4ListCond::GetYLow ( ) const
overridevirtual

For base class displays: not used for 1d list.

Reimplemented from TGo4Condition.

Definition at line 135 of file TGo4ListCond.cxx.

◆ GetYUp()

Double_t TGo4ListCond::GetYUp ( ) const
overridevirtual

For base class displays: not used for 1d list.

Reimplemented from TGo4Condition.

Definition at line 130 of file TGo4ListCond.cxx.

◆ InsertValue()

void TGo4ListCond::InsertValue ( UInt_t ix,
Int_t val )
inline

Definition at line 56 of file TGo4ListCond.h.

References fxValues.

Referenced by TGo4ConditionEditor::CutTable_contextMenuHandler().

◆ PrintCondition()

void TGo4ListCond::PrintCondition ( Bool_t full = kFALSE)
overridevirtual

Prints counters and boolean members.

Reimplemented from TGo4Condition.

Definition at line 90 of file TGo4ListCond.cxx.

References TGo4Condition::PrintCondition(), and PrintValues().

◆ PrintValues()

void TGo4ListCond::PrintValues ( )

Definition at line 96 of file TGo4ListCond.cxx.

References fxValues.

Referenced by PrintCondition().

◆ RemoveValue()

void TGo4ListCond::RemoveValue ( UInt_t ix)
inline

Definition at line 58 of file TGo4ListCond.h.

References fxValues.

Referenced by TGo4ConditionEditor::CutTable_contextMenuHandler().

◆ Resize()

void TGo4ListCond::Resize ( size_t newsize)
inline

Definition at line 60 of file TGo4ListCond.h.

References fxValues.

Referenced by TGo4ConditionEditor::NPointsSpin_valueChanged().

◆ SetValue()

void TGo4ListCond::SetValue ( UInt_t ix,
Int_t val )
inline

Definition at line 49 of file TGo4ListCond.h.

References fxValues.

Referenced by TGo4ConditionEditor::CutTable_valueChanged().

◆ SetValues() [1/7]

virtual void TGo4Condition::SetValues ( )
inlinevirtual

Set values needed, i.e.

limits for windows or cuts for polygons

Reimplemented from TGo4Condition.

Definition at line 94 of file TGo4Condition.h.

Referenced by TGo4ListCond(), and TGo4ListCond().

◆ SetValues() [2/7]

void TGo4ListCond::SetValues ( const Int_t num,
const Int_t * values )
virtual

Definition at line 46 of file TGo4ListCond.cxx.

References fxValues.

Referenced by TGo4Analysis::MakeListCond(), and TGo4Analysis::MakeListCond().

◆ SetValues() [3/7]

void TGo4ListCond::SetValues ( const Int_t start,
const Int_t stop,
const Int_t step )
virtual

Definition at line 53 of file TGo4ListCond.cxx.

References fxValues.

◆ SetValues() [4/7]

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

Reimplemented from TGo4Condition.

Definition at line 98 of file TGo4Condition.h.

◆ SetValues() [5/7]

virtual void TGo4Condition::SetValues ( Double_t low1,
Double_t up1 )
inlinevirtual

Reimplemented from TGo4Condition.

Definition at line 95 of file TGo4Condition.h.

◆ SetValues() [6/7]

virtual void TGo4Condition::SetValues ( Double_t low1,
Double_t up1,
Double_t low2,
Double_t up2 )
inlinevirtual

Reimplemented from TGo4Condition.

Definition at line 96 of file TGo4Condition.h.

◆ SetValues() [7/7]

virtual void TGo4Condition::SetValues ( TCutG * newcut)
inlinevirtual

Reimplemented from TGo4Condition.

Definition at line 97 of file TGo4Condition.h.

◆ Test() [1/3]

Bool_t TGo4Condition::Test ( )
virtual

Test if condition is true.

Result is returned, the internal counters are set appropriately. Should return fbResult if condition is not enabled. the default is increment test counter and return true.

Reimplemented from TGo4Condition.

Definition at line 88 of file TGo4Condition.cxx.

◆ Test() [2/3]

Bool_t TGo4ListCond::Test ( Double_t value)
overridevirtual

◆ Test() [3/3]

virtual Bool_t TGo4Condition::Test ( Double_t x,
Double_t y )
inlinevirtual

Reimplemented from TGo4Condition.

Definition at line 89 of file TGo4Condition.h.

◆ UpdateFrom()

Bool_t TGo4ListCond::UpdateFrom ( TGo4Condition * cond,
Bool_t counts )
overridevirtual

Copy values from cond to this.

When counts is true, copy also counters.

Reimplemented from TGo4Condition.

Definition at line 109 of file TGo4ListCond.cxx.

References TGo4Condition::TGo4Condition(), TGo4ListCond(), fxValues, GetNumValues(), GetValue(), and TGo4Condition::UpdateFrom().

Field Documentation

◆ fxValues

std::vector<Int_t> TGo4ListCond::fxValues
private

Factory method to generate the subclass implementation for painter TODO: do we need graphical representation of whitelist, e.g.

by set of point markers in working histogram? For the moment, no graphics for list conditions 1-2019

Definition at line 81 of file TGo4ListCond.h.

Referenced by TGo4ListCond(), GetNumValues(), GetValue(), GetXLow(), GetXUp(), InsertValue(), PrintValues(), RemoveValue(), Resize(), SetValue(), SetValues(), SetValues(), Test(), and UpdateFrom().


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