#include <DataProxy.h>
Public Member Functions | |
bool | cacheIsValid () const |
DataProxy () | |
DataProxy (DataProxy const &)=delete | |
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 () |
Protected Member Functions | |
void | clearCacheIsValid () |
virtual void const * | getAfterPrefetchImpl () const =0 |
virtual void | invalidateCache ()=0 |
virtual void | invalidateTransientCache () |
virtual void | prefetchAsyncImpl (WaitingTaskHolder, EventSetupRecordImpl const &, DataKey const &iKey, EventSetupImpl const *, ServiceToken const &, ESParentContext const &)=0 |
Private Attributes | |
void const * | cache_ |
std::atomic< bool > | cacheIsValid_ |
ComponentDescription const * | description_ |
std::atomic< bool > | nonTransientAccessRequested_ |
Description: Base class for data Proxies held by a EventSetupRecord
Usage: This class defines the interface used to handle retrieving data from an EventSetup Record.
Definition at line 40 of file DataProxy.h.
Definition at line 27 of file DataProxy.cc.
|
delete |
Definition at line 33 of file DataProxy.cc.
|
inline |
Definition at line 48 of file DataProxy.h.
References cacheIsValid_.
Referenced by getAfterPrefetch(), and edm::eventsetup::EventSetupRecordImpl::wasGotten().
|
protected |
Definition at line 35 of file DataProxy.cc.
References cache_, cacheIsValid_, and nonTransientAccessRequested_.
Referenced by invalidate(), and resetIfTransient().
void const * DataProxy< RecordT, DataT, Initializer >::getAfterPrefetch | ( | const EventSetupRecordImpl & | iRecord, |
const DataKey & | iKey, | ||
bool | iTransiently | ||
) | const |
Definition at line 66 of file DataProxy.cc.
References cache_, cacheIsValid(), cacheIsValid_, getAfterPrefetchImpl(), LIKELY, nonTransientAccessRequested_, and UNLIKELY.
Referenced by edm::eventsetup::EventSetupRecordImpl::getFromProxyAfterPrefetch().
|
protectedpure virtual |
used to retrieve the data from the implementation. The data is then cached locally.
Implemented in edmtest::TestDataProxyTemplateJ, edm::eventsetup::CallbackProxy< CallbackT, RecordT, DataT >, edm::eventsetup::ESSourceDataProxyTemplate< DataT >, edm::eventsetup::ESSourceConcurrentDataProxyTemplate< DataT >, edm::test::TestDataProxy< T >, edmtest::TestESSourceTestProxy, and edmtest::TestESConcurrentSourceTestProxy.
Referenced by getAfterPrefetch().
|
inlinevirtual |
Reimplemented in DataProxy< RecordT, DataT, Initializer >, edmtest::TestESSourceTestProxy, and edmtest::TestESConcurrentSourceTestProxy.
Definition at line 72 of file DataProxy.h.
|
inline |
Definition at line 63 of file DataProxy.h.
References clearCacheIsValid(), and invalidateCache().
|
protectedpure virtual |
indicates that the Proxy should invalidate any cached information as that information has 'expired' (i.e. we have moved to a new IOV)
Implemented in edmtest::TestDataProxyTemplateJ, edm::eventsetup::DataProxyTemplate< RecordT, DataT >, edm::eventsetup::DataProxyTemplate< ESTestRecordJ, ESTestDataJ >, edm::eventsetup::CallbackProxy< CallbackT, RecordT, DataT >, edm::test::TestDataProxy< T >, and edm::eventsetup::ESSourceDataProxyBase.
Referenced by invalidate(), and invalidateTransientCache().
|
protectedvirtual |
indicates that the Proxy should invalidate any cached information as that information was accessed transiently and therefore is not intended to be kept over the entire IOV. Default is to call invalidateCache().
Reimplemented in edm::eventsetup::ESSourceDataProxyBase.
Definition at line 48 of file DataProxy.cc.
References invalidateCache().
Referenced by resetIfTransient().
void DataProxy< RecordT, DataT, Initializer >::prefetchAsync | ( | WaitingTaskHolder | iTask, |
EventSetupRecordImpl const & | iRecord, | ||
DataKey const & | iKey, | ||
EventSetupImpl const * | iEventSetupImpl, | ||
ServiceToken const & | iToken, | ||
ESParentContext const & | iParent | ||
) | const |
Definition at line 57 of file DataProxy.cc.
References prefetchAsyncImpl().
Referenced by edm::eventsetup::EventSetupRecordImpl::prefetchAsync().
|
protectedpure virtual |
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.
Implemented in edm::eventsetup::DataProxyTemplate< RecordT, DataT >, edm::eventsetup::DataProxyTemplate< ESTestRecordJ, ESTestDataJ >, edm::eventsetup::CallbackProxy< CallbackT, RecordT, DataT >, edm::eventsetup::ESSourceDataProxyNonConcurrentBase, edm::test::TestDataProxy< T >, and edm::eventsetup::ESSourceDataProxyConcurrentBase.
Referenced by prefetchAsync().
|
inline |
returns the description of the DataProxyProvider which owns this Proxy
Definition at line 60 of file DataProxy.h.
References description_.
Referenced by edm::eventsetup::EventSetupRecordImpl::add(), edm::eventsetup::EventSetupRecordImpl::getFromProxyAfterPrefetch(), and edm::eventsetup::EventSetupRecordImpl::providerDescription().
void DataProxy< RecordT, DataT, Initializer >::resetIfTransient | ( | ) |
Definition at line 41 of file DataProxy.cc.
References clearCacheIsValid(), invalidateTransientCache(), and nonTransientAccessRequested_.
|
inline |
Definition at line 70 of file DataProxy.h.
References description_.
|
mutableprivate |
Definition at line 109 of file DataProxy.h.
Referenced by clearCacheIsValid(), and getAfterPrefetch().
|
mutableprivate |
Definition at line 110 of file DataProxy.h.
Referenced by cacheIsValid(), clearCacheIsValid(), and getAfterPrefetch().
|
private |
Definition at line 108 of file DataProxy.h.
Referenced by providerDescription(), and setProviderDescription().
|
mutableprivate |
Definition at line 143 of file DataProxy.h.
Referenced by clearCacheIsValid(), getAfterPrefetch(), and resetIfTransient().