Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4PolyCond Class Reference

#include <TGo4PolyCond.h>

Inheritance diagram for TGo4PolyCond:

TGo4Condition List of all members.

Public Member Functions

 TGo4PolyCond ()
 TGo4PolyCond (const char *name, const char *title="Go4 polygon condition")
virtual ~TGo4PolyCond ()
virtual TGo4ConditionPainterCreatePainter ()
 Factory method to generate the subclass implentation for painter.
virtual void SetPainter (TGo4ConditionPainter *painter)
 Replace default painter of this condition by external one.
virtual void SetValues (Double_t *x, Double_t *y, Int_t len)
 Delete old cut and create a new cut with X,Y values.
virtual void SetValues (TCutG *newcut)
 Delete old cut and create new one by cloning newcut.
void SetValuesDirect (TCutG *newcut)
 Delete old cut and get ownership over newcut.
virtual Bool_t Test (Double_t x, Double_t y)
 Test if X,Y are inside.
virtual Double_t GetXLow ()
 minimum extension of polygon in x axis
virtual Double_t GetXUp ()
 maximum extension of polygon in x axis
virtual Double_t GetYLow ()
 minimum extension of polygon in y axis
virtual Double_t GetYUp ()
 maximum extension of polygon in y axis
TCutG * GetCut (Bool_t changeowner)
 Used to return the cut pointer of a TGo4PolyCond.
void PrintCondition (Bool_t points)
 Printout values.
Bool_t UpdateFrom (TGo4Condition *cond, Bool_t counts)
 Copy values from cond to this.
virtual Double_t GetIntegral (TH1 *histo, Option_t *opt="")
 Calculate value for histogram inside condition limits.
virtual Double_t GetMean (TH1 *histo, Int_t axis=1)
 Calculate value for histogram inside condition limits.
virtual Double_t GetRMS (TH1 *histo, Int_t axis=1)
 Calculate value for histogram inside condition limits.
virtual Double_t GetXMax (TH1 *histo)
 Calculate value for histogram inside condition limits.
virtual Double_t GetYMax (TH1 *histo)
 Calculate value for histogram inside condition limits.
virtual Double_t GetCMax (TH1 *histo)
 Calculate value for histogram inside condition limits.
virtual Bool_t IsPolygonType ()
virtual Int_t GetMemorySize ()

Static Public Member Functions

static void CleanupSpecials ()
 Remove all references to any TCutGs from ROOT list of specials.
static TString NextAvailableName ()

Private Member Functions

TCutG * CloneCut (TGo4PolyCond *source)
 Returns pointer to a cloned cut from source.
TH2 * CreateCutHistogram (TH1 *source)
 Create clone of source histogram that only has contents for bins inside the current TCutG.

Private Attributes

TCutG * fxCut
 Cut pointer.

Constructor & Destructor Documentation

TGo4PolyCond::TGo4PolyCond  ) 
 

Definition at line 41 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

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

Definition at line 48 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

TGo4PolyCond::~TGo4PolyCond  )  [virtual]
 

Definition at line 55 of file TGo4PolyCond.cxx.

References fxCut.


Member Function Documentation

TGo4ConditionPainter * TGo4PolyCond::CreatePainter  )  [virtual]
 

Factory method to generate the subclass implentation for painter.

Reimplemented from TGo4Condition.

Definition at line 330 of file TGo4PolyCond.cxx.

References TGo4ConditionPainter::SetCondition().

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

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

Referenced by TGo4AnalysisObjectManager::MakePolyCond(), TXXXProc::TXXXProc(), TXXXUnpackProc::TXXXUnpackProc(), TYYYUnpackProc::TYYYUnpackProc(), 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 121 of file TGo4PolyCond.cxx.

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

void TGo4PolyCond::SetValuesDirect TCutG *  newcut  ) 
 

Delete old cut and get ownership over newcut.

Definition at line 140 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::fxCutHis.

Bool_t TGo4PolyCond::Test Double_t  x,
Double_t  y
[virtual]
 

