JG ROOT Tools libraries  version 5.0 - august 2014
RObject.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file RObject.hh
3  *
4  * Include file for the class RObject
5  */
6 //======================================================================
7 
8 #ifndef R_OBJECT_HH
9 #define R_OBJECT_HH
10 
11 //======================================================================
12 
13 #include "RBaseFunctions.hh"
14 
15 #include "GNamed.hh"
16 #include "GTreeNodeT.hh"
17 #include "GTreeBranchT.hh"
18 #include "GTreeLeafT.hh"
19 
20 class RObject;
21 
22 
23 /*! GCpp template class instantiated for RObject class.*/
24 typedef GTreeNodeT < RObject > RTreeNodeTObject;
25 
26 /*! GCpp template class instantiated for RObject class.*/
27 typedef GTreeBranchT < RObject > RTreeBranchTObject;
28 
29 /*! GCpp template class instantiated for RObject class.*/
30 typedef GTreeLeafT < RObject > RTreeLeafTObject;
31 
32 /*! GCpp template class instantiated for RObject class.*/
33 typedef GNamedListT < RObject > RListTObject;
34 
35 
36 
37 //======================================================================
38 /*! \class RObject
39  *
40  * Define base class to encapsulate ROOT objects in the GObject
41  * mechanism.
42  * A ROOT object is an object that inherits from the TObject class
43  * of ROOT.
44  */
45 class RObject : public GNamed
46 {
47  //------------------------------------------------------------
48  /*! \object_doc{RObject} */
50  //------------------------------------------------------------
51 
52  protected:
53  TObject * root_object; ///< Pointer to the associate ROOT objet
54 
55  //------------------------------------------------------------
56  // Constructors / affectation / destructor
57  public:
58 
59  RObject ( TObject & obj );
60  RObject ( const RObject &original );
61 
62  virtual ~RObject ( );
63 
64  RObject & operator = ( const RObject &original );
65 
66  //------------------------------------------------------------
67  // Comparison operators
68  bool operator == ( const RObject & obj ); // inline
69 
70  //------------------------------------------------------------
71  const TObject * GetTObjectPtr ( ) const; // inline
72  TObject * GetTObjectPtr ( ); // inline
73  const TObject & GetTObject ( ) const; // inline
74  TObject & GetTObject ( ); // inline
75 
76  //------------------------------------------------------------
77  /*! For ROOT dictionary.*/
78  ClassDef(RObject,0);
79 };
80 
81 //----------------------------------------------------------------------
82 // Inline functions
83 #include "icc/RObject.icc"
84 
85 
86 //======================================================================
87 
88 #endif
GNamedListT< RObject > RListTObject
Definition: RObject.hh:33
Definition: RObject.hh:45
TObject * root_object
Pointer to the associate ROOT objet.
Definition: RObject.hh:53
bool operator==(const RObject &obj)
Definition: RObject.icc:31
GTreeBranchT< RObject > RTreeBranchTObject
Definition: RObject.hh:27
GTreeNodeT< RObject > RTreeNodeTObject
Definition: RObject.hh:20
ClassDef(RObject, 0)
virtual ~RObject()
Definition: RObject.cpp:49
GTreeLeafT< RObject > RTreeLeafTObject
Definition: RObject.hh:30
const TObject * GetTObjectPtr() const
Definition: RObject.icc:11
GObject(RObject)
RObject & operator=(const RObject &original)
Definition: RObject.cpp:38
const TObject & GetTObject() const
Definition: RObject.icc:19
RObject(TObject &obj)
Definition: RObject.cpp:19