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 Attributes
edm::LazyAdapter< T > Class Template Reference

#include <LazyGetter.h>

Inheritance diagram for edm::LazyAdapter< T >:

Public Types

typedef std::vector< Trecord_type
 

Public Member Functions

 LazyAdapter (const LazyUnpacker< T > *, const record_type *, const LazyGetter< T > *)
 Constructor. More...
 
const RegionIndex< T > & operator() (const RegionIndex< T > &region) const
 () operator for construction of iterator More...
 

Private Attributes

const LazyGetter< T > * getter_
 
record_typerecord_
 
LazyUnpacker< T > * unpacker_
 

Detailed Description

template<class T>
class edm::LazyAdapter< T >

Definition at line 22 of file LazyGetter.h.

Member Typedef Documentation

template<class T >
typedef std::vector<T> edm::LazyAdapter< T >::record_type

Definition at line 235 of file LazyGetter.h.

Constructor & Destructor Documentation

template<class T >
edm::LazyAdapter< T >::LazyAdapter ( const LazyUnpacker< T > *  iunpacker,
const record_type irecord,
const LazyGetter< T > *  getter 
)
inline

Constructor.

Definition at line 251 of file LazyGetter.h.

251  :
252  unpacker_(const_cast< LazyUnpacker<T>* >(iunpacker)),
253  record_(const_cast<record_type*>(irecord)),
254  getter_(getter) {}
LazyUnpacker< T > * unpacker_
Definition: LazyGetter.h:244
record_type * record_
Definition: LazyGetter.h:245
const LazyGetter< T > * getter_
Definition: LazyGetter.h:246

Member Function Documentation

template<class T >
const RegionIndex< T > & edm::LazyAdapter< T >::operator() ( const RegionIndex< T > &  region) const
inline

() operator for construction of iterator

Definition at line 259 of file LazyGetter.h.

References edm::RegionIndex< T >::finish(), getHLTprescales::index, edm::RegionIndex< T >::region(), edm::RegionIndex< T >::start(), edm::RegionIndex< T >::unpacked(), and edm::RegionIndex< T >::updateLazyGetter().

260  {
261  RegionIndex<T>& indexref = const_cast< RegionIndex<T>& >(index);
262  if (!index.unpacked()) {
263  indexref.start(record_->size());
264  unpacker_->fill(index.region(),*record_);
265  indexref.unpacked(true);
266  indexref.finish(record_->size());
267  indexref.updateLazyGetter(getter_);
268  }
269  return index;
270  }
LazyUnpacker< T > * unpacker_
Definition: LazyGetter.h:244
record_type * record_
Definition: LazyGetter.h:245
const LazyGetter< T > * getter_
Definition: LazyGetter.h:246

Member Data Documentation

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

Definition at line 246 of file LazyGetter.h.

template<class T >
record_type* edm::LazyAdapter< T >::record_
private

Definition at line 245 of file LazyGetter.h.

template<class T >
LazyUnpacker<T>* edm::LazyAdapter< T >::unpacker_
private

Definition at line 244 of file LazyGetter.h.