CMS 3D CMS Logo

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

#include <TestDataProxy.h>

Inheritance diagram for edm::test::TestDataProxy< T >:
edm::eventsetup::DataProxy

Public Member Functions

void const * getAfterPrefetchImpl () const final
 
void invalidateCache () final
 
void prefetchAsyncImpl (WaitingTaskHolder, eventsetup::EventSetupRecordImpl const &, eventsetup::DataKey const &, EventSetupImpl const *, ServiceToken const &, ESParentContext const &) final
 
void setData (std::unique_ptr< T > iData)
 
 TestDataProxy ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxy
bool cacheIsValid () const
 
 DataProxy ()
 
 DataProxy (DataProxy const &)=delete
 
void const * get (EventSetupRecordImpl const &, DataKey const &, bool iTransiently, ActivityRegistry const *, EventSetupImpl const *, ESParentContext const &) const
 
void const * getAfterPrefetch (const EventSetupRecordImpl &iRecord, const DataKey &iKey, bool iTransiently) const
 
virtual void initializeForNewIOV ()
 
void invalidate ()
 
DataProxy const & operator= (DataProxy const &)=delete
 
void prefetchAsync (WaitingTaskHolder, EventSetupRecordImpl const &, DataKey const &, EventSetupImpl const *, ServiceToken const &, ESParentContext const &) const
 
ComponentDescription const * providerDescription () const
 returns the description of the DataProxyProvider which owns this Proxy More...
 
void resetIfTransient ()
 
void setProviderDescription (ComponentDescription const *iDesc)
 
virtual ~DataProxy ()
 

Private Attributes

std::unique_ptr< Tdata_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 
virtual void invalidateTransientCache ()
 

Detailed Description

template<typename T>
class edm::test::TestDataProxy< T >

Definition at line 34 of file TestDataProxy.h.

Constructor & Destructor Documentation

template<typename T >
edm::test::TestDataProxy< T >::TestDataProxy ( )
inline

Definition at line 36 of file TestDataProxy.h.

36 {}

Member Function Documentation

template<typename T >
void const* edm::test::TestDataProxy< T >::getAfterPrefetchImpl ( ) const
inlinefinalvirtual

used to retrieve the data from the implementation. The data is then cached locally.

Implements edm::eventsetup::DataProxy.

Definition at line 51 of file TestDataProxy.h.

References edm::test::TestDataProxy< T >::data_.

51 { return data_.get(); }
std::unique_ptr< T > data_
Definition: TestDataProxy.h:54
template<typename T >
void edm::test::TestDataProxy< T >::invalidateCache ( )
inlinefinalvirtual

indicates that the Proxy should invalidate any cached information as that information has 'expired' (i.e. we have moved to a new IOV)

Implements edm::eventsetup::DataProxy.

Definition at line 49 of file TestDataProxy.h.

References edm::test::TestDataProxy< T >::data_.

49 { data_.reset(); }
std::unique_ptr< T > data_
Definition: TestDataProxy.h:54
template<typename T >
void edm::test::TestDataProxy< T >::prefetchAsyncImpl ( WaitingTaskHolder  ,
eventsetup::EventSetupRecordImpl const &  ,
eventsetup::DataKey const &  iKey,
EventSetupImpl const *  ,
ServiceToken const &  ,
ESParentContext const &   
)
inlinefinalvirtual

This is the function which does the real work of getting the data if it is not already cached. The returning 'void const*' must point to an instance of the class type corresponding to the type designated in iKey. So if iKey refers to a base class interface the pointer must be a pointer to that base class interface and not a pointer to an inheriting class instance.

Implements edm::eventsetup::DataProxy.

Definition at line 40 of file TestDataProxy.h.

45  {
46  return;
47  }
template<typename T >
void edm::test::TestDataProxy< T >::setData ( std::unique_ptr< T iData)
inline

Definition at line 38 of file TestDataProxy.h.

References edm::test::TestDataProxy< T >::data_, and eostools::move().

38 { data_ = std::move(iData); }
def move
Definition: eostools.py:511
std::unique_ptr< T > data_
Definition: TestDataProxy.h:54

Member Data Documentation

template<typename T >
std::unique_ptr<T> edm::test::TestDataProxy< T >::data_
private