CMS 3D CMS Logo

edm::RegionIndex< T > Class Template Reference

#include <DataFormats/Common/interface/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 101 of file LazyGetter.h.

00101                                 : 
00102     region_(0), 
00103     start_(0), 
00104     finish_(0), 
00105     unpacked_(false),
00106     getter_(NULL)
00107       {}

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 111 of file LazyGetter.h.

00111                                                                                                                     : 
00112     region_(region), 
00113     start_(start), 
00114     finish_(finish), 
00115     unpacked_(false), 
00116     getter_(theLazyGetter)
00117       {}


Member Function Documentation

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

Get begin iterator.

Definition at line 177 of file LazyGetter.h.

References edm::RegionIndex< T >::getter_, and edm::RegionIndex< T >::start_.

Referenced by edm::RegionIndex< T >::find(), SiStripRecHitConverterAlgorithm::run(), and MeasurementTracker::updateStrips().

00178    {
00179      //check pointer here and throw if null
00180      return getter_->begin_record()+start_;
00181    }

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

Get off the end iterator.

Definition at line 186 of file LazyGetter.h.

References edm::RegionIndex< T >::finish_, and edm::RegionIndex< T >::getter_.

Referenced by edm::RegionIndex< T >::find(), and MeasurementTracker::updateStrips().

00187     {
00188       //check pointer here and throw if null
00189       return getter_->begin_record()+finish_;
00190     }

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 204 of file LazyGetter.h.

References edm::RegionIndex< T >::begin(), and edm::RegionIndex< T >::end().

00205     {
00206       return std::equal_range(begin(),end(),id);
00207     }

template<class T>
void edm::RegionIndex< T >::finish ( uint32_t  newfinish  )  [inline, private]

Set of-the-end finish index.

Definition at line 161 of file LazyGetter.h.

References edm::RegionIndex< T >::finish_.

00162     {
00163       finish_=newfinish;
00164     }

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

Get off-the-end finish index.

Definition at line 137 of file LazyGetter.h.

References edm::RegionIndex< T >::finish_.

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

00138     {
00139       return finish_;
00140     }

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

Get region number.

Definition at line 122 of file LazyGetter.h.

References edm::RegionIndex< T >::region_.

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

00123     {
00124       return region_;
00125     }

template<class T>
void edm::RegionIndex< T >::start ( uint32_t  newstart  )  [inline, private]

Set start index.

Definition at line 153 of file LazyGetter.h.

References edm::RegionIndex< T >::start_.

00154     {
00155       start_=newstart;
00156     }

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

Get start index.

Definition at line 130 of file LazyGetter.h.

References edm::RegionIndex< T >::start_.

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

00131     {
00132       return start_;
00133     }

template<class T>
void edm::RegionIndex< T >::unpacked ( bool  newunpacked  )  [inline, private]

Set unpacking status.

Definition at line 169 of file LazyGetter.h.

References edm::RegionIndex< T >::unpacked_.

00170     {
00171       unpacked_=newunpacked;
00172     }

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

Get unpacking status.

Definition at line 145 of file LazyGetter.h.

References edm::RegionIndex< T >::unpacked_.

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

00146     {
00147       return unpacked_;
00148     }

template<class T>
RegionIndex< T > & edm::RegionIndex< T >::updateLazyGetter ( const LazyGetter< T > *  newLazyGetter  )  [inline]

Update the pointer to the lazyGetter.

Definition at line 195 of file LazyGetter.h.

References edm::RegionIndex< T >::getter_.

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

00196     {
00197       getter_ = newGetter;
00198       return *this;
00199     }


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 92 of file LazyGetter.h.

Referenced by edm::RegionIndex< T >::end(), and edm::RegionIndex< T >::finish().

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

Definition at line 94 of file LazyGetter.h.

Referenced by edm::RegionIndex< T >::begin(), edm::RegionIndex< T >::end(), and edm::RegionIndex< T >::updateLazyGetter().

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

Definition at line 90 of file LazyGetter.h.

Referenced by edm::RegionIndex< T >::region().

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

Definition at line 91 of file LazyGetter.h.

Referenced by edm::RegionIndex< T >::begin(), and edm::RegionIndex< T >::start().

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

Definition at line 93 of file LazyGetter.h.

Referenced by edm::RegionIndex< T >::unpacked().


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