CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ihd::const_iterator< ValueType, HitSetType > Class Template Reference

#include <IntermediateHitDoublets.h>

Public Types

using difference_type = internal_iterator_type::difference_type
 
using internal_iterator_type = typename std::vector< RegionIndex >::const_iterator
 
using value_type = ValueType
 

Public Member Functions

 const_iterator (const HitSetType *hst, internal_iterator_type iter)
 
bool operator!= (const const_iterator &other) const
 
value_type operator* () const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
bool operator== (const const_iterator &other) const
 

Private Attributes

const HitSetType * hitSets_
 
internal_iterator_type iter_
 

Detailed Description

template<typename ValueType, typename HitSetType>
class ihd::const_iterator< ValueType, HitSetType >

Helper class providing a generic iterator to loop over TrackingRegions of IntermediateHitDoublets, IntermediateHitTriplets, or RegionsSeedingHitSets

Template Parameters
ValueTypeType to be returned by operator*() (should be something inexpensive)
HitSetTypeType of the holder of data (currently IntermediateHitDoublets, IntermediateHitTriplets, or RegionsSeedingHitSets)

Definition at line 84 of file IntermediateHitDoublets.h.

Member Typedef Documentation

template<typename ValueType , typename HitSetType >
using ihd::const_iterator< ValueType, HitSetType >::difference_type = internal_iterator_type::difference_type

Definition at line 88 of file IntermediateHitDoublets.h.

template<typename ValueType , typename HitSetType >
using ihd::const_iterator< ValueType, HitSetType >::internal_iterator_type = typename std::vector<RegionIndex>::const_iterator

Definition at line 86 of file IntermediateHitDoublets.h.

template<typename ValueType , typename HitSetType >
using ihd::const_iterator< ValueType, HitSetType >::value_type = ValueType

Definition at line 87 of file IntermediateHitDoublets.h.

Constructor & Destructor Documentation

template<typename ValueType , typename HitSetType >
ihd::const_iterator< ValueType, HitSetType >::const_iterator ( const HitSetType *  hst,
internal_iterator_type  iter 
)
inline

Definition at line 90 of file IntermediateHitDoublets.h.

90 : hitSets_(hst), iter_(iter) {}
internal_iterator_type iter_
const HitSetType * hitSets_

Member Function Documentation

template<typename ValueType , typename HitSetType >
bool ihd::const_iterator< ValueType, HitSetType >::operator!= ( const const_iterator< ValueType, HitSetType > &  other) const
inline

Definition at line 108 of file IntermediateHitDoublets.h.

References operator==().

108 { return !operator==(other); }
bool operator==(const const_iterator &other) const
template<typename ValueType , typename HitSetType >
value_type ihd::const_iterator< ValueType, HitSetType >::operator* ( void  ) const
inline

Definition at line 92 of file IntermediateHitDoublets.h.

92  {
93  return value_type(&(iter_->region()),
94  &(iter_->layerHitMapCache()),
95  hitSets_,
96  hitSets_->layerSetsBegin() + iter_->layerSetBeginIndex(),
97  hitSets_->layerSetsBegin() + iter_->layerSetEndIndex());
98  }
internal_iterator_type iter_
const HitSetType * hitSets_
template<typename ValueType , typename HitSetType >
const_iterator& ihd::const_iterator< ValueType, HitSetType >::operator++ ( void  )
inline

Definition at line 100 of file IntermediateHitDoublets.h.

100 { ++iter_; return *this; }
internal_iterator_type iter_
template<typename ValueType , typename HitSetType >
const_iterator ihd::const_iterator< ValueType, HitSetType >::operator++ ( int  )
inline

Definition at line 101 of file IntermediateHitDoublets.h.

References clone().

101  {
102  const_iterator clone(*this);
103  ++iter_;
104  return clone;
105  }
internal_iterator_type iter_
const_iterator(const HitSetType *hst, internal_iterator_type iter)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
template<typename ValueType , typename HitSetType >
bool ihd::const_iterator< ValueType, HitSetType >::operator== ( const const_iterator< ValueType, HitSetType > &  other) const
inline

Definition at line 107 of file IntermediateHitDoublets.h.

References ihd::const_iterator< ValueType, HitSetType >::iter_.

107 { return iter_ == other.iter_; }
internal_iterator_type iter_

Member Data Documentation

template<typename ValueType , typename HitSetType >
const HitSetType* ihd::const_iterator< ValueType, HitSetType >::hitSets_
private

Definition at line 111 of file IntermediateHitDoublets.h.

template<typename ValueType , typename HitSetType >
internal_iterator_type ihd::const_iterator< ValueType, HitSetType >::iter_
private