JG ROOT Tools libraries  version 5.0 - august 2014
RContour Class Reference

#include <RContour.hh>

Inheritance diagram for RContour:

Public Types

enum  CTypes {
  typeGate = 0, typeEllipse = 10, typeCircle = 11, typePolygon = 20,
  typeUndefined = -1
}
 < Contour types identifiers
 

Public Member Functions

 RContour (const string &ct_name="unnamed ")
 
 RContour (const string &ct_name, const RContourBase &ct_base)
 
 RContour (const string &ct_name, RContourBase *ct_base)
 
 RContour (const RContour &ct, const string &ct_name)
 
 RContour (const RContour &ct)
 
RContouroperator= (const RContour &ct)
 
RContouroperator= (const RContourBase &ct_base)
 
virtual ~RContour ()
 
virtual u_int GetStatusFlag () const
 
virtual u_int GetStatusBits (u_int flags) const
 
virtual void SetStatusBits (u_int flags, bool status=true)
 
virtual bool CheckPoint (const RPoint2D &p) const
 
virtual bool CheckValue (const Double_t val) const
 
virtual Int_t Dimension () const
 
virtual Int_t Type () const
 
virtual string TypeName () const
 
virtual void Rename (const string &ct_name)
 
virtual void SetFlipAxis (const bool flip=true)
 
virtual bool GetFlipAxis () const
 
virtual TAttLine GetLineAtt () const
 
virtual void SetLineAtt (const TAttLine l_att)
 
virtual void SetLineAtt (Color_t c, Style_t s=1, Width_t w=1)
 
virtual void Draw ()
 
virtual void DrawCopy ()
 
virtual void DeleteObjectList ()
 
virtual void CreateObjectList ()
 
virtual TList * GetObjectList () const
 
virtual Int_t GetObjectNum () const
 
virtual TObject * GetObject (const Int_t n) const
 
const RContourBaseContourBase () const
 
RContourBaseContourBase ()
 
virtual bool Write (ostream &os) const
 
virtual bool Write (FILE *fptr) const
 
virtual bool Read (istream &is)
 
virtual bool Read (FILE *fptr)
 
 ClassDef (RContour, 0)
 

Static Public Member Functions

static RContourNewContourGate (const string &ct_name, const Double_t x1, const Double_t x2)
 
static RContourNewContourPolygon (const string &ct_name, const UInt_t n, const RPoint2D *pts)
 
static RContourNewContourPolygon (const string &ct_name, const UInt_t n, const Double_t x[], const Double_t y[])
 
static RContourNewContourCircle (const string &ct_name, const RPoint2D ctr, const Double_t r)
 
static RContourNewContourCircle (const string &ct_name, const Double_t xc, const Double_t yc, const Double_t r)
 
static RContourNewContourEllipse (const string &ct_name, const Double_t a, const Double_t b)
 
static RContourNewContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b)
 
static RContourNewContourEllipse (const string &ct_name, const Double_t a, const Double_t b, const Double_t angle)
 
static RContourNewContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b, const Double_t angle)
 
static RContourNewContourEllipse (const string &ct_name, const RPoint2D ctr, const RVector2D xa, const RVector2D yb)
 
static RContour ContourGate (const string &ct_name, const Double_t x1, const Double_t x2)
 
static RContour ContourPolygon (const string &ct_name, const UInt_t n, const RPoint2D *pts)
 
static RContour ContourPolygon (const string &ct_name, const UInt_t n, const Double_t x[], const Double_t y[])
 
static RContour ContourCircle (const string &ct_name, const RPoint2D ctr, const Double_t r)
 
static RContour ContourCircle (const string &ct_name, const Double_t xc, const Double_t yc, const Double_t r)
 
static RContour ContourEllipse (const string &ct_name, const Double_t a, const Double_t b)
 
static RContour ContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b)
 
static RContour ContourEllipse (const string &ct_name, const Double_t a, const Double_t b, const Double_t angle)
 
static RContour ContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b, const Double_t angle)
 
static RContour ContourEllipse (const string &ct_name, const RPoint2D ctr, const RVector2D xa, const RVector2D yb)
 

Protected Attributes

RContourBasecontour_ptr
 Pointer to contour properties.
 
u_int status_flag
 Status bit pattern.
 
TList * object_list
 Pointer to ROOT graphical objects for display.
 
TAttLine line_att
 Line attributes for display.
 

Private Member Functions

 GObject (RContour)
 

Detailed Description

This class defines contour via a pointer to contour properties.

Constructor & Destructor Documentation

RContour::RContour ( const string &  ct_name = "unnamed ")

Default constructor: no contour defined.

Parameters
ct_namecontour name

References contour_ptr, line_att, object_list, and status_flag.

Referenced by Read().

RContour::RContour ( const string &  ct_name,
const RContourBase ct_base 
)

Constructor from contour data: the RContourBase object is cloned.

Parameters
ct_namecontour name
ct_basecontour data

References contour_ptr, CreateObjectList(), line_att, object_list, and status_flag.

RContour::RContour ( const string &  ct_name,
RContourBase ct_base 
)

Constructor from contour data: the RContourBase pointer is adopted.

Parameters
ct_namecontour name
ct_basecontour data pointer

References contour_ptr, CreateObjectList(), line_att, object_list, and status_flag.

RContour::RContour ( const RContour ct,
const string &  ct_name 
)

Copy constructor. If ct_name = "", the contour name is copied, else a new name is given.

Parameters
ctcontour to copy
ct_namecontour name

References contour_ptr, CreateObjectList(), GetStatusFlag(), line_att, object_list, and status_flag.

RContour::RContour ( const RContour ct)

Copy constructor.

Parameters
ctcontour to copy

References contour_ptr, CreateObjectList(), GetStatusFlag(), line_att, object_list, and status_flag.

RContour::~RContour ( )
virtual

Destructor.

References contour_ptr, and DeleteObjectList().

Member Function Documentation

RContour::GObject ( RContour  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
RContour & RContour::operator= ( const RContour ct)

Affectation operator.

Parameters
ctcontour to copy

References contour_ptr, CreateObjectList(), DeleteObjectList(), GetStatusFlag(), line_att, and status_flag.

RContour & RContour::operator= ( const RContourBase ct_base)

Affectation operator.

Parameters
ct_basecontour data to copy

References contour_ptr, CreateObjectList(), DeleteObjectList(), and line_att.

RContour * RContour::NewContourGate ( const string &  ct_name,
const Double_t  x1,
const Double_t  x2 
)
static

Creation of a gate contour.

Parameters
ct_namecontour name
x1lower limit
x2upper limit
RContour * RContour::NewContourPolygon ( const string &  ct_name,
const UInt_t  n,
const RPoint2D pts 
)
static

Creation of a polygon contour.

Parameters
ct_namecontour name
npoints number
ptspoints array
RContour * RContour::NewContourPolygon ( const string &  ct_name,
const UInt_t  n,
const Double_t  x[],
const Double_t  y[] 
)
static

Creation of a polygon contour.

Parameters
ct_namecontour name
npoints number
xpoints X positions array
ypoints Y positions array
RContour * RContour::NewContourCircle ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  r 
)
static

Creation of a circle contour.

Parameters
ct_namecontour name
ctrcenter
rradius
RContour * RContour::NewContourCircle ( const string &  ct_name,
const Double_t  xc,
const Double_t  yc,
const Double_t  r 
)
static

Creation of a circle contour.

Parameters
ct_namecontour name
xccenter X position
yccenter Y position
rcircle radius
RContour * RContour::NewContourEllipse ( const string &  ct_name,
const Double_t  a,
const Double_t  b 
)
static

Creation of a ellipse contour.

Parameters
ct_namecontour name
aradius along X
bradius along Y
RContour * RContour::NewContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  a,
const Double_t  b 
)
static

Creation of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
aradius along X
bradius along Y
RContour * RContour::NewContourEllipse ( const string &  ct_name,
const Double_t  a,
const Double_t  b,
const Double_t  angle 
)
static

