QwAnalysis
|
A treenode contains the bits that make up a tree pattern. More...
#include <treenode.h>
Public Member Functions | |
treenode (unsigned int size) | |
Default constructor. More... | |
treenode (treenode &node) | |
Copy-constructor from object. More... | |
treenode (treenode *node) | |
Copy-constructor from pointer. More... | |
~treenode () | |
Destructor. More... | |
void | SetNext (treenode *next) |
Set the next node. More... | |
treenode * | GetNext () const |
Get the next node. More... | |
treenode * | next () const |
Get the next node (non-standard notation) More... | |
unsigned int | size () const |
Get size of the bit array. More... | |
void | Print (bool recursive=false, int indent=0) |
Print some debugging information. More... | |
![]() | |
QwObjectCounter () | |
Default constructor. More... | |
QwObjectCounter (const QwObjectCounter &) | |
Copy constructor. More... | |
virtual | ~QwObjectCounter () |
Destructor. More... | |
Data Fields | |
int | fMinLevel |
Minimum level at which this node is valid. More... | |
int | fMaxLevel |
Maximum level at which this node is valid. More... | |
int * | fBit |
Hit pattern, one bin specified per detector layer. More... | |
int | fWidth |
Width in bins of the hit pattern. More... | |
int | fRef |
Reference of this node when writing to file. More... | |
nodenode * | fSon [4] |
Each tree has four son nodes. More... | |
Private Attributes | |
treenode * | fNext |
Link to the next tree node. More... | |
unsigned int | fSize |
Static Private Attributes | |
static int | fDebug = 0 |
Debug level. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const treenode &tn) |
Output stream operator. More... | |
Additional Inherited Members | |
![]() | |
static size_t | GetObjectsCreated () |
Get number of objects ever created. More... | |
static size_t | GetObjectsAlive () |
Get number of objects still alive. More... | |
A treenode contains the bits that make up a tree pattern.
This is the basic element of the tree search database when it is constructed. Each valid track has a corresponding tree node. The minimum and maximum levels of bin division are stored in the treenode.
The array fBit contains the rank of the bit that is active for this track. For example, a track that goes through (simplified) element 2 in layer 1, element 4 in layer 2, element 5 in layer 3, and element 7 in layer 4 will have the following fBit array: [2,4,6,7]. This example track will have a width of 7 - 2 + 1 = 6 (such that the track [2,2,2,2] has a width of 1).
The treenode also has a pointer to its father and a pointer to its son nodenodes. Each following generation of a treenode will have a higher bit resolution.
Definition at line 63 of file treenode.h.
QwTracking::treenode::treenode | ( | unsigned int | size | ) |
Default constructor.
Default constructor
size | Size of the bit pattern |
Definition at line 30 of file treenode.cc.
References fBit, fNext, fSize, fSon, and size().
QwTracking::treenode::treenode | ( | treenode & | node | ) |
Copy-constructor from object.
Copy-constructor from object
node | Original tree node |
Definition at line 46 of file treenode.cc.
References fBit, fNext, fSize, and fSon.
QwTracking::treenode::treenode | ( | treenode * | node | ) |
Copy-constructor from pointer.
Copy-constructor from pointer
node | Pointer to original tree node |
Definition at line 67 of file treenode.cc.
References fBit, fNext, fSize, and fSon.
QwTracking::treenode::~treenode | ( | ) |
Destructor.
Destructor
Definition at line 87 of file treenode.cc.
|
inline |
Get the next node.
Definition at line 112 of file treenode.h.
References fNext.
Referenced by QwTrackingTree::existent(), QwTrackingTree::PrintHashTable(), and QwTrackingTree::~QwTrackingTree().
|
inline |
Get the next node (non-standard notation)
Definition at line 114 of file treenode.h.
References fNext.
Referenced by SetNext().
void QwTracking::treenode::Print | ( | bool | recursive = false , |
int | indent = 0 |
||
) |
Print some debugging information.
Print the entire tree (descending all the way down)
recursive | Flag to enable recursive calls |
indent | Indentation level (for recursive calls) |
Definition at line 104 of file treenode.cc.
References QwLog::endl(), fSon, QwTracking::nodenode::GetTree(), Print(), QwOut, and QwWarning.
Referenced by Print(), and QwTrackingTree::PrintTree().
|
inline |
Set the next node.
Definition at line 105 of file treenode.h.
References QwLog::endl(), fNext, next(), and QwError.
Referenced by QwTrackingTree::_inittree(), and QwTrackingTree::marklin().
|
inline |
Get size of the bit array.
Definition at line 123 of file treenode.h.
References fSize.
Referenced by QwTrackingTree::QwTrackingTree(), and treenode().
|
friend |
Output stream operator.
Stream summary info about the tree node
stream | Stream as lhs of the operator |
tn | Tree node as rhs of the operator |
Definition at line 135 of file treenode.cc.
int* QwTracking::treenode::fBit |
Hit pattern, one bin specified per detector layer.
Definition at line 84 of file treenode.h.
Referenced by QwTrackingTree::_writetree(), QwTrackingTree::consistent(), QwTrackingTree::existent(), QwTrackingTree::marklin(), QwTrackingTree::nodeexists(), QwTracking::operator<<(), QwTrackingTree::QwTrackingTree(), treenode(), and ~treenode().
|
staticprivate |
Debug level.
Definition at line 123 of file treenode.h.
int QwTracking::treenode::fMaxLevel |
Maximum level at which this node is valid.
Definition at line 81 of file treenode.h.
Referenced by QwTrackingTree::marklin(), QwTracking::operator<<(), and QwTrackingTree::QwTrackingTree().
int QwTracking::treenode::fMinLevel |
Minimum level at which this node is valid.
Definition at line 79 of file treenode.h.
Referenced by QwTrackingTree::_writetree(), QwTrackingTree::marklin(), QwTracking::operator<<(), and QwTrackingTree::QwTrackingTree().
|
private |
Link to the next tree node.
Definition at line 100 of file treenode.h.
Referenced by GetNext(), next(), SetNext(), and treenode().
int QwTracking::treenode::fRef |
Reference of this node when writing to file.
Definition at line 90 of file treenode.h.
Referenced by QwTrackingTree::_writetree(), QwTracking::operator<<(), and QwTrackingTree::QwTrackingTree().
|
private |
Definition at line 114 of file treenode.h.
Referenced by QwTracking::operator<<(), size(), and treenode().
nodenode* QwTracking::treenode::fSon[4] |
Each tree has four son nodes.
Definition at line 95 of file treenode.h.
Referenced by QwTrackingTree::_writetree(), QwTrackingTree::marklin(), Print(), treenode(), and ~treenode().
int QwTracking::treenode::fWidth |
Width in bins of the hit pattern.
Definition at line 87 of file treenode.h.
Referenced by QwTrackingTree::_writetree(), QwTrackingTree::marklin(), QwTracking::operator<<(), and QwTrackingTree::QwTrackingTree().