CMS 3D CMS Logo

cmsutils::bqueue< T > Class Template Reference

#include <TrackingTools/PatternTools/interface/bqueue.h>

List of all members.

Public Types

typedef const _bqueue_itr
< value_type
const_iterator
typedef _bqueue_item< value_typeitem
typedef boost::intrusive_ptr
< _bqueue_item< value_type > > 
itemptr
typedef _bqueue_itr< value_typeiterator
typedef unsigned short int size_type
typedef T value_type

Public Member Functions

const T & back () const
T & back ()
 bqueue (const bqueue< T > &cp)
 bqueue ()
bool empty () const
bqueue< T > fork ()
const T & front () const
T & front ()
const T & operator[] (size_type i) const
void pop_back ()
void push_back (const T &val)
const_iterator rbegin () const
iterator rbegin ()
const_iterator rend () const
size_type size () const
 ~bqueue ()

Private Member Functions

 bqueue (size_type size, itemptr bound, itemptr head, itemptr tail)

Private Attributes

itemptr m_bound
itemptr m_head
size_type m_size
itemptr m_tail


Detailed Description

template<class T>
class cmsutils::bqueue< T >

Definition at line 77 of file bqueue.h.


Member Typedef Documentation

template<class T>
typedef const _bqueue_itr<value_type> cmsutils::bqueue< T >::const_iterator

Definition at line 84 of file bqueue.h.

template<class T>
typedef _bqueue_item<value_type> cmsutils::bqueue< T >::item

Definition at line 81 of file bqueue.h.

template<class T>
typedef boost::intrusive_ptr< _bqueue_item<value_type> > cmsutils::bqueue< T >::itemptr

Definition at line 82 of file bqueue.h.

template<class T>
typedef _bqueue_itr<value_type> cmsutils::bqueue< T >::iterator

Definition at line 83 of file bqueue.h.

template<class T>
typedef unsigned short int cmsutils::bqueue< T >::size_type

Definition at line 80 of file bqueue.h.

template<class T>
typedef T cmsutils::bqueue< T >::value_type

Definition at line 79 of file bqueue.h.


Constructor & Destructor Documentation

template<class T>
cmsutils::bqueue< T >::bqueue (  )  [inline]

Definition at line 85 of file bqueue.h.

00085 : m_size(0), m_bound(), m_head(m_bound), m_tail(m_bound) { }

template<class T>
cmsutils::bqueue< T >::~bqueue (  )  [inline]

Definition at line 86 of file bqueue.h.

00086 { }

template<class T>
cmsutils::bqueue< T >::bqueue ( const bqueue< T > &  cp  )  [inline]

Definition at line 87 of file bqueue.h.

00087 : m_size(cp.m_size), m_bound(cp.m_bound), m_head(cp.m_head), m_tail(cp.m_tail) { }

template<class T>
cmsutils::bqueue< T >::bqueue ( size_type  size,
itemptr  bound,
itemptr  head,
itemptr  tail 
) [inline, private]

Definition at line 117 of file bqueue.h.

00117                                                                           :
00118             m_size(size), m_bound(bound), m_head(head), m_tail(tail) { }
        size_type m_size;


Member Function Documentation

template<class T>
const T& cmsutils::bqueue< T >::back ( void   )  const [inline]

Definition at line 104 of file bqueue.h.

References cmsutils::bqueue< T >::m_tail.

00104 { return m_tail->value; }

template<class T>
T& cmsutils::bqueue< T >::back ( void   )  [inline]

Definition at line 103 of file bqueue.h.

References cmsutils::bqueue< T >::m_tail.

Referenced by TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), TempTrajectory::pop(), and TempTrajectory::push().

00103 { return m_tail->value; }

template<class T>
bool cmsutils::bqueue< T >::empty ( void   )  const [inline]

Definition at line 109 of file bqueue.h.

References cmsutils::bqueue< T >::m_size.

Referenced by TempTrajectory::empty().

00109 { return m_size == 0; }

template<class T>
bqueue<T> cmsutils::bqueue< T >::fork (  )  [inline]

Definition at line 88 of file bqueue.h.

References cmsutils::bqueue< T >::m_bound, cmsutils::bqueue< T >::m_head, cmsutils::bqueue< T >::m_size, and cmsutils::bqueue< T >::m_tail.

00088                          {
00089             return bqueue<T>(m_size,m_bound,m_head,m_tail);
00090         }

template<class T>
const T& cmsutils::bqueue< T >::front ( void   )  const [inline]

Definition at line 102 of file bqueue.h.

References cmsutils::bqueue< T >::m_head.

00102 { return m_head->value; }

template<class T>
T& cmsutils::bqueue< T >::front ( void   )  [inline]

Definition at line 101 of file bqueue.h.

References cmsutils::bqueue< T >::m_head.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), TempTrajectory::firstMeasurement(), and TempTrajectory::push().

00101 { return m_head->value; }