Creation of a ellipse contour.

Parameters
ct_namecontour name
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContour * RContour::NewContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  a,
const Double_t  b,
const Double_t  angle 
)
static

Creation of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContour * RContour::NewContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const RVector2D  xa,
const RVector2D  yb 
)
static

Creation of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
xanew axis vector
ybnew axis vector
RContour RContour::ContourGate ( const string &  ct_name,
const Double_t  x1,
const Double_t  x2 
)
static

Definition of a gate contour.

Parameters
ct_namecontour name
x1lower limit
x2upper limit
RContour RContour::ContourPolygon ( const string &  ct_name,
const UInt_t  n,
const RPoint2D pts 
)
static

Definition of a polygon contour.

Parameters
ct_namecontour name
npoints number
ptspoints array
RContour RContour::ContourPolygon ( const string &  ct_name,
const UInt_t  n,
const Double_t  x[],
const Double_t  y[] 
)
static

Definition of a polygon contour.

Parameters
ct_namecontour name
npoints number
xpoints X positions array
ypoints Y positions array
RContour RContour::ContourCircle ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  r 
)
static

Definition of a circle contour.

Parameters
ct_namecontour name
ctrcenter
rradius
RContour RContour::ContourCircle ( const string &  ct_name,
const Double_t  xc,
const Double_t  yc,
const Double_t  r 
)
static

Definition of a circle contour.

Parameters
ct_namecontour name
xccenter X position
yccenter Y position
rcircle radius
RContour RContour::ContourEllipse ( const string &  ct_name,
const Double_t  a,
const Double_t  b 
)
static

Definition of a ellipse contour.

Parameters
ct_namecontour name
aradius along X
bradius along Y
RContour RContour::ContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  a,
const Double_t  b 
)
static

Definition of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
aradius along X
bradius along Y
RContour RContour::ContourEllipse ( const string &  ct_name,
const Double_t  a,
const Double_t  b,
const Double_t  angle 
)
static

Definition of a ellipse contour.

Parameters
ct_namecontour name
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContour RContour::ContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const Double_t  a,
const Double_t  b,
const Double_t  angle 
)
static

Definition of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContour RContour::ContourEllipse ( const string &  ct_name,
const RPoint2D  ctr,
const RVector2D  xa,
const RVector2D  yb 
)
static

Definition of a ellipse contour.

Parameters
ct_namecontour name
ctrellipse center
xanew axis vector
ybnew axis vector
u_int RContour::GetStatusFlag ( ) const
inlinevirtual

Get the status flag (bit pattern).

References status_flag.

Referenced by operator=(), RContour(), and RGContourEdit::UpdateContour().

u_int RContour::GetStatusBits ( u_int  flags) const
inlinevirtual

Get selected bits value from the status flag.

Parameters
flagsbits mask

References status_flag.

void RContour::SetStatusBits ( u_int  flags,
bool  status = true 
)
inlinevirtual

Set status flag selected bits.

Parameters
flagsmask of selected bits to set
statusbits value

References status_flag.

Referenced by RGContourListEdit::SetEditedContour(), RGContourEdit::UpdateContour(), and RGContourListEdit::UpdateContourButton().

bool RContour::CheckPoint ( const RPoint2D p) const
inlinevirtual

Check whether a point is inside a contour: for 2D contour, a test is performed, for 1D contour result is always false.

Parameters
ppoint to check

References RContourBase::CheckPoint(), and contour_ptr.

bool RContour::CheckValue ( const Double_t  val) const
inlinevirtual

