CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

edm::RegionIndex< T > Class Template Reference

#include <LazyGetter.h>

List of all members.

Public Types

typedef std::vector< T >
::const_iterator 
const_iterator
typedef std::pair
< const_iterator,
const_iterator
pair_iterator

Public Member Functions

const_iterator begin () const
 Get begin iterator.
const_iterator end () const
 Get off the end iterator.
pair_iterator find (uint32_t id) const
 Get range of T on on det.
uint32_t finish () const
 Get off-the-end finish index.
uint32_t region () const
 Get region number.
 RegionIndex (uint32_t region, uint32_t start, uint32_t finish, const LazyGetter< T > *theLazyGetter)
 Constructor.
 RegionIndex ()
 Default constructor.
uint32_t start () const
 Get start index.
bool unpacked () const
 Get unpacking status.
RegionIndex< T > & updateLazyGetter (const LazyGetter< T > *newLazyGetter)
 Update the pointer to the lazyGetter.

Private Member Functions

void finish (uint32_t)
 Set of-the-end finish index.
void start (uint32_t)
 Set start index.
void unpacked (bool)
 Set unpacking status.

Private Attributes

uint32_t finish_
const LazyGetter< T > * getter_
uint32_t region_
uint32_t start_
bool unpacked_

Friends

class LazyAdapter< T >

Detailed Description

template<class T>
class edm::RegionIndex< T >

Definition at line 40 of file LazyGetter.h.


Member Typedef Documentation

template<class T>
typedef std::vector<T>::const_iterator edm::RegionIndex< T >::const_iterator

Definition at line 46 of file LazyGetter.h.

template<class T>
typedef std::pair<const_iterator,const_iterator> edm::RegionIndex< T >::pair_iterator

Definition at line 47 of file LazyGetter.h.


Constructor & Destructor Documentation

template<class T >
edm::RegionIndex< T >::RegionIndex ( ) [inline]

Default constructor.

Definition at line 104 of file LazyGetter.h.

                                :
    region_(0),
    start_(0),
    finish_(0),
    unpacked_(false),
    getter_(NULL)
      {}
template<class T >
edm::RegionIndex< T >::RegionIndex ( uint32_t  region,
uint32_t  start,
uint32_t  finish,
const LazyGetter< T > *  theLazyGetter 
) [inline]

Constructor.

Definition at line 114 of file LazyGetter.h.

                                                                                                                    :
    region_(region),
    start_(start),
    finish_(finish),
    unpacked_(false),
    getter_(theLazyGetter)
      {}

Member Function Documentation

template<class T >
RegionIndex< T >::const_iterator edm::RegionIndex< T >::begin ( void  ) const [inline]

Get begin iterator.

Definition at line 180 of file LazyGetter.h.

Referenced by SiStripRecHitConverterAlgorithm::run(), and MeasurementTrackerImpl::updateStrips().

   {
     //check pointer here and throw if null
     return getter_->begin_record()+start_;
   }
template<class T >
RegionIndex< T >::const_iterator edm::RegionIndex< T >::end ( void  ) const [inline]

Get off the end iterator.

Definition at line 189 of file LazyGetter.h.

Referenced by MeasurementTrackerImpl::updateStrips().

    {
      //check pointer here and throw if null
      return getter_->begin_record()+finish_;
    }
template<class T >
RegionIndex< T >::pair_iterator edm::RegionIndex< T >::find ( uint32_t  id) const [inline]

Get range of T on on det.

Definition at line 207 of file LazyGetter.h.

References begin, and end.

    {
      return std::equal_range(begin(),end(),id);
    }
template<class T >
uint32_t edm::RegionIndex< T >::finish ( ) const [inline]

Get off-the-end finish index.

Definition at line 140 of file LazyGetter.h.

Referenced by edm::LazyAdapter< T >::operator()(), and SiStripRecHitConverterAlgorithm::run().

    {
      return finish_;
    }
template<class T >
void edm::RegionIndex< T >::finish ( uint32_t  newfinish) [inline, private]

Set of-the-end finish index.

Definition at line 164 of file LazyGetter.h.

    {
      finish_=newfinish;
    }
template<class T >
uint32_t edm::RegionIndex< T >::region ( ) const [inline]

Get region number.

Definition at line 125 of file LazyGetter.h.

Referenced by edm::LazyAdapter< T >::operator()().

    {
      return region_;
    }
template<class T >
uint32_t edm::RegionIndex< T >::start ( ) const [inline]

Get start index.

Definition at line 133 of file LazyGetter.h.

Referenced by edm::LazyAdapter< T >::operator()(), and SiStripRecHitConverterAlgorithm::run().

    {
      return start_;
    }
template<class T >
void edm::RegionIndex< T >::start ( uint32_t  newstart) [inline, private]

Set start index.

Definition at line 156 of file LazyGetter.h.

    {
      start_=newstart;
    }
template<class T >
bool edm::RegionIndex< T >::unpacked ( ) const [inline]

Get unpacking status.

Definition at line 148 of file LazyGetter.h.

Referenced by edm::LazyAdapter< T >::operator()().

    {
      return unpacked_;
    }
template<class T >
void edm::RegionIndex< T >::unpacked ( bool  newunpacked) [inline, private]

Set unpacking status.

Definition at line 172 of file LazyGetter.h.

    {
      unpacked_=newunpacked;
    }
template<class T >
RegionIndex< T > & edm::RegionIndex< T >::updateLazyGetter ( const LazyGetter< T > *  newLazyGetter) [inline]

Update the pointer to the lazyGetter.

Definition at line 198 of file LazyGetter.h.

Referenced by edm::UpdateGetterAdapter< T >::operator()(), and edm::LazyAdapter< T >::operator()().

    {
      getter_ = newGetter;
      return *this;
    }

Friends And Related Function Documentation

template<class T>
friend class LazyAdapter< T > [friend]

Definition at line 42 of file LazyGetter.h.


Member Data Documentation

template<class T>
uint32_t edm::RegionIndex< T >::finish_ [private]

Definition at line 95 of file LazyGetter.h.

template<class T>
const LazyGetter<T>* edm::RegionIndex< T >::getter_ [private]

Definition at line 97 of file LazyGetter.h.

template<class T>
uint32_t edm::RegionIndex< T >::region_ [private]

Definition at line 93 of file LazyGetter.h.

template<class T>
uint32_t edm::RegionIndex< T >::start_ [private]

Definition at line 94 of file LazyGetter.h.

template<class T>
bool edm::RegionIndex< T >::unpacked_ [private]

Definition at line 96 of file LazyGetter.h.