QwAnalysis
|
Similar to a treenode. More...
#include <shorttree.h>
Public Member Functions | |
shorttree (unsigned int size=fDefaultSize) | |
Default constructor. More... | |
~shorttree () | |
Destructor. 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... | |
Static Public Member Functions | |
static void | SetDefaultSize (unsigned int size) |
Set the default size for short trees. More... | |
![]() | |
static size_t | GetObjectsCreated () |
Get number of objects ever created. More... | |
static size_t | GetObjectsAlive () |
Get number of objects still alive. More... | |
Data Fields | |
int | fMinLevel |
Minimum 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... | |
shortnode * | son [4] |
Each tree has four son nodes. More... | |
Private Attributes | |
unsigned int | fSize |
Static Private Attributes | |
static unsigned int | fDefaultSize = MAX_LAYERS |
Default size. More... | |
static int | fDebug = 0 |
Debug level. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const shorttree &st) |
Output stream operator. More... | |
Similar to a treenode.
A shorttree is basically the same as a treenode. It contains the minimum level of bin division where the bit pattern is valid, the bit pattern in the array fBit, and the width of the pattern.
The difference with the treenode is that there is only a link fSon to the son nodes, no link to the next shorttree. This is because a shorttree is read from file and reconstructing that linkage information is expensive, and not necessary.
Definition at line 44 of file shorttree.h.
QwTracking::shorttree::shorttree | ( | unsigned int | size = fDefaultSize | ) |
Default constructor.
Default constructor, initializes the son pointer to null
size | Size of the bit pattern |
Definition at line 37 of file shorttree.cc.
References fBit, fSize, size(), and son.
QwTracking::shorttree::~shorttree | ( | ) |
Destructor.
Destructor deletes the memory occupied by the sons
Definition at line 52 of file shorttree.cc.
References fBit.
void QwTracking::shorttree::Print | ( | bool | recursive = false , |
int | indent = 0 |
||
) |
Print some debugging information.
Print some debugging information
Definition at line 61 of file shorttree.cc.
References QwLog::endl(), fBit, fMinLevel, fSize, QwTracking::shortnode::Print(), QwOut, and son.
Referenced by QwTrackingTreeSearch::_SearchTreeLines(), QwTracking::shortnode::Print(), QwTrackingTreeRegion::PrintNodes(), and QwTrackingTreeRegion::PrintTrees().
|
inlinestatic |
Set the default size for short trees.
Definition at line 49 of file shorttree.h.
References fDefaultSize, and size().
|
inline |
Get size of the bit array.
Definition at line 81 of file shorttree.h.
References fSize.
Referenced by SetDefaultSize(), and shorttree().
|
friend |
Output stream operator.
Stream some info about the short tree
stream | Stream as lhs of the operator |
st | Short tree as rhs of the operator |
Definition at line 93 of file shorttree.cc.
int* QwTracking::shorttree::fBit |
Hit pattern, one bin specified per detector layer.
Definition at line 64 of file shorttree.h.
Referenced by QwTrackingTreeSearch::_SearchTreeLines(), QwTracking::operator<<(), Print(), shorttree(), and ~shorttree().
|
staticprivate |
Debug level.
Definition at line 87 of file shorttree.h.
|
staticprivate |
int QwTracking::shorttree::fMinLevel |
Minimum level at which this node is valid.
Definition at line 61 of file shorttree.h.
Referenced by QwTrackingTreeSearch::_SearchTreeLines(), QwTracking::operator<<(), and Print().
|
private |
Definition at line 76 of file shorttree.h.
Referenced by QwTracking::operator<<(), Print(), shorttree(), and size().
int QwTracking::shorttree::fWidth |
Width in bins of the hit pattern.
Definition at line 67 of file shorttree.h.
Referenced by QwTracking::operator<<().
shortnode* QwTracking::shorttree::son[4] |
Each tree has four son nodes.
Definition at line 72 of file shorttree.h.
Referenced by QwTrackingTreeSearch::_SearchTreeLines(), Print(), QwTrackingTreeRegion::PrintNodes(), shorttree(), and QwTrackingTreeRegion::~QwTrackingTreeRegion().