CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

edm::LazyAdapter< T > Class Template Reference

#include <LazyGetter.h>

Inheritance diagram for edm::LazyAdapter< T >:
unary_function

List of all members.

Public Types

typedef std::vector< Trecord_type

Public Member Functions

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

Private Attributes

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

Detailed Description

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

Definition at line 225 of file LazyGetter.h.


Member Typedef Documentation

template<typename 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.

                                                                                                                           :
      unpacker_(const_cast< LazyUnpacker<T>* >(iunpacker)),
      record_(const_cast<record_type*>(irecord)),
      getter_(getter) {}

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

    {
      RegionIndex<T>& indexref = const_cast< RegionIndex<T>& >(index);
      if (!index.unpacked()) {
        indexref.start(record_->size());
        unpacker_->fill(index.region(),*record_);
        indexref.unpacked(true);
        indexref.finish(record_->size());
        indexref.updateLazyGetter(getter_);
      }
      return index;
    }

Member Data Documentation

template<typename T>
const LazyGetter<T>* edm::LazyAdapter< T >::getter_ [private]

Definition at line 239 of file LazyGetter.h.

template<typename T>
record_type* edm::LazyAdapter< T >::record_ [private]

Definition at line 238 of file LazyGetter.h.

template<typename T>
LazyUnpacker<T>* edm::LazyAdapter< T >::unpacker_ [private]

Definition at line 237 of file LazyGetter.h.