BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHotList.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkHotList.h,v 1.3 2010/09/26 00:39:00 zhangy Exp $
4//
5// Description: List of hits (as HitOnTrk objects) associated with a
6// reconstructed track. Abstract base class.
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner
12//
13//------------------------------------------------------------------------
14#ifndef TRKHOTLIST_HH
15#define TRKHOTLIST_HH
16
17class TrkFundHit;
18class TrkHitOnTrk;
19class TrkRep;
20class TrkView;
21#include <iosfwd>
22#include <vector>
24#include "TrkBase/TrkEnums.h"
25#include "TrkBase/TrkFunctors.h"
26#include "TrkBase/TrkFundHit.h"
27#include "GaudiKernel/DataObject.h"
28
29// Class interface //
30class TrkHotList : public DataObject {
31private:
32 struct iterator_traits;
34public:
35
36 // constructors and such
37 TrkHotList();
39 // this Hotlist is about to be usurped by a new TrkRep...
41 virtual ~TrkHotList();
42
44 hot_iterator begin() const { return hot_iterator(hotlist().begin()); }
45 hot_iterator end() const { return hot_iterator(hotlist().end()); }
46
48 nc_hot_iterator begin() { return nc_hot_iterator(hotlist().begin()); }
49 nc_hot_iterator end() { return nc_hot_iterator(hotlist().end()); }
50
51 virtual bool hitCapable() const = 0;
53 virtual int nMdc(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const = 0;
54 virtual int nSvt(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const = 0;
55 virtual int nHit(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const = 0;
56 virtual bool hasSvtView(TrkEnums::TrkViewInfo view, int layer) const;
57 virtual TrkView svtView(int layer) const = 0;
58 virtual unsigned firstMdcLayer() const = 0;
59 virtual unsigned lastMdcLayer() const = 0;
60 virtual double startFoundRange() const = 0;
61 virtual double endFoundRange() const = 0;
62 virtual bool isActive(unsigned ihot) const =0;
63
64 virtual void append(TrkHitOnTrk* ) = 0;
65 virtual void remove(TrkHitOnTrk* ) = 0;
66 virtual void updateHots() = 0;
67 virtual TrkHitOnTrk* findHot(const TrkFundHit*) const = 0;
68 virtual void sort();
69
70 void print(std::ostream &o) const;
71 void printAll(std::ostream &o) const;
72
73protected:
74 friend struct iterator_traits; // these two want access to hotlist_t...
75 friend struct const_iterator_traits;
76 typedef std::vector<TrkHitOnTrk*> hotlist_t;
77
78private:
79 // Preempt: Hots have to be cloned, not naively copied
80 TrkHotList(const TrkHotList& rhs);
81 TrkHotList& operator= (const TrkHotList&);
82
83 struct iterator_traits {
84 typedef TrkHitOnTrk iterator_value_type;
85 typedef hotlist_t::iterator iterator_implementation;
86 };
87 struct const_iterator_traits {
88 typedef const TrkHitOnTrk iterator_value_type;
89 typedef hotlist_t::const_iterator iterator_implementation;
90 };
91
92 friend class TrkHotListUnowned; // these two want access to hotlist()
93 friend class TrkHotListFull;
94 virtual const hotlist_t& hotlist() const = 0;
95 virtual hotlist_t& hotlist() = 0;
96};
97
98#endif
virtual TrkHitOnTrk * findHot(const TrkFundHit *) const =0
virtual void remove(TrkHitOnTrk *)=0
virtual void append(TrkHitOnTrk *)=0
virtual double endFoundRange() const =0
friend struct const_iterator_traits
Definition: TrkHotList.h:75
virtual bool isActive(unsigned ihot) const =0
TrkHitOnTrkIter< TrkHotList::iterator_traits > nc_hot_iterator
Definition: TrkHotList.h:47
virtual ~TrkHotList()
Definition: TrkHotList.cxx:26
virtual bool hitCapable() const =0
virtual int nSvt(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
TrkHitOnTrkIter< TrkHotList::const_iterator_traits > hot_iterator
Definition: TrkHotList.h:43
virtual TrkHotList * clone(TrkBase::Functors::cloneHot) const =0
hot_iterator end() const
Definition: TrkHotList.h:45
nc_hot_iterator end()
Definition: TrkHotList.h:49
nc_hot_iterator begin()
Definition: TrkHotList.h:48
virtual void sort()
Definition: TrkHotList.cxx:71
virtual unsigned lastMdcLayer() const =0
virtual TrkHotList * resetParent(TrkBase::Functors::setParent)
Definition: TrkHotList.cxx:64
virtual double startFoundRange() const =0
hot_iterator begin() const
Definition: TrkHotList.h:44
std::vector< TrkHitOnTrk * > hotlist_t
Definition: TrkHotList.h:76
virtual int nActive(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
virtual unsigned firstMdcLayer() const =0
virtual int nMdc(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
void print(std::ostream &o) const
Definition: TrkHotList.cxx:31
virtual TrkView svtView(int layer) const =0
virtual int nHit(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
friend struct iterator_traits
Definition: TrkHotList.h:74
void printAll(std::ostream &o) const
Definition: TrkHotList.cxx:41
virtual bool hasSvtView(TrkEnums::TrkViewInfo view, int layer) const
Definition: TrkHotList.cxx:56
virtual void updateHots()=0
Definition: TrkRep.h:43
TrkViewInfo
Definition: TrkEnums.h:22
@ bothView
Definition: TrkEnums.h:22