Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

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 ()
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 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 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 *="")

Static Public Member Functions

static void CleanupSpecials ()
static TString NextAvailableName ()

Private Member Functions

TCutG * CloneCut (TGo4PolyCond *source)
TH2 * CreateCutHistogram (TH1 *source)

Private Attributes

TCutG * fxCut

Detailed Description

Definition at line 22 of file TGo4PolyCond.h.


Constructor & Destructor Documentation

TGo4PolyCond::TGo4PolyCond (  ) 

Definition at line 39 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

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

Definition at line 46 of file TGo4PolyCond.cxx.

References TGo4Condition::SetDimension().

TGo4PolyCond::~TGo4PolyCond (  )  [virtual]

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

Referenced by TGo4AnalysisObjectManager::CreateNamesList(), TGo4AnalysisObjectManager::LoadObjects(), TGo4AnalysisObjectManager::SetAnalysisCondition(), 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 112 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 340 of file TGo4PolyCond.cxx.

References fxCut.

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

TGo4ConditionPainter * TGo4PolyCond::CreatePainter (  )  [virtual]

Factory method to generate the subclass implementation for painter

Reimplemented from TGo4Condition.

Definition at line 333 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 305 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 99 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(), projectionX(), projectionY(), and TGo4ConditionEditor::RefreshWidget().

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

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

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

References CreateCutHistogram(), and TGo4Condition::fxCutHis.

Int_t TGo4PolyCond::GetMemorySize (  )  [virtual]

Reimplemented from TGo4Condition.

Definition at line 385 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 263 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 59 of file TGo4PolyCond.cxx.

References fxCut.

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

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

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

References fxCut.

Double_t TGo4PolyCond::GetYLow (  )  [virtual]

minimum extension of polygon in y axis

Reimplemented from TGo4Condition.

Definition at line 76 of file TGo4PolyCond.cxx.

References fxCut.

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

Calculate value for histogram inside condition limits.

Reimplemented from TGo4Condition.

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

References fxCut.

Bool_t TGo4PolyCond::IsPolygonType (  )  [virtual]

Reimplemented from TGo4Condition.

Definition at line 93 of file TGo4PolyCond.cxx.

TString TGo4PolyCond::NextAvailableName (  )  [static]

Definition at line 28 of file TGo4PolyCond.cxx.

Referenced by TGo4ViewPanel::PadClickedSlot(), and SetValues().

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

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

Reimplemented from TGo4Condition.

Definition at line 182 of file TGo4PolyCond.cxx.

References fxCut.

Referenced by 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 401 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 314 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 159 of file TGo4PolyCond.cxx.

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

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 119 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 138 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.

Definition at line 201 of file TGo4PolyCond.cxx.

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


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines