CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 #ifndef CT_SEGMENTTABLE
002 #define CT_SEGMENTTABLE
003 
004 #include "TrackingObjects/CT_Track/CT_SegmentSet.hh"
005 
006 #ifdef __GNUG__
007 #pragma interface
008 #define inline __attribute__((always_inline))
009 #endif
010 
011 typedef std::list<CT_Segment*> CT_SegmentList;
012 
013 class CT_SegmentTable {
014   CT_Hit *_hitArray;
015 // Singleton
016   static CT_SegmentTable* _instance;
017 // The table
018   CT_SegmentList _listArr[cot::NumSLs];
019 // Creator is private ... only create via instance()/refernence()
020   CT_SegmentTable() {};
021 // For cleaning list
022   class _Reject : public std::unary_function<CT_Segment*,bool> {
023     CT_Hit *_hitArray;
024   public:
025     _Reject(CT_Hit *hitArray) {_hitArray = hitArray;}
026     bool operator() (argument_type pSeg);
027   };
028 public:
029   inline static CT_SegmentTable* instance() {
030     if (! _instance)
031       _instance = new CT_SegmentTable;
032     return _instance;
033   }
034 
035   inline static CT_SegmentTable& reference() {
036     return *instance();
037   }
038 
039   void setPointers();
040   inline void remove(const int sl, CT_Segment* seg) {
041     _listArr[sl].remove(seg);
042   }
043   inline CT_SegmentList::iterator
044        erase(const int sl, CT_SegmentList::iterator &iSeg) {
045     return _listArr[sl].erase(iSeg);
046   }
047   void purge();
048   inline int getNumElements(const int sl) const {
049     return _listArr[sl].size();
050   }
051   inline CT_SegmentList::iterator begin(const int sl) {
052     return _listArr[sl].begin();
053   }
054   inline CT_SegmentList::iterator end(const int sl) {
055     return _listArr[sl].end();
056   }
057 };
058 
059 #ifdef __GNUG__
060 #undef inline
061 #endif
062 
063 #endif

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov