CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::RegionIndex< T > Class Template Reference

#include <LazyGetter.h>

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

Private Member Functions

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

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

Member Typedef Documentation

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

Definition at line 48 of file LazyGetter.h.

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

Definition at line 49 of file LazyGetter.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 106 of file LazyGetter.h.

106  :
107  region_(0),
108  start_(0),
109  finish_(0),
110  unpacked_(false),
111  getter_(NULL)
112  {}
#define NULL
Definition: scimark2.h:8
uint32_t finish_
Definition: LazyGetter.h:97
uint32_t region_
Definition: LazyGetter.h:95
const LazyGetter< T > * getter_
Definition: LazyGetter.h:99
uint32_t start_
Definition: LazyGetter.h:96
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 116 of file LazyGetter.h.

116  :
117  region_(region),
118  start_(start),
119  finish_(finish),
120  unpacked_(false),
121  getter_(theLazyGetter)
122  {}
uint32_t finish_
Definition: LazyGetter.h:97
uint32_t region_
Definition: LazyGetter.h:95
uint32_t finish() const
Get off-the-end finish index.
Definition: LazyGetter.h:142
const LazyGetter< T > * getter_
Definition: LazyGetter.h:99
uint32_t start_
Definition: LazyGetter.h:96
uint32_t region() const
Get region number.
Definition: LazyGetter.h:127
uint32_t start() const
Get start index.
Definition: LazyGetter.h:135

Member Function Documentation

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

Get begin iterator.

Definition at line 182 of file LazyGetter.h.

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

183  {
184  //check pointer here and throw if null
185  return getter_->begin_record()+start_;
186  }
const LazyGetter< T > * getter_
Definition: LazyGetter.h:99
uint32_t start_
Definition: LazyGetter.h:96
template<class T >
RegionIndex< T >::const_iterator edm::RegionIndex< T >::end ( void  ) const
inline

Get off the end iterator.

Definition at line 191 of file LazyGetter.h.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and MeasurementTrackerImpl::updateStrips().

192  {
193  //check pointer here and throw if null
194  return getter_->begin_record()+finish_;
195  }
uint32_t finish_
Definition: LazyGetter.h:97
const LazyGetter< T > * getter_
Definition: LazyGetter.h:99
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 209 of file LazyGetter.h.

References begin, and end.

Referenced by BeautifulSoup.Tag::_invert(), and BeautifulSoup.PageElement::insert().

210  {
211  return std::equal_range(begin(),end(),id);
212  }
const_iterator end() const
Get off the end iterator.
Definition: LazyGetter.h:191
const_iterator begin() const
Get begin iterator.
Definition: LazyGetter.h:182
template<class T >
uint32_t edm::RegionIndex< T >::finish ( ) const
inline

Get off-the-end finish index.

Definition at line 142 of file LazyGetter.h.

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

143  {
144  return finish_;
145  }
uint32_t finish_
Definition: LazyGetter.h:97
template<class T >
void edm::RegionIndex< T >::finish ( uint32_t  newfinish)
inlineprivate

Set of-the-end finish index.

Definition at line 166 of file LazyGetter.h.

Referenced by progressbar.ProgressBar::__next__().

167  {
168  finish_=newfinish;
169  }
uint32_t finish_
Definition: LazyGetter.h:97
template<class T >
uint32_t edm::RegionIndex< T >::region ( ) const
inline

Get region number.

Definition at line 127 of file LazyGetter.h.

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

128  {
129  return region_;
130  }
uint32_t region_
Definition: LazyGetter.h:95
template<class T >
uint32_t edm::RegionIndex< T >::start ( ) const
inline
template<class T >
void edm::RegionIndex< T >::start ( uint32_t  newstart)
inlineprivate

Set start index.

Definition at line 158 of file LazyGetter.h.

Referenced by progressbar.ProgressBar::__next__(), Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

159  {
160  start_=newstart;
161  }
uint32_t start_
Definition: LazyGetter.h:96
template<class T >
bool edm::RegionIndex< T >::unpacked ( ) const
inline

Get unpacking status.

Definition at line 150 of file LazyGetter.h.

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

151  {
152  return unpacked_;
153  }
template<class T >
void edm::RegionIndex< T >::unpacked ( bool  newunpacked)
inlineprivate

Set unpacking status.

Definition at line 174 of file LazyGetter.h.

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

Update the pointer to the lazyGetter.

Definition at line 200 of file LazyGetter.h.

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

201  {
202  getter_ = newGetter;
203  return *this;
204  }
const LazyGetter< T > * getter_
Definition: LazyGetter.h:99

Friends And Related Function Documentation

template<class T>
friend class LazyAdapter< T >
friend

Definition at line 44 of file LazyGetter.h.

Member Data Documentation

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

Definition at line 97 of file LazyGetter.h.

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

Definition at line 99 of file LazyGetter.h.

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

Definition at line 95 of file LazyGetter.h.

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

Definition at line 96 of file LazyGetter.h.

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

Definition at line 98 of file LazyGetter.h.