JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RContour.hh>
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) | |
RContour & | operator= (const RContour &ct) |
RContour & | operator= (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 RContourBase * | ContourBase () const |
RContourBase * | ContourBase () |
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 RContour * | NewContourGate (const string &ct_name, const Double_t x1, const Double_t x2) |
static RContour * | NewContourPolygon (const string &ct_name, const UInt_t n, const RPoint2D *pts) |
static RContour * | NewContourPolygon (const string &ct_name, const UInt_t n, const Double_t x[], const Double_t y[]) |
static RContour * | NewContourCircle (const string &ct_name, const RPoint2D ctr, const Double_t r) |
static RContour * | NewContourCircle (const string &ct_name, const Double_t xc, const Double_t yc, const Double_t r) |
static RContour * | NewContourEllipse (const string &ct_name, const Double_t a, const Double_t b) |
static RContour * | NewContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b) |
static RContour * | NewContourEllipse (const string &ct_name, const Double_t a, const Double_t b, const Double_t angle) |
static RContour * | NewContourEllipse (const string &ct_name, const RPoint2D ctr, const Double_t a, const Double_t b, const Double_t angle) |
static RContour * | NewContourEllipse (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 | |
RContourBase * | contour_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) | |
This class defines contour via a pointer to contour properties.
RContour::RContour | ( | const string & | ct_name = "unnamed " | ) |
Default constructor: no contour defined.
ct_name | contour 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.
ct_name | contour name |
ct_base | contour 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.
ct_name | contour name |
ct_base | contour 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.
ct | contour to copy |
ct_name | contour name |
References contour_ptr, CreateObjectList(), GetStatusFlag(), line_att, object_list, and status_flag.
RContour::RContour | ( | const RContour & | ct | ) |
Copy constructor.
ct | contour to copy |
References contour_ptr, CreateObjectList(), GetStatusFlag(), line_att, object_list, and status_flag.
|
virtual |
Destructor.
References contour_ptr, and DeleteObjectList().
|
private |
Macro from GCpp library that defines the following functions:
Affectation operator.
ct | contour to copy |
References contour_ptr, CreateObjectList(), DeleteObjectList(), GetStatusFlag(), line_att, and status_flag.
RContour & RContour::operator= | ( | const RContourBase & | ct_base | ) |
Affectation operator.
ct_base | contour data to copy |
References contour_ptr, CreateObjectList(), DeleteObjectList(), and line_att.
|
static |
Creation of a gate contour.
ct_name | contour name |
x1 | lower limit |
x2 | upper limit |
|
static |
Creation of a polygon contour.
ct_name | contour name |
n | points number |
pts | points array |
|
static |
Creation of a polygon contour.
ct_name | contour name |
n | points number |
x | points X positions array |
y | points Y positions array |
|
static |
Creation of a circle contour.
ct_name | contour name |
ctr | center |
r | radius |
|
static |
Creation of a circle contour.
ct_name | contour name |
xc | center X position |
yc | center Y position |
r | circle radius |
|
static |
Creation of a ellipse contour.
ct_name | contour name |
a | radius along X |
b | radius along Y |
|
static |
Creation of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
a | radius along X |
b | radius along Y |
|
static |
Creation of a ellipse contour.
ct_name | contour name |
a | radius along X before rotation |
b | radius along Y before rotation |
angle | rotation angle |
|
static |
Creation of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
a | radius along X before rotation |
b | radius along Y before rotation |
angle | rotation angle |
|
static |
Creation of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
xa | new axis vector |
yb | new axis vector |
|
static |
Definition of a gate contour.
ct_name | contour name |
x1 | lower limit |
x2 | upper limit |
|
static |
Definition of a polygon contour.
ct_name | contour name |
n | points number |
pts | points array |
|
static |
Definition of a polygon contour.
ct_name | contour name |
n | points number |
x | points X positions array |
y | points Y positions array |
|
static |
Definition of a circle contour.
ct_name | contour name |
ctr | center |
r | radius |
|
static |
Definition of a circle contour.
ct_name | contour name |
xc | center X position |
yc | center Y position |
r | circle radius |
|
static |
Definition of a ellipse contour.
ct_name | contour name |
a | radius along X |
b | radius along Y |
|
static |
Definition of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
a | radius along X |
b | radius along Y |
|
static |
Definition of a ellipse contour.
ct_name | contour name |
a | radius along X before rotation |
b | radius along Y before rotation |
angle | rotation angle |
|
static |
Definition of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
a | radius along X before rotation |
b | radius along Y before rotation |
angle | rotation angle |
|
static |
Definition of a ellipse contour.
ct_name | contour name |
ctr | ellipse center |
xa | new axis vector |
yb | new axis vector |
|
inlinevirtual |
Get the status flag (bit pattern).
References status_flag.
Referenced by operator=(), RContour(), and RGContourEdit::UpdateContour().
|
inlinevirtual |
|
inlinevirtual |
Set status flag selected bits.
flags | mask of selected bits to set |
status | bits value |
References status_flag.
Referenced by RGContourListEdit::SetEditedContour(), RGContourEdit::UpdateContour(), and RGContourListEdit::UpdateContourButton().
|
inlinevirtual |
Check whether a point is inside a contour: for 2D contour, a test is performed, for 1D contour result is always false.
p | point to check |
References RContourBase::CheckPoint(), and contour_ptr.
|
inlinevirtual |
Check whether a value is inside a contour (always false for a 2D contour.
val | value to check |
References RContourBase::CheckValue(), and contour_ptr.
|
inlinevirtual |
Get contour dimension.
References contour_ptr, and RContourBase::Dimension().
|
inlinevirtual |
Return contour type identifier.
References contour_ptr, and RContourBase::Type().
Referenced by RGContourEdit::DrawAssociatedObject(), RGContourEdit::InfoWidgetMap(), RGContourEdit::MovePoint(), RGContourEdit::Request(), RGContourEdit::SetContourType(), RGContourEdit::UpdateContour(), RGContourEdit::UpdateContourInfo(), RGContourEdit::UpdateContourType(), and RGContourEdit::UpdatePointAttr().
|
inlinevirtual |
Return contour type name.
References contour_ptr, and RContourBase::TypeName().
|
inlinevirtual |
Renomme un contour (cette fonction est publique, à la différence de GNamed::SetName).
ct_name | nouveau nom du contour |
Referenced by RGContourEdit::ContourNameChanged().
|
inlinevirtual |
Set X/Y axis inversion for contour.
flip | inversion status |
References contour_ptr, CreateObjectList(), and RContourBase::SetFlipAxis().
|
inlinevirtual |
Get X/Y axis inversion for contour.
References contour_ptr, and RContourBase::GetFlipAxis().
|
inlinevirtual |
Get contour representation line attributes.
References line_att.
Referenced by RGContourEdit::UpdateContour().
|
virtual |
Set line graphical attributes for ROOT objects associated to the contour.
l_att | line attributes |
References line_att, and object_list.
Referenced by RContourList::SetLineAtt(), SetLineAtt(), and RGContourEdit::UpdateContour().
|
inlinevirtual |
Set line graphical attributes for ROOT objects associated to the contour.
c | line color |
s | line style |
w | line width |
References SetLineAtt().
|
virtual |
Draw ROOT objects associated to the contour in current pad.
References object_list.
Referenced by RContourList::Draw(), and DrawCopy().
|
virtual |
Draw a copy of ROOT objects associated to the contour in current pad.
References Draw(), and object_list.
Referenced by RContourList::DrawCopy().
|
virtual |
Delete the list of ROOT objects associated to the contour.
References object_list.
Referenced by CreateObjectList(), operator=(), and ~RContour().
|
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().
|
inlinevirtual |
Get pointer to the list of ROOT associated objects.
References object_list.
|
inlinevirtual |
Get the number of ROOT associated objects.
References object_list.
|
inlinevirtual |
Retourne le pointeur sur un des objets ROOT associé au contour.
References object_list.
Referenced by RGContourEdit::DrawAssociatedObject().
|
inline |
Get pointer on contour base data.
References contour_ptr.
Referenced by RGContourEdit::DrawAssociatedObject(), RGContourEdit::GateCenterButton(), RGContourEdit::GateFlipHVButton(), RGContourEdit::InfoWidgetMap(), RGContourEdit::RGContourEdit(), RGContourEdit::SetContourPoints(), RGContourEdit::UpdateContour(), and RGContourEdit::UpdateContourInfo().
|
inline |
Get pointer on contour base data.
References contour_ptr.
|
virtual |
Write contour in an output C++ stream.
os | output C++ stream |
References contour_ptr, RCONTOUR_ID, and RContourBase::Write().
|
virtual |
Write contour in an output C-style file.
fptr | C-style file pointer |
References contour_ptr, RCONTOUR_ID, and RContourBase::Write().
|
virtual |
Read contour from an input C++ stream, setting new contour data.
is | input C++ stream |
References RContour(), RCONTOUR_ID, and RContourBase::ReadNew().
Referenced by RContourList::Read().
|
virtual |
Read contour from an input C-style file, setting new contour data.
fptr | input C-style file pointer |
References RContour(), RCONTOUR_ID, and RContourBase::ReadNew().
RContour::ClassDef | ( | RContour | , |
0 | |||
) |
For ROOT dictionary.