Check whether a value is inside a contour (always false for a 2D contour.

Parameters
valvalue to check

References RContourBase::CheckValue(), and contour_ptr.

Int_t RContour::Dimension ( ) const
inlinevirtual

Get contour dimension.

References contour_ptr, and RContourBase::Dimension().

string RContour::TypeName ( ) const
inlinevirtual

Return contour type name.

References contour_ptr, and RContourBase::TypeName().

void RContour::Rename ( const string &  ct_name)
inlinevirtual

Renomme un contour (cette fonction est publique, à la différence de GNamed::SetName).

Parameters
ct_namenouveau nom du contour

Referenced by RGContourEdit::ContourNameChanged().

void RContour::SetFlipAxis ( const bool  flip = true)
inlinevirtual

Set X/Y axis inversion for contour.

Parameters
flipinversion status

References contour_ptr, CreateObjectList(), and RContourBase::SetFlipAxis().

bool RContour::GetFlipAxis ( ) const
inlinevirtual

Get X/Y axis inversion for contour.

References contour_ptr, and RContourBase::GetFlipAxis().

TAttLine RContour::GetLineAtt ( ) const
inlinevirtual

Get contour representation line attributes.

References line_att.

Referenced by RGContourEdit::UpdateContour().

void RContour::SetLineAtt ( const TAttLine  l_att)
virtual

Set line graphical attributes for ROOT objects associated to the contour.

Parameters
l_attline attributes

References line_att, and object_list.

Referenced by RContourList::SetLineAtt(), SetLineAtt(), and RGContourEdit::UpdateContour().

void RContour::SetLineAtt ( Color_t  c,
Style_t  s = 1,
Width_t  w = 1 
)
inlinevirtual

Set line graphical attributes for ROOT objects associated to the contour.

Parameters
cline color
sline style
wline width

References SetLineAtt().

void RContour::Draw ( )
virtual

Draw ROOT objects associated to the contour in current pad.

References object_list.

Referenced by RContourList::Draw(), and DrawCopy().

void RContour::DrawCopy ( )
virtual

Draw a copy of ROOT objects associated to the contour in current pad.

References Draw(), and object_list.

Referenced by RContourList::DrawCopy().

void RContour::DeleteObjectList ( )
virtual

Delete the list of ROOT objects associated to the contour.

References object_list.

Referenced by CreateObjectList(), operator=(), and ~RContour().

void RContour::CreateObjectList ( )
virtual

Creation of associated ROOT objects list, stored in the contour. Protection bits of the objects are set so that they may not be deleted from outside the contour.

References contour_ptr, RContourBase::CreateObjectList(), DeleteObjectList(), line_att, and object_list.

Referenced by RGContourEdit::DrawAssociatedObject(), operator=(), RContour(), SetFlipAxis(), and RGContourEdit::UpdateContour().

TList * RContour::GetObjectList ( ) const
inlinevirtual

Get pointer to the list of ROOT associated objects.

References object_list.

Int_t RContour::GetObjectNum ( ) const
inlinevirtual

Get the number of ROOT associated objects.

References object_list.

TObject * RContour::GetObject ( const Int_t  n) const
inlinevirtual

Retourne le pointeur sur un des objets ROOT associé au contour.

References object_list.

Referenced by RGContourEdit::DrawAssociatedObject().

RContourBase * RContour::ContourBase ( )
inline

Get pointer on contour base data.

References contour_ptr.

bool RContour::Write ( ostream &  os) const
virtual

Write contour in an output C++ stream.

Parameters
osoutput C++ stream

References contour_ptr, RCONTOUR_ID, and RContourBase::Write().

bool RContour::Write ( FILE *  fptr) const
virtual

Write contour in an output C-style file.

Parameters
fptrC-style file pointer

References contour_ptr, RCONTOUR_ID, and RContourBase::Write().

bool RContour::Read ( istream &  is)
virtual

Read contour from an input C++ stream, setting new contour data.

Parameters
isinput C++ stream

References RContour(), RCONTOUR_ID, and RContourBase::ReadNew().

Referenced by RContourList::Read().

bool RContour::Read ( FILE *  fptr)
virtual

Read contour from an input C-style file, setting new contour data.

Parameters
fptrinput C-style file pointer

References RContour(), RCONTOUR_ID, and RContourBase::ReadNew().

RContour::ClassDef ( RContour  ,
 
)

For ROOT dictionary.


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