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

Member Typedef Documentation

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

Definition at line 228 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 244 of file LazyGetter.h.

244  :
245  unpacker_(const_cast< LazyUnpacker<T>* >(iunpacker)),
246  record_(const_cast<record_type*>(irecord)),
247  getter_(getter) {}
LazyUnpacker< T > * unpacker_
Definition: LazyGetter.h:237
record_type * record_
Definition: LazyGetter.h:238
const LazyGetter< T > * getter_
Definition: LazyGetter.h:239

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 252 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().

253  {
254  RegionIndex<T>& indexref = const_cast< RegionIndex<T>& >(index);
255  if (!index.unpacked()) {
256  indexref.start(record_->size());
257  unpacker_->fill(index.region(),*record_);
258  indexref.unpacked(true);
259  indexref.finish(record_->size());
260  indexref.updateLazyGetter(getter_);
261  }
262  return index;
263  }
LazyUnpacker< T > * unpacker_
Definition: LazyGetter.h:237
record_type * record_
Definition: LazyGetter.h:238
const LazyGetter< T > * getter_
Definition: LazyGetter.h:239

Member Data Documentation

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

Definition at line 239 of file LazyGetter.h.

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

Definition at line 238 of file LazyGetter.h.

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

Definition at line 237 of file LazyGetter.h.