template<class T>
const T& cmsutils::bqueue< T >::operator[] ( size_type  i  )  const [inline]

Definition at line 110 of file bqueue.h.

References cmsutils::bqueue< T >::m_size, and cmsutils::bqueue< T >::rbegin().

00110                                                 {
00111                 int idx = m_size - i - 1;
00112                 const_iterator it = rbegin();
00113                 while (idx-- > 0) --it;
00114                 return *it;
00115         }

template<class T>
void cmsutils::bqueue< T >::pop_back ( void   )  [inline]

Definition at line 95 of file bqueue.h.

References cmsutils::bqueue< T >::m_bound, cmsutils::bqueue< T >::m_head, cmsutils::bqueue< T >::m_size, and cmsutils::bqueue< T >::m_tail.

Referenced by TempTrajectory::pop().

00095                         {
00096             assert(m_size > 0);
00097             --m_size;
00098             m_tail = m_tail->back;
00099             if (m_size == 0) m_head = m_bound; 
00100         }

template<class T>
void cmsutils::bqueue< T >::push_back ( const T &  val  )  [inline]

Definition at line 91 of file bqueue.h.

References cmsutils::bqueue< T >::m_head, cmsutils::bqueue< T >::m_size, and cmsutils::bqueue< T >::m_tail.

Referenced by TempTrajectory::push().

00091                                      {
00092             m_tail = itemptr(new item(this->m_tail, val)); 
00093             if ((++m_size) == 1) { m_head = m_tail; };
00094         }

template<class T>
const_iterator cmsutils::bqueue< T >::rbegin ( void   )  const [inline]

Definition at line 106 of file bqueue.h.

References cmsutils::bqueue< T >::m_tail.

00106 { return m_tail.get(); }

template<class T>
iterator cmsutils::bqueue< T >::rbegin ( void   )  [inline]

Definition at line 105 of file bqueue.h.

References cmsutils::bqueue< T >::m_tail.

Referenced by GroupedCkfTrajectoryBuilder::backwardFit(), GroupedCkfTrajectoryBuilder::groupedIntermediaryClean(), cmsutils::bqueue< T >::operator[](), TempTrajectory::push(), GroupedCkfTrajectoryBuilder::rebuildSeedingRegion(), ClusterShapeTrajectoryFilter::toBeContinued(), HICTrajectoryBuilder::toBeContinued(), and TempTrajectory::toTrajectory().

00105 { return m_tail.get(); }

template<class T>
const_iterator cmsutils::bqueue< T >::rend ( void   )  const [inline]

Definition at line 107 of file bqueue.h.

References cmsutils::bqueue< T >::m_bound.

Referenced by GroupedCkfTrajectoryBuilder::backwardFit(), GroupedCkfTrajectoryBuilder::groupedIntermediaryClean(), TempTrajectory::push(), GroupedCkfTrajectoryBuilder::rebuildSeedingRegion(), ClusterShapeTrajectoryFilter::toBeContinued(), HICTrajectoryBuilder::toBeContinued(), and TempTrajectory::toTrajectory().

00107 { return m_bound.get(); }

template<class T>
size_type cmsutils::bqueue< T >::size ( void   )  const [inline]

Definition at line 108 of file bqueue.h.

References cmsutils::bqueue< T >::m_size.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), TempTrajectory::check(), TempTrajectory::push(), and TempTrajectory::toTrajectory().

00108 { return m_size; }


Member Data Documentation

template<class T>
itemptr cmsutils::bqueue< T >::m_bound [private]

Definition at line 120 of file bqueue.h.

Referenced by cmsutils::bqueue< T >::fork(), cmsutils::bqueue< T >::pop_back(), and cmsutils::bqueue< T >::rend().

template<class T>
itemptr cmsutils::bqueue< T >::m_head [private]

Definition at line 120 of file bqueue.h.

Referenced by cmsutils::bqueue< T >::fork(), cmsutils::bqueue< T >::front(), cmsutils::bqueue< T >::pop_back(), and cmsutils::bqueue< T >::push_back().

template<class T>
size_type cmsutils::bqueue< T >::m_size [private]

Definition at line 119 of file bqueue.h.

Referenced by cmsutils::bqueue< T >::empty(), cmsutils::bqueue< T >::fork(), cmsutils::bqueue< T >::operator[](), cmsutils::bqueue< T >::pop_back(), cmsutils::bqueue< T >::push_back(), and cmsutils::bqueue< T >::size().

template<class T>
itemptr cmsutils::bqueue< T >::m_tail [private]

Definition at line 120 of file bqueue.h.

Referenced by cmsutils::bqueue< T >::back(), cmsutils::bqueue< T >::fork(), cmsutils::bqueue< T >::pop_back(), cmsutils::bqueue< T >::push_back(), and cmsutils::bqueue< T >::rbegin().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:36:42 2009 for CMSSW by  doxygen 1.5.4