CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::eventsetup::ESSourceDataProxyNonConcurrentBase Class Reference

#include <ESSourceDataProxyNonConcurrentBase.h>

Inheritance diagram for edm::eventsetup::ESSourceDataProxyNonConcurrentBase:
edm::eventsetup::ESSourceDataProxyBase edm::eventsetup::DataProxy edm::eventsetup::ESSourceDataProxyTemplate< DataT > edmtest::TestESSourceTestProxy DataProxy< RecordT, DataT, Initializer >

Public Member Functions

 ESSourceDataProxyNonConcurrentBase (edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
 
std::mutex * mutex () const
 
edm::SerialTaskQueuequeue () const
 
- Public Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
 ESSourceDataProxyBase ()
 
- 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 Member Functions

void prefetchAsyncImpl (edm::WaitingTaskHolder iTask, edm::eventsetup::EventSetupRecordImpl const &iES, edm::eventsetup::DataKey const &iKey, edm::EventSetupImpl const *, edm::ServiceToken const &, edm::ESParentContext const &) final
 

Private Attributes

std::mutexm_mutex
 
edm::SerialTaskQueuem_queue
 

Additional Inherited Members

- Protected Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
void invalidateCache () override
 
void invalidateTransientCache () override
 
virtual void prefetch (edm::eventsetup::DataKey const &iKey, EventSetupRecordDetails)=0
 
template<typename ASYNC , typename GUARD >
void prefetchAsyncImplTemplate (ASYNC iAsync, GUARD iGuardFactory, edm::WaitingTaskHolder iTask, edm::eventsetup::EventSetupRecordImpl const &iRecord, edm::eventsetup::DataKey const &iKey, edm::ESParentContext const &iContext)
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 
virtual void const * getAfterPrefetchImpl () const =0
 

Detailed Description

Definition at line 36 of file ESSourceDataProxyNonConcurrentBase.h.

Constructor & Destructor Documentation

◆ ESSourceDataProxyNonConcurrentBase()

edm::eventsetup::ESSourceDataProxyNonConcurrentBase::ESSourceDataProxyNonConcurrentBase ( edm::SerialTaskQueue iQueue,
std::mutex iMutex 
)
inline

Member Function Documentation

◆ mutex()

std::mutex* edm::eventsetup::ESSourceDataProxyNonConcurrentBase::mutex ( ) const
inline

◆ prefetchAsyncImpl()

void ESSourceDataProxyNonConcurrentBase::prefetchAsyncImpl ( edm::WaitingTaskHolder  ,
edm::eventsetup::EventSetupRecordImpl const &  ,
edm::eventsetup::DataKey const &  iKey,
edm::EventSetupImpl const *  ,
edm::ServiceToken const &  ,
edm::ESParentContext const &   
)
finalprivatevirtual

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 22 of file ESSourceDataProxyNonConcurrentBase.cc.

References m_mutex, m_queue, eostools::move(), mutex(), edm::eventsetup::ESSourceDataProxyBase::prefetchAsyncImplTemplate(), and edm::SerialTaskQueue::push().

28  {
29  prefetchAsyncImplTemplate([this](auto& iGroup, auto iActivity) { m_queue->push(iGroup, std::move(iActivity)); },
30  [mutex = m_mutex]() { return std::lock_guard<std::mutex>(*mutex); },
31  std::move(iTask),
32  iRecord,
33  iKey,
34  iParent);
35 }
void prefetchAsyncImplTemplate(ASYNC iAsync, GUARD iGuardFactory, edm::WaitingTaskHolder iTask, edm::eventsetup::EventSetupRecordImpl const &iRecord, edm::eventsetup::DataKey const &iKey, edm::ESParentContext const &iContext)
void push(oneapi::tbb::task_group &, const T &iAction)
asynchronously pushes functor iAction into queue
def move(src, dest)
Definition: eostools.py:511

◆ queue()

edm::SerialTaskQueue* edm::eventsetup::ESSourceDataProxyNonConcurrentBase::queue ( ) const
inline

Definition at line 41 of file ESSourceDataProxyNonConcurrentBase.h.

References m_queue.

Member Data Documentation

◆ m_mutex

std::mutex* edm::eventsetup::ESSourceDataProxyNonConcurrentBase::m_mutex
private

Definition at line 55 of file ESSourceDataProxyNonConcurrentBase.h.

Referenced by mutex(), and prefetchAsyncImpl().

◆ m_queue

edm::SerialTaskQueue* edm::eventsetup::ESSourceDataProxyNonConcurrentBase::m_queue
private

Definition at line 54 of file ESSourceDataProxyNonConcurrentBase.h.

Referenced by prefetchAsyncImpl(), and queue().