BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkFundHit Class Referenceabstract

#include <TrkFundHit.h>

+ Inheritance diagram for TrkFundHit:

Public Types

typedef TrkHitOnTrkIter< TrkFundHithot_iterator
 
typedef TrkHitOnTrkIter< TrkFundHithot_iterator
 

Public Member Functions

 TrkFundHit ()
 
virtual ~TrkFundHit ()
 
int nUsedHits () const
 
bool usedHit (void) const
 
std::pair< TrkFundHit::hot_iterator, TrkFundHit::hot_iteratorgetUsedHits () const
 
TrkFundHit::hot_iterator begin () const
 
TrkFundHit::hot_iterator end () const
 
bool usedOnTrack (const TrkRecoTrk *t) const
 
const TrkHitOnTrkgetHitOnTrack (const TrkRecoTrk *trk) const
 
const TrkHitOnTrksetUsedHit (const TrkHitOnTrk *hit)
 
const TrkHitOnTrksetUnusedHit (const TrkHitOnTrk *hit)
 
virtual TrkEnums::TrkViewInfo whatView () const =0
 
virtual void printAll (std::ostream &os) const
 
 TrkFundHit ()
 
virtual ~TrkFundHit ()
 
int nUsedHits () const
 
bool usedHit (void) const
 
std::pair< TrkFundHit::hot_iterator, TrkFundHit::hot_iteratorgetUsedHits () const
 
TrkFundHit::hot_iterator begin () const
 
TrkFundHit::hot_iterator end () const
 
bool usedOnTrack (const TrkRecoTrk *t) const
 
const TrkHitOnTrkgetHitOnTrack (const TrkRecoTrk *trk) const
 
const TrkHitOnTrksetUsedHit (const TrkHitOnTrk *hit)
 
const TrkHitOnTrksetUnusedHit (const TrkHitOnTrk *hit)
 
virtual TrkEnums::TrkViewInfo whatView () const =0
 
virtual void printAll (std::ostream &os) const
 

Protected Types

typedef std::vector< constTrkHitOnTrk * >::iterator iterator_implementation
 
typedef const TrkHitOnTrk iterator_value_type
 
typedef std::vector< constTrkHitOnTrk * >::iterator iterator_implementation
 
typedef const TrkHitOnTrk iterator_value_type
 

Protected Member Functions

TrkFundHitoperator= (const TrkFundHit &)
 
TrkFundHitoperator= (const TrkFundHit &)
 

Protected Attributes

std::vector< const TrkHitOnTrk * > _hitList
 

Friends

class TrkHitOnTrkIter< TrkFundHit >
 

Detailed Description

Member Typedef Documentation

◆ hot_iterator [1/2]

◆ hot_iterator [2/2]

◆ iterator_implementation [1/2]

typedef std::vector<constTrkHitOnTrk*>::iterator TrkFundHit::iterator_implementation
protected

◆ iterator_implementation [2/2]

typedef std::vector<constTrkHitOnTrk*>::iterator TrkFundHit::iterator_implementation
protected

◆ iterator_value_type [1/2]

◆ iterator_value_type [2/2]

Constructor & Destructor Documentation

◆ TrkFundHit() [1/2]

TrkFundHit::TrkFundHit ( )

Definition at line 33 of file TrkFundHit.cxx.

33 {
34 //std::cout << " @ TrkFundHit constructor: " << ++debug_nHit << " addr: " << this << std::endl;
35}

◆ ~TrkFundHit() [1/2]

TrkFundHit::~TrkFundHit ( )
virtual

Definition at line 37 of file TrkFundHit.cxx.

38{
39 //std::cout << " @ ~TrkFundHit() : " << --debug_nHit << " addr: " << this << std::endl;
40 // hitlist cleanup done in derived classes
41}

◆ TrkFundHit() [2/2]

TrkFundHit::TrkFundHit ( )

◆ ~TrkFundHit() [2/2]

virtual TrkFundHit::~TrkFundHit ( )
virtual

Member Function Documentation

◆ begin() [1/2]

TrkFundHit::hot_iterator TrkFundHit::begin ( ) const
inline

Definition at line 113 of file InstallArea/include/TrkBase/TrkBase/TrkFundHit.h.

114{
115 return TrkFundHit::hot_iterator(const_cast<std::vector<const TrkHitOnTrk*>&>(_hitList).begin());
116}
std::vector< const TrkHitOnTrk * > _hitList
TrkFundHit::hot_iterator begin() const
TrkHitOnTrkIter< TrkFundHit > hot_iterator

Referenced by begin(), Hough3D::fit(), getHitOnTrack(), and getUsedHits().

◆ begin() [2/2]

TrkFundHit::hot_iterator TrkFundHit::begin ( ) const
inline

◆ end() [1/2]

TrkFundHit::hot_iterator TrkFundHit::end ( ) const
inline

Definition at line 119 of file InstallArea/include/TrkBase/TrkBase/TrkFundHit.h.

120{
121 return TrkFundHit::hot_iterator(const_cast<std::vector<const TrkHitOnTrk*>&>(_hitList).end());
122}
TrkFundHit::hot_iterator end() const

Referenced by end(), getHitOnTrack(), and getUsedHits().

◆ end() [2/2]

TrkFundHit::hot_iterator TrkFundHit::end ( ) const
inline

◆ getHitOnTrack() [1/2]

const TrkHitOnTrk * TrkFundHit::getHitOnTrack ( const TrkRecoTrk trk) const

Definition at line 95 of file TrkFundHit.cxx.

Referenced by MdcTrackList::pickHits(), and usedOnTrack().

◆ getHitOnTrack() [2/2]

const TrkHitOnTrk * TrkFundHit::getHitOnTrack ( const TrkRecoTrk trk) const

◆ getUsedHits() [1/2]

std::pair< TrkFundHit::hot_iterator, TrkFundHit::hot_iterator > TrkFundHit::getUsedHits ( ) const
inline

Definition at line 60 of file InstallArea/include/TrkBase/TrkBase/TrkFundHit.h.

60 {
61 return std::pair<TrkFundHit::hot_iterator,TrkFundHit::hot_iterator >(begin(),end());
62 }

◆ getUsedHits() [2/2]

std::pair< TrkFundHit::hot_iterator, TrkFundHit::hot_iterator > TrkFundHit::getUsedHits ( ) const
inline

Definition at line 60 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkFundHit.h.

60 {
61 return std::pair<TrkFundHit::hot_iterator,TrkFundHit::hot_iterator >(begin(),end());
62 }

◆ nUsedHits() [1/2]

int TrkFundHit::nUsedHits ( ) const

Definition at line 89 of file TrkFundHit.cxx.

90{
91 return _hitList.size();
92}

Referenced by MdcHit::~MdcHit().

◆ nUsedHits() [2/2]

int TrkFundHit::nUsedHits ( ) const

◆ operator=() [1/2]

TrkFundHit & TrkFundHit::operator= ( const TrkFundHit x)
protected

Definition at line 50 of file TrkFundHit.cxx.

51{
52 //std::cout << " @ TrkFundHit operator= : " << debug_nHit << " addr: " << this << std::endl;
53 assert(_hitList.empty());
54 return *this;
55}

◆ operator=() [2/2]

TrkFundHit & TrkFundHit::operator= ( const TrkFundHit )
protected

◆ printAll() [1/2]

virtual void TrkFundHit::printAll ( std::ostream &  os) const
virtual

Reimplemented in MdcHit, and MdcHit.

◆ printAll() [2/2]

virtual void TrkFundHit::printAll ( std::ostream &  os) const
virtual

Reimplemented in MdcHit, and MdcHit.

◆ setUnusedHit() [1/2]

const TrkHitOnTrk * TrkFundHit::setUnusedHit ( const TrkHitOnTrk hit)

Definition at line 75 of file TrkFundHit.cxx.

76{
77 //std::cout << " @ setUnusedHit() : " << debug_nHit << " addr: " << this << std::endl;
78 if (_hitList.empty()) return 0;
79 std::vector<const TrkHitOnTrk*>::iterator i=std::find(_hitList.begin(),_hitList.end(),hit);
80 if (i==_hitList.end()) return 0;
81 assert(*i==hit);
82// std::cout << "TrkFundHit setUnusedHit "<<((MdcHit*)(hit->hit()))->layernumber()<<" "<<((MdcHit*)(hit->hit()))->wirenumber()<<endl;
83//this->printAll(std::cout);//yzhang debug
84 _hitList.erase(i);
85 return hit;
86}

Referenced by TrkHitOnTrk::setUnusedHit().

◆ setUnusedHit() [2/2]

const TrkHitOnTrk * TrkFundHit::setUnusedHit ( const TrkHitOnTrk hit)

◆ setUsedHit() [1/2]

const TrkHitOnTrk * TrkFundHit::setUsedHit ( const TrkHitOnTrk hit)

Definition at line 58 of file TrkFundHit.cxx.

59{
60 // if (hitList->contains(hit)) {
61 // return;
62 // }
63 //FIXME: check hot corresponds to this hit??
64// std::cout << "TrkFundHit setUsedHit "<<((MdcHit*)(hit->hit()))->layernumber()<<" "<<((MdcHit*)(hit->hit()))->wirenumber()<<endl;
65// this->printAll(std::cout);//yzhang debug
66 _hitList.push_back(hit);
67// std::cout << "after push_bak " << std::endl;//yzhang debug
68// printAll(std::cout);//yzhang debug
69
70 return hit;
71}

Referenced by TrkHitOnTrk::setUsedHit().

◆ setUsedHit() [2/2]

const TrkHitOnTrk * TrkFundHit::setUsedHit ( const TrkHitOnTrk hit)

◆ usedHit() [1/2]

bool TrkFundHit::usedHit ( void  ) const
inline

◆ usedHit() [2/2]

bool TrkFundHit::usedHit ( void  ) const
inline

◆ usedOnTrack() [1/2]

bool TrkFundHit::usedOnTrack ( const TrkRecoTrk t) const
inline

Definition at line 67 of file InstallArea/include/TrkBase/TrkBase/TrkFundHit.h.

67{return getHitOnTrack(t) != 0;}
const TrkHitOnTrk * getHitOnTrack(const TrkRecoTrk *trk) const
Definition: TrkFundHit.cxx:95
int t()
Definition: t.c:1

Referenced by TrkHitList::appendHit(), TrkHitList::appendHot(), and TrkHitList::removeHit().

◆ usedOnTrack() [2/2]

bool TrkFundHit::usedOnTrack ( const TrkRecoTrk t) const
inline

◆ whatView() [1/2]

virtual TrkEnums::TrkViewInfo TrkFundHit::whatView ( ) const
pure virtual

Implemented in MdcHit, and MdcHit.

◆ whatView() [2/2]

virtual TrkEnums::TrkViewInfo TrkFundHit::whatView ( ) const
pure virtual

Implemented in MdcHit, and MdcHit.

Friends And Related Function Documentation

◆ TrkHitOnTrkIter< TrkFundHit >

friend class TrkHitOnTrkIter< TrkFundHit >
friend

Member Data Documentation

◆ _hitList

std::vector< const TrkHitOnTrk * > TrkFundHit::_hitList
protected

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