CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::dslv::LazyAdapter< T > Struct Template Reference

#include <DetSetLazyVector.h>

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

List of all members.

Public Member Functions

 LazyAdapter (boost::shared_ptr< LazyGetter< T > > iGetter)
const DetSet< T > & operator() (const DetSet< T > &iUpdate) const

Private Attributes

boost::shared_ptr< LazyGetter
< T > > 
getter_

Detailed Description

template<typename T>
struct edm::dslv::LazyAdapter< T >

Definition at line 69 of file DetSetLazyVector.h.


Constructor & Destructor Documentation

template<typename T>
edm::dslv::LazyAdapter< T >::LazyAdapter ( boost::shared_ptr< LazyGetter< T > >  iGetter) [inline]

Definition at line 70 of file DetSetLazyVector.h.

: getter_(iGetter) {}

Member Function Documentation

template<typename T>
const DetSet<T>& edm::dslv::LazyAdapter< T >::operator() ( const DetSet< T > &  iUpdate) const [inline]

Definition at line 71 of file DetSetLazyVector.h.

References edm::DetSet< T >::begin(), edm::DetSet< T >::data, edm::DetSet< T >::end(), edm::dslv::LazyAdapter< T >::getter_, python::multivaluedict::sort(), and cond::rpcobtemp::temp.

                                                                    {
          if(iUpdate.data.empty() && getter_) {
            //NOTE: because this is 'updating a cache' we need to cast away the const
            DetSet<T>& temp = const_cast< DetSet<T>& >(iUpdate);
            getter_->fill(temp);
            std::sort(temp.begin(),temp.end());
          }
          return iUpdate;
        }

Member Data Documentation

template<typename T>
boost::shared_ptr<LazyGetter<T> > edm::dslv::LazyAdapter< T >::getter_ [private]

Definition at line 81 of file DetSetLazyVector.h.

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