QwAnalysis
QwTracking::nodenode Class Reference

A nodenode is used as a pointer which links treenodes to their siblings. More...

#include <nodenode.h>

+ Inheritance diagram for QwTracking::nodenode:
+ Collaboration diagram for QwTracking::nodenode:

Public Member Functions

 nodenode (nodenode *next=0, treenode *tree=0)
 Constructor with next and tree pointers. More...
 
 ~nodenode ()
 Destructor. More...
 
void SetTree (treenode *tree)
 Set the tree. More...
 
treenodeGetTree () const
 Get the tree. More...
 
void SetNext (nodenode *next)
 Set the next node. More...
 
nodenodeGetNext () const
 Get the next node. More...
 
nodenodenext () const
 Get the next node (non-standard notation) More...
 
- Public Member Functions inherited from QwObjectCounter< nodenode >
 QwObjectCounter ()
 Default constructor. More...
 
 QwObjectCounter (const QwObjectCounter &)
 Copy constructor. More...
 
virtual ~QwObjectCounter ()
 Destructor. More...
 

Private Attributes

nodenodefNext
 Pointer to the next node. More...
 
treenodefTree
 Pointer to the next tree. More...
 

Static Private Attributes

static int fDebug = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from QwObjectCounter< nodenode >
static size_t GetObjectsCreated ()
 Get number of objects ever created. More...
 
static size_t GetObjectsAlive ()
 Get number of objects still alive. More...
 

Detailed Description

A nodenode is used as a pointer which links treenodes to their siblings.

Together with the treenode, any tree pattern can be related to any of its family members. This allows the tree search algorithms to quickly move through the database to identify matching patterns.

Definition at line 42 of file nodenode.h.

Constructor & Destructor Documentation

QwTracking::nodenode::nodenode ( nodenode next = 0,
treenode tree = 0 
)

Constructor with next and tree pointers.

Constructor with next and tree pointers

Parameters
nextPointer to the next node in the linked list
treePointer to the next tree for this node

Definition at line 31 of file nodenode.cc.

References fNext, fTree, and next().

32 {
33  // Initialize pointers
34  fNext = next;
35  fTree = tree;
36 }
treenode * fTree
Pointer to the next tree.
Definition: nodenode.h:56
nodenode * fNext
Pointer to the next node.
Definition: nodenode.h:54
nodenode * next() const
Get the next node (non-standard notation)
Definition: nodenode.h:78

+ Here is the call graph for this function:

QwTracking::nodenode::~nodenode ( )

Destructor.

Destructor

Definition at line 42 of file nodenode.cc.

References fNext.

43 {
44  // Delete the pointer to the next node
45  if (fNext) delete fNext;
46 }
nodenode * fNext
Pointer to the next node.
Definition: nodenode.h:54

Member Function Documentation

nodenode* QwTracking::nodenode::GetNext ( ) const
inline

Get the next node.

Definition at line 76 of file nodenode.h.

References fNext.

Referenced by QwTrackingTree::nodeexists().

76 { return fNext; };
nodenode * fNext
Pointer to the next node.
Definition: nodenode.h:54

+ Here is the caller graph for this function:

treenode* QwTracking::nodenode::GetTree ( ) const
inline

Get the tree.

Definition at line 66 of file nodenode.h.

References fTree.

Referenced by QwTrackingTree::_writetree(), QwTrackingTree::nodeexists(), and QwTracking::treenode::Print().

66 { return fTree; };
treenode * fTree
Pointer to the next tree.
Definition: nodenode.h:56

+ Here is the caller graph for this function:

nodenode* QwTracking::nodenode::next ( ) const
inline

Get the next node (non-standard notation)

Definition at line 78 of file nodenode.h.

References fNext.

Referenced by QwTrackingTree::_writetree(), nodenode(), and SetNext().

78 { return fNext; };
nodenode * fNext
Pointer to the next node.
Definition: nodenode.h:54

+ Here is the caller graph for this function:

void QwTracking::nodenode::SetNext ( nodenode next)
inline

Set the next node.

Definition at line 69 of file nodenode.h.

References QwLog::endl(), fNext, next(), and QwError.

Referenced by QwTrackingTree::marklin().

69  {
70  if (next == this) {
71  QwError << "Trying to link next to self" << QwLog::endl; return;
72  }
73  fNext = next;
74  };
nodenode * fNext
Pointer to the next node.
Definition: nodenode.h:54
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
nodenode * next() const
Get the next node (non-standard notation)
Definition: nodenode.h:78
#define QwError
Predefined log drain for errors.
Definition: QwLog.h:40

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwTracking::nodenode::SetTree ( treenode tree)
inline

Set the tree.

Definition at line 61 of file nodenode.h.

References QwLog::endl(), fTree, and QwError.

Referenced by QwTrackingTree::marklin().

61  {
62  fTree = tree;
63  if (! tree) QwError << "Trying to assign null tree pointer" << QwLog::endl;
64  };
treenode * fTree
Pointer to the next tree.
Definition: nodenode.h:56
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
#define QwError
Predefined log drain for errors.
Definition: QwLog.h:40

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

int QwTracking::nodenode::fDebug = 0
staticprivate

Definition at line 78 of file nodenode.h.

nodenode* QwTracking::nodenode::fNext
private

Pointer to the next node.

Definition at line 54 of file nodenode.h.

Referenced by GetNext(), next(), nodenode(), SetNext(), and ~nodenode().

treenode* QwTracking::nodenode::fTree
private

Pointer to the next tree.

Definition at line 56 of file nodenode.h.

Referenced by GetTree(), nodenode(), and SetTree().


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