CMS 3D CMS Logo

Classes | Functions
cmsutils Namespace Reference

Classes

class  _bqueue_item
 
class  _bqueue_itr
 
class  bqueue
 

Functions

template<class T >
void intrusive_ptr_add_ref (_bqueue_item< T > *it)
 
template<class T >
void intrusive_ptr_release (_bqueue_item< T > *it)
 
template<typename T >
void swap (bqueue< T > &rh, bqueue< T > &lh)
 

Detailed Description

Backwards linked queue with "head sharing"

Author: Giovanni Petrucciani

For use in trajectory building, where we want to "fork" a trajectory candidate in two without copying around all the hits before the fork.

Supported operations (mimics a std container):

Note that boost::intrusive_ptr is used for items, so they are deleted automatically while avoiding problems if one deletes a queue which shares the head with another one

Disclaimer: I'm not sure the const_iterator is really const-correct..

V.I. 22/08/2012 As the bqueue is made to be shared its content ahs been forced to be constant. This avoids that accidentally an update in one Trajectory modifies the content of onother!

to support c++11 begin,end and operator++ has been added with the same semantics of rbegin,rend and operator-- Highly confusing, still the bqueue is a sort of reversed slist: provided the user knows should work....

Function Documentation

◆ intrusive_ptr_add_ref()

template<class T >
void cmsutils::intrusive_ptr_add_ref ( _bqueue_item< T > *  it)

Definition at line 77 of file bqueue.h.

77  {
78  it->addRef();
79  }

References cmsutils::_bqueue_item< T >::addRef().

◆ intrusive_ptr_release()

template<class T >
void cmsutils::intrusive_ptr_release ( _bqueue_item< T > *  it)

Definition at line 81 of file bqueue.h.

81  {
82  it->delRef();
83  }

References cmsutils::_bqueue_item< T >::delRef().

◆ swap()

template<typename T >
void cmsutils::swap ( bqueue< T > &  rh,
bqueue< T > &  lh 
)

Definition at line 246 of file bqueue.h.

246  {
247  rh.swap(lh);
248  }

References mathSSE::lh, and cmsutils::bqueue< T >::swap().

mathSSE::lh
bool int lh
Definition: SIMDVec.h:20