JG ROOT Tools libraries  version 5.0 - august 2014
RPointMark.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file RPointMark.hh
3  *
4  * Include file for class RPointMark.
5  */
6 //======================================================================
7 
8 #ifndef R_POINT_MARK_HH
9 #define R_POINT_MARK_HH
10 
11 #include "RBaseFunctions.hh"
12 
13 #include <TMarker.h>
14 #include <TPoints.h>
15 #include <RQ_OBJECT.h>
16 #include <math.h>
17 
18 #include "RVector2D.hh"
19 
20 //======================================================================
21 /*! \class RPointMark
22  *
23  * Class adding functions to TMarker ROOT class.
24  *
25  * The following signals are added:
26  * - deleted()
27  */
28 
29 class RPointMark : public TMarker
30 {
31  //------------------------------------------------------------
32  RQ_OBJECT("RPointMark")
33  //------------------------------------------------------------
34  /*! \object_doc{RPointMark} */
36  //------------------------------------------------------------
37 
38  protected:
39  bool root_events_flag; ///< Defines pad events processing by ROOT
40 
41  //------------------------------------------------------------
42  // Constructors / affectation / destructor
43 
44  public:
45  // constructors
46  RPointMark ();
47  RPointMark ( const double x, const double y, const Int_t m = 20 );
48  RPointMark ( const double p[], const Int_t m = 20 );
49  RPointMark ( const RPoint2D &p, const Int_t m = 20 );
50  RPointMark ( const TMarker &p );
51  RPointMark ( const RPointMark &p );
52 
53  // affectation
54  RPointMark & operator = ( const RPointMark &p );
55  RPointMark & operator = ( const TMarker &p );
56 
57  // destructor.
58  virtual ~RPointMark ( ); // inline
59 
60  // cast operator
61  virtual operator RPoint2D ( void ) const; // inline
62 
63  //------------------------------------------------------------
64  // Access to members
65 
66  Double_t X( ) const; // inline
67  Double_t Y( ) const; // inline
68 
69  Double_t operator [] ( const u_int n ) const;
70 
71 //----------------------------------------------------------------------
72 // OPERATIONS
73 
74  double DistanceTo ( const double x, const double y );
75  double DistanceTo ( const TPoints &p );
76  double DistanceTo ( const TMarker &p );
77 
78 //----------------------------------------------------------------------
79 // MESSAGES DES OBJETS GRAPHIQUES
80 
81  virtual void SetRootEvents ( Bool_t flag = kTRUE );
82  virtual void ExecuteEvent ( Int_t event, Int_t px, Int_t py );
83 
84  // Signal sent at point deletion
85  virtual void Deleted ();
86 
87  //------------------------------------------------------------
88  /*! For ROOT dictionary.*/
90 };
91 
92 //----------------------------------------------------------------------
93 // Inline functions
94 #include "icc/RPointMark.icc"
95 
96 //======================================================================
97 #endif
Double_t operator[](const u_int n) const
Definition: RPointMark.cpp:45
virtual void Deleted()
Definition: RPointMark.icc:81
bool root_events_flag
Defines pad events processing by ROOT.
Definition: RPointMark.hh:39
virtual ~RPointMark()
Definition: RPointMark.icc:53
ClassDef(RPointMark, 0)
Double_t Y() const
Definition: RPointMark.icc:62
GObject(RPointMark)
RPointMark()
Definition: RPointMark.icc:13
virtual void SetRootEvents(Bool_t flag=kTRUE)
Definition: RPointMark.icc:77
RVector2D RPoint2D
Definition: RVector2D.hh:104
Definition: RVector2D.hh:26
Definition: RPointMark.hh:29
double DistanceTo(const double x, const double y)
Definition: RPointMark.cpp:63
RPointMark & operator=(const RPointMark &p)
Definition: RPointMark.cpp:20
Double_t X() const
Definition: RPointMark.icc:59
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition: RPointMark.cpp:99