Test if X,Y are inside.

Reimplemented from TGo4Condition.

Definition at line 171 of file TGo4PolyCond.cxx.

References TGo4Condition::FixedResult(), fxCut, TGo4Condition::IncCounts(), TGo4Condition::IncTrueCounts(), TGo4Condition::IsEnabled(), TGo4Condition::IsFalse(), and TGo4Condition::IsTrue().

Referenced by TXXXProc::BuildEvent(), and TXXXUnpackProc::XXXUnpack().

Double_t TGo4PolyCond::GetXLow  )  [virtual]
 

minimum extension of polygon in x axis

Reimplemented from TGo4Condition.

Definition at line 61 of file TGo4PolyCond.cxx.

References fxCut.

Double_t TGo4PolyCond::GetXUp  )  [virtual]
 

maximum extension of polygon in x axis

Reimplemented from TGo4Condition.

Definition at line 70 of file TGo4PolyCond.cxx.

References fxCut.

Double_t TGo4PolyCond::GetYLow  )  [virtual]
 

minimum extension of polygon in y axis

Reimplemented from TGo4Condition.

Definition at line 78 of file TGo4PolyCond.cxx.

References fxCut.

Double_t TGo4PolyCond::GetYUp  )  [virtual]
 

maximum extension of polygon in y axis

Reimplemented from TGo4Condition.

Definition at line 86 of file TGo4PolyCond.cxx.

References fxCut.

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

References fxCut, and TGo4Condition::fxCutHis.

Referenced by CloneCut(), TGo4PolyCondView::IsCutChanged(), TGo4PolyCondPainter::PaintCondition(), and TGo4ConditionPainter::PaintLabel().

void TGo4PolyCond::PrintCondition Bool_t  points  )  [virtual]
 

Printout values.

If points is true, printout polygon points.

Reimplemented from TGo4Condition.

Definition at line 184 of file TGo4PolyCond.cxx.

References fxCut, and TGo4Condition::PrintCondition().

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

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.

Definition at line 202 of file TGo4PolyCond.cxx.

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

Double_t TGo4PolyCond::GetIntegral TH1 *  histo,
Option_t *  opt = ""
[virtual]
 

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 232 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 252 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetRMS TH1 *  histo,
Int_t  axis = 1
[virtual]
 

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 260 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetXMax TH1 *  histo  )  [virtual]
 

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 268 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetYMax TH1 *  histo  )  [virtual]
 

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 285 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Double_t TGo4PolyCond::GetCMax TH1 *  histo  )  [virtual]
 

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

Definition at line 302 of file TGo4PolyCond.cxx.

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Bool_t TGo4PolyCond::IsPolygonType  )  [virtual]
 

Reimplemented from TGo4Condition.

Definition at line 95 of file TGo4PolyCond.cxx.

Int_t TGo4PolyCond::GetMemorySize  )  [virtual]
 

Reimplemented from TGo4Condition.

Definition at line 382 of file TGo4PolyCond.cxx.

References fxCut.

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

Referenced by TGo4AnalysisObjectManager::CreateNamesList(), TGo4AnalysisObjectManager::LoadObjects(), TGo4AnalysisObjectManager::SetAnalysisCondition(), TGo4PolyCondView::UpdateCondition(), and UpdateFrom().

TString TGo4PolyCond::NextAvailableName  )  [static]
 

Definition at line 30 of file TGo4PolyCond.cxx.

Referenced by SetValues().

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

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

References fxCut.

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


Member Data Documentation

TCutG* TGo4PolyCond::fxCut [private]
 

Cut pointer.

Definition at line 127 of file TGo4PolyCond.h.

Referenced by CreateCutHistogram(), GetCut(), GetIntegral(), GetMemorySize(), GetXLow(), GetXUp(), GetYLow(), GetYUp(), PrintCondition(), SetValues(), SetValuesDirect(), Test(), UpdateFrom(), and ~TGo4PolyCond().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:01:08 2008 for Go4-v3.04-1 by  doxygen 1.4.2