CMS 3D CMS Logo

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

#include <DetSetLazyVector.h>

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

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.

70 : getter_(iGetter) {}
boost::shared_ptr< LazyGetter< T > > getter_

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 groupFilesInBlocks::temp.

71  {
72  if(iUpdate.data.empty() && getter_) {
73  //NOTE: because this is 'updating a cache' we need to cast away the const
74  DetSet<T>& temp = const_cast< DetSet<T>& >(iUpdate);
75  getter_->fill(temp);
76  std::sort(temp.begin(),temp.end());
77  }
78  return iUpdate;
79  }
boost::shared_ptr< LazyGetter< T > > getter_

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