CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DataProxy< RecordT, DataT, Initializer > Class Template Reference

#include <DataProxy.h>

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

Public Member Functions

 DataProxy (std::shared_ptr< cond::persistency::PayloadProxy< DataT >> pdata, edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
 
- Public Member Functions inherited from edm::eventsetup::ESSourceDataProxyTemplate< DataT >
 ESSourceDataProxyTemplate (edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
 
- Public Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
 ESSourceDataProxyBase (edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
 
std::mutex * mutex () const
 
edm::SerialTaskQueuequeue () const
 
- 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
 
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

DataT const * fetch () const final
 
void prefetch (edm::eventsetup::DataKey const &iKey, edm::EventSetupRecordDetails) final
 
- Protected Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
void invalidateCache () override
 
void invalidateTransientCache () override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 

Private Member Functions

void initializeForNewIOV () override
 
const DataProxyoperator= (const DataProxy &)=delete
 

Private Attributes

std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
 
Initializer m_initializer
 

Detailed Description

template<class RecordT, class DataT, typename Initializer = cond::DefaultInitializer<DataT>>
class DataProxy< RecordT, DataT, Initializer >

Definition at line 28 of file DataProxy.h.

Constructor & Destructor Documentation

◆ DataProxy()

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
DataProxy< RecordT, DataT, Initializer >::DataProxy ( std::shared_ptr< cond::persistency::PayloadProxy< DataT >>  pdata,
edm::SerialTaskQueue iQueue,
std::mutex iMutex 
)
inlineexplicit

Definition at line 30 of file DataProxy.h.

Member Function Documentation

◆ fetch()

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
DataT const* DataProxy< RecordT, DataT, Initializer >::fetch ( ) const
inlinefinalprotectedvirtual

Inheriting classes must also override void prefetch(edm::eventsetup::DataKey const& iKey, EventSetupRecordDetails) override; returns the data obtained in the call to prefetch

Implements edm::eventsetup::ESSourceDataProxyTemplate< DataT >.

Definition at line 46 of file DataProxy.h.

46 { return &(*m_data)(); }

◆ initializeForNewIOV()

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
void DataProxy< RecordT, DataT, Initializer >::initializeForNewIOV ( )
inlineoverrideprivatevirtual

Reimplemented from edm::eventsetup::DataProxy.

Definition at line 52 of file DataProxy.h.

52 { m_data->initializeForNewIOV(); }

References DataProxy< RecordT, DataT, Initializer >::m_data.

◆ operator=()

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
const DataProxy& DataProxy< RecordT, DataT, Initializer >::operator= ( const DataProxy< RecordT, DataT, Initializer > &  )
privatedelete

◆ prefetch()

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
void DataProxy< RecordT, DataT, Initializer >::prefetch ( edm::eventsetup::DataKey const &  iKey,
edm::EventSetupRecordDetails   
)
inlinefinalprotectedvirtual

Implements edm::eventsetup::ESSourceDataProxyBase.

Definition at line 41 of file DataProxy.h.

41  {
42  m_data->make();
43  m_initializer(const_cast<DataT&>((*m_data)()));
44  }

References DataProxy< RecordT, DataT, Initializer >::m_data, and DataProxy< RecordT, DataT, Initializer >::m_initializer.

Member Data Documentation

◆ m_data

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
std::shared_ptr<cond::persistency::PayloadProxy<DataT> > DataProxy< RecordT, DataT, Initializer >::m_data
private

◆ m_initializer

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
Initializer DataProxy< RecordT, DataT, Initializer >::m_initializer
private

Definition at line 57 of file DataProxy.h.

Referenced by DataProxy< RecordT, DataT, Initializer >::prefetch().

DataProxy::m_initializer
Initializer m_initializer
Definition: DataProxy.h:57
edm::eventsetup::ESSourceDataProxyTemplate
Definition: ESSourceDataProxyTemplate.h:36
DataProxy::m_data
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:56