Diana Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
QGGraphicalCut Class Reference

Class for graphical cuts. More...

Inheritance diagram for QGGraphicalCut:
QGGraphicalCutBase QGPlot

Public Member Functions

 QGGraphicalCut ()
 Default constructor. More...
 
 QGGraphicalCut (const QGGraphicalCut &)
 Copy constructor. More...
 
virtual ~QGGraphicalCut ()
 Destructor. More...
 
void CopyNameToClipboard () const
 Copy name to clipboard. More...
 
void Create ()
 Create the graphical cut with the mouse. More...
 
void Display ()
 Display the graphical cut. More...
 
void Erase ()
 Erase the graphical cut. More...
 
const char * GetName () const
 Get graphical cut name. More...
 
void HandleCanvasEvent (Int_t event, Int_t px, Int_t py, TObject *selected)
 Handle mouse events in the canvas. More...
 
void SetName (const char *name=0)
 Set graphical cut name. More...
 
void SetProperty (const std::string &key, const std::string &value)
 Set property (used for opening a session) More...
 
void ViewPulses () const
 View pulses. More...
 
- Public Member Functions inherited from QGGraphicalCutBase
 QGGraphicalCutBase ()
 Default constructor. More...
 
 QGGraphicalCutBase (const QGGraphicalCutBase &)
 Copy constructor. More...
 
virtual ~QGGraphicalCutBase ()
 Destructor. More...
 
void SetProperty (const std::string &key, const std::string &value)
 Set property (used for opening a session) More...
 
- Public Member Functions inherited from QGPlot
 QGPlot ()
 Default constructor. More...
 
 QGPlot (const QGPlot &)
 Copy constructor. More...
 
virtual ~QGPlot ()
 Destructor. More...
 
virtual void AddCut (const std::string &cut)
 Add cut. More...
 
virtual void AutoSetStyle ()
 Automatically set the plot style, should be overridden by derived classes. More...
 
virtual void DisplayEditWindow ()
 Display edit window for the plot, should be overridden by derived classes. More...
 
virtual void Duplicate ()
 Duplicate the plot, should be overridden by derived classes. More...
 
virtual void Generate (QChain *chain=0)
 Generate plot from chain of data files, should be overridden by derived classes. More...
 
virtual std::string GeneratePlotName (const std::string &baseName) const
 Generate a name for the plot. More...
 
virtual TCanvas * GetCanvas ()
 Get pointer to the associated canvas. More...
 
virtual QGCanvasWindowGetCanvasWindow () const
 Get pointer to the canvas window to which the plot is associated. More...
 
virtual void GetCanvasWindowFromEditWindow ()
 Get canvas window from edit window. More...
 
virtual const std::vector< std::string > & GetCuts () const
 Get cuts applied to make the plot. More...
 
virtual void GetCutsFromEditWindow ()
 Get cuts from edit window. More...
 
virtual QGPlotEditWindowGetEditWindow ()
 Get pointer to edit window. More...
 
virtual void GetParametersFromEditWindow ()
 Get parameters from edit window, should be overridden by derived classes. More...
 
virtual const std::string & GetXUnits () const
 Get x-axis units. More...
 
virtual const std::string & GetXVariable () const
 Get x-axis variable. More...
 
virtual const std::string & GetYUnits () const
 Get y-axis units. More...
 
virtual const std::string & GetYVariable () const
 Get y-axis variable. More...
 
virtual bool IsNameInUse (const std::string &name) const
 Check whether string is the name of any plot. More...
 
virtual bool IsSuperimposeSet () const
 Return true if plot is set to be superimposed. More...
 
virtual void MakeCutsString ()
 Make cuts string. More...
 
virtual bool NeedsRegeneration () const
 Check whether plot needs to be regenerated. More...
 
virtual void Plot ()
 Plot this in the associated canvas window, generating it if necessary. More...
 
virtual void SetCanvasWindow (QGCanvasWindow *window)
 Set the canvas window to which the plot is associated. More...
 
virtual void SetCuts (const std::vector< std::string > &cuts)
 Set cuts to apply in generating the plot. More...
 
virtual void SetPlotEditWindow (QGPlotEditWindow *window)
 Set plot edit window. More...
 
virtual void SetRegenerate (bool flag=true)
 Set whether the plot needs to be regenerated. More...
 
virtual void SetSuperimpose (bool flag=false)
 Set whether the plot should be superimposed. More...
 
virtual void SetXVariable (const std::string &x)
 Set X-axis variable. More...
 
virtual void SetXUnits (const std::string &units)
 Set X-axis units. More...
 
virtual void SetYVariable (const std::string &y)
 Set Y-axis variable. More...
 
virtual void SetYUnits (const std::string &units)
 Set Y-axis units. More...
 

Private Attributes

Double_t fXLast
 X-coordinate of last selected point. More...
 
Double_t fYLast
 Y-coordinate of last selected point. More...
 

Static Private Attributes

static std::list< QGGraphicalCut * > fGraphicalCuts
 Static list of existing graphical cuts. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QGPlot
static QGPlotGetPlotByName (const std::string &name)
 Get plot by name. More...
 
static const std::list< QGPlot * > & GetPlots ()
 Get collection of plots. More...
 
static void ShowPlotsList ()
 Show plots list. More...
 
- Protected Attributes inherited from QGGraphicalCutBase
Int_t fPoints
 Number of points selected by the mouse. More...
 
Double_t fX0
 X-coordinate of first point. More...
 
Double_t fY0
 Y-coordinate of first point. More...
 
- Protected Attributes inherited from QGPlot
QGCanvasWindowfCanvasWindow
 Canvas window to which plot is associated. More...
 
std::vector< std::string > fCuts
 Cuts applied to make the plot. More...
 
std::string fCutsString
 Cuts in a single string. More...
 
bool fNeedsRegeneration
 Indicates whether plot needs to be regenerated because settings have changed. More...
 
QGPlotEditWindowfPlotEditWindow
 Pointer to plot edit window. More...
 
bool fSuperimpose
 Indicates whether plot should be superimposed on existing plot. More...
 
std::string fXVariable
 X-axis variable. More...
 
std::string fXUnits
 X-axis units. More...
 
std::string fYVariable
 Y-axis variable. More...
 
std::string fYUnits
 Y-axis units. More...
 
- Static Protected Attributes inherited from QGPlot
static std::list< QGPlot * > fPlots
 Collection of pointers to all QGPlots. More...
 

Detailed Description

Class for graphical cuts.

Author
Adam Bryant (adam_.nosp@m.brya.nosp@m.nt@be.nosp@m.rkel.nosp@m.ey.ed.nosp@m.u)

Definition at line 15 of file QGGraphicalCut.hh.

Constructor & Destructor Documentation

◆ QGGraphicalCut() [1/2]

QGGraphicalCut::QGGraphicalCut ( )

Default constructor.

Definition at line 26 of file QGGraphicalCut.cc.

References fGraphicalCuts, and SetName().

◆ QGGraphicalCut() [2/2]

QGGraphicalCut::QGGraphicalCut ( const QGGraphicalCut graphicalCut)

Copy constructor.

Definition at line 34 of file QGGraphicalCut.cc.

References fGraphicalCuts, and SetName().

◆ ~QGGraphicalCut()

QGGraphicalCut::~QGGraphicalCut ( )
virtual

Destructor.

Definition at line 42 of file QGGraphicalCut.cc.

References fGraphicalCuts.

Member Function Documentation

◆ CopyNameToClipboard()

void QGGraphicalCut::CopyNameToClipboard ( ) const

Copy name to clipboard.

Definition at line 49 of file QGGraphicalCut.cc.

References QGCutsFrame::ClearCopiedCuts(), QGCutsFrame::CopyCut(), and GetName().

◆ Create()

void QGGraphicalCut::Create ( )

Create the graphical cut with the mouse.

Definition at line 55 of file QGGraphicalCut.cc.

References QGPlot::GetCanvas().

Referenced by QGPlotIconsFrame::HandleGraphicalCutButton().

◆ Display()

void QGGraphicalCut::Display ( )
virtual

Display the graphical cut.

Reimplemented from QGPlot.

Definition at line 62 of file QGGraphicalCut.cc.

References Draw().

◆ Erase()

void QGGraphicalCut::Erase ( )
virtual

Erase the graphical cut.

Reimplemented from QGPlot.

Definition at line 70 of file QGGraphicalCut.cc.

References QGPlot::fCanvasWindow, QGPlotFrame::GetEmbeddedCanvas(), and QGCanvasWindow::GetPlotFrame().

◆ GetName()

const char * QGGraphicalCut::GetName ( ) const
virtual

Get graphical cut name.

Reimplemented from QGPlot.

Definition at line 79 of file QGGraphicalCut.cc.

Referenced by CopyNameToClipboard(), SetName(), and ViewPulses().

◆ HandleCanvasEvent()

void QGGraphicalCut::HandleCanvasEvent ( Int_t  event,
Int_t  px,
Int_t  py,
TObject *  selected 
)

◆ SetName()

void QGGraphicalCut::SetName ( const char *  name = 0)
virtual

Set graphical cut name.

Reimplemented from QGPlot.

Definition at line 132 of file QGGraphicalCut.cc.

References QGPlot::GeneratePlotName(), GetName(), and QGPlot::IsNameInUse().

Referenced by QGGraphicalCut().

◆ SetProperty()

void QGGraphicalCut::SetProperty ( const std::string &  key,
const std::string &  value 
)
virtual

Set property (used for opening a session)

Reimplemented from QGPlot.

Definition at line 149 of file QGGraphicalCut.cc.

References QGPlot::SetProperty(), and QGGraphicalCutBase::SetProperty().

◆ ViewPulses()

void QGGraphicalCut::ViewPulses ( ) const

Member Data Documentation

◆ fGraphicalCuts

list< QGGraphicalCut * > QGGraphicalCut::fGraphicalCuts
staticprivate

Static list of existing graphical cuts.

Definition at line 55 of file QGGraphicalCut.hh.

Referenced by QGGraphicalCut(), and ~QGGraphicalCut().

◆ fXLast

Double_t QGGraphicalCut::fXLast
private

X-coordinate of last selected point.

Definition at line 58 of file QGGraphicalCut.hh.

Referenced by HandleCanvasEvent().

◆ fYLast

Double_t QGGraphicalCut::fYLast
private

Y-coordinate of last selected point.

Definition at line 61 of file QGGraphicalCut.hh.

Referenced by HandleCanvasEvent().


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