Belle II Software development
QuadTreeItem< AData > Class Template Reference

This class serves as a wrapper around all things that should go into a QuadTree. More...

#include <QuadTreeItem.h>

Public Member Functions

 QuadTreeItem (AData *data)
 Constructor.
 
AData * getPointer () const
 Returns the underlying data.
 
bool isUsed () const
 Flag is set if the item was used as a result of the quad tree search and should not be used in the next quad tree search round.
 
void setUsedFlag (bool usedFlag=true)
 Set the used flag if you do not want that item to go into the next search round again.
 
void unsetUsedFlag ()
 Unset the used flag again if you have noticed that a previous setting was wrong.
 
bool isUsed () const
 As special case: the QuadTreeHitWrapper has a used flag itself.
 
void setUsedFlag (bool usedFlag)
 As special case: the QuadTreeHitWrapper has a used flag itself.
 
bool isUsed () const
 As special case: the CDCSegment2D has a used flag itself.
 
void setUsedFlag (bool usedFlag)
 As special case: the CDCSegment2D has a used flag itself.
 

Private Member Functions

 QuadTreeItem (const QuadTreeItem &copy)=delete
 Do not copy!
 
QuadTreeItemoperator= (QuadTreeItem const &copy)=delete
 Do not copy!
 

Private Attributes

AData * m_data
 A pointer to the underlying item data.
 
bool m_usedFlag
 This flag can be set to not use the item in the next quad tree search round.
 

Detailed Description

template<class AData>
class Belle2::TrackFindingCDC::QuadTreeItem< AData >

This class serves as a wrapper around all things that should go into a QuadTree.

For usage in the QuadTree we need to provide a used flag. If your AData-class does provide a used flag itself, just spezialize this template as done for the CDCWireHit and CDCSegment2D below.

Definition at line 27 of file QuadTreeItem.h.

Constructor & Destructor Documentation

◆ QuadTreeItem()

QuadTreeItem ( AData *  data)
inlineexplicit

Constructor.

Definition at line 30 of file QuadTreeItem.h.

31 : m_data(data)
32 , m_usedFlag(false) {};
bool m_usedFlag
This flag can be set to not use the item in the next quad tree search round.
Definition: QuadTreeItem.h:74
AData * m_data
A pointer to the underlying item data.
Definition: QuadTreeItem.h:71

Member Function Documentation

◆ getPointer()

AData * getPointer ( ) const
inline

Returns the underlying data.

Definition at line 43 of file QuadTreeItem.h.

44 {
45 return m_data;
46 }

◆ isUsed()

bool isUsed ( ) const
inline

Flag is set if the item was used as a result of the quad tree search and should not be used in the next quad tree search round.

Definition at line 52 of file QuadTreeItem.h.

53 {
54 return m_usedFlag;
55 }

◆ setUsedFlag()

void setUsedFlag ( bool  usedFlag = true)
inline

Set the used flag if you do not want that item to go into the next search round again.

Definition at line 58 of file QuadTreeItem.h.

59 {
60 m_usedFlag = usedFlag;
61 }

◆ unsetUsedFlag()

void unsetUsedFlag ( )
inline

Unset the used flag again if you have noticed that a previous setting was wrong.

Definition at line 64 of file QuadTreeItem.h.

65 {
66 setUsedFlag(false);
67 }
void setUsedFlag(bool usedFlag=true)
Set the used flag if you do not want that item to go into the next search round again.
Definition: QuadTreeItem.h:58

Member Data Documentation

◆ m_data

AData* m_data
private

A pointer to the underlying item data.

Definition at line 71 of file QuadTreeItem.h.

◆ m_usedFlag

bool m_usedFlag
private

This flag can be set to not use the item in the next quad tree search round.

Definition at line 74 of file QuadTreeItem.h.


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