CMS 3D CMS Logo

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 * getImpl (eventsetup::EventSetupRecordImpl const &, eventsetup::DataKey const &iKey) final
 
void invalidateCache () final
 
void setData (std::unique_ptr< T > iData)
 
 TestDataProxy ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxy
bool cacheIsValid () const
 
 DataProxy ()
 
void doGet (EventSetupRecordImpl const &iRecord, DataKey const &iKey, bool iTransiently, ActivityRegistry *) const
 
void const * get (EventSetupRecordImpl const &, DataKey const &iKey, bool iTransiently, ActivityRegistry *) const
 
void invalidate ()
 
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 33 of file TestDataProxy.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file TestDataProxy.h.

37 {}

Member Function Documentation

template<typename T>
void const* edm::test::TestDataProxy< T >::getImpl ( eventsetup::EventSetupRecordImpl const &  ,
eventsetup::DataKey const &  iKey 
)
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 43 of file TestDataProxy.h.

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

43  {
44  return data_.get();
45  }
std::unique_ptr< T > data_
Definition: TestDataProxy.h:52
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 47 of file TestDataProxy.h.

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

47  {
48  data_.reset();
49  }
std::unique_ptr< T > data_
Definition: TestDataProxy.h:52
template<typename T>
void edm::test::TestDataProxy< T >::setData ( std::unique_ptr< T iData)
inline

Definition at line 39 of file TestDataProxy.h.

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

39  {
40  data_ = std::move(iData);
41  }
std::unique_ptr< T > data_
Definition: TestDataProxy.h:52
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

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