#include <DataProxy.h>
Public Member Functions | |
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 () |
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 42 of file DataProxy.h.
Definition at line 38 of file DataProxy.cc.
|
delete |
Definition at line 44 of file DataProxy.cc.
|
inline |
Definition at line 50 of file DataProxy.h.
References cacheIsValid_.
Referenced by get(), getAfterPrefetch(), and edm::eventsetup::EventSetupRecordImpl::wasGotten().
|
protected |
Definition at line 46 of file DataProxy.cc.
References cache_, cacheIsValid_, and nonTransientAccessRequested_.
Referenced by invalidate(), and resetIfTransient().
const void * DataProxy< RecordT, DataT, Initializer >::get | ( | EventSetupRecordImpl const & | iRecord, |
DataKey const & | iKey, | ||
bool | iTransiently, | ||
ActivityRegistry const * | activityRegistry, | ||
EventSetupImpl const * | iEventSetupImpl, | ||
ESParentContext const & | iParent | ||
) | const |
Definition at line 99 of file DataProxy.cc.
References cacheIsValid(), Exception, getAfterPrefetch(), and edm::errors::LogicError.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), edm::eventsetup::EventSetupRecordImpl::getFromProxy(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().
void const * DataProxy< RecordT, DataT, Initializer >::getAfterPrefetch | ( | const EventSetupRecordImpl & | iRecord, |
const DataKey & | iKey, | ||
bool | iTransiently | ||
) | const |
Definition at line 77 of file DataProxy.cc.
References cache_, cacheIsValid(), cacheIsValid_, getAfterPrefetchImpl(), LIKELY, nonTransientAccessRequested_, and UNLIKELY.
Referenced by get(), and edm::eventsetup::EventSetupRecordImpl::getFromProxyAfterPrefetch().
|
protectedpure virtual |
used to retrieve the data from the implementation. The data is then cached locally.
Implemented in edm::eventsetup::CallbackProxy< CallbackT, RecordT, DataT >, edm::eventsetup::ESSourceDataProxyTemplate< DataT >, edm::eventsetup::ESSourceConcurrentDataProxyTemplate< DataT >, and edm::test::TestDataProxy< T >.
Referenced by getAfterPrefetch().
|
inlinevirtual |
Reimplemented in DataProxy< RecordT, DataT, Initializer >.
Definition at line 80 of file DataProxy.h.
|
inline |
Definition at line 71 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 edm::eventsetup::DataProxyTemplate< RecordT, DataT >, 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 59 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 68 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::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 68 of file DataProxy.h.
References description_.
Referenced by edm::eventsetup::EventSetupRecordImpl::add(), edm::eventsetup::EventSetupRecordImpl::getFromProxy(), edm::eventsetup::EventSetupRecordImpl::getFromProxyAfterPrefetch(), and edm::eventsetup::EventSetupRecordImpl::providerDescription().
void DataProxy< RecordT, DataT, Initializer >::resetIfTransient | ( | ) |
Definition at line 52 of file DataProxy.cc.
References clearCacheIsValid(), invalidateTransientCache(), and nonTransientAccessRequested_.
|
inline |
Definition at line 78 of file DataProxy.h.
References description_.
|
mutableprivate |
Definition at line 117 of file DataProxy.h.
Referenced by clearCacheIsValid(), and getAfterPrefetch().
|
mutableprivate |
Definition at line 118 of file DataProxy.h.
Referenced by cacheIsValid(), clearCacheIsValid(), and getAfterPrefetch().
|
private |
Definition at line 116 of file DataProxy.h.
Referenced by providerDescription(), and setProviderDescription().
|
mutableprivate |
Definition at line 151 of file DataProxy.h.
Referenced by clearCacheIsValid(), getAfterPrefetch(), and resetIfTransient().