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::ESSourceDataProxyNonConcurrentBase edm::eventsetup::ESSourceDataProxyBase edm::eventsetup::DataProxy

Public Member Functions

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

Private Member Functions

void initializeForNewIOV () override
 

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.

std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:55

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 48 of file DataProxy.h.

48 { 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 51 of file DataProxy.h.

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

51 { m_data->initializeForNewIOV(); }
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:55

◆ operator=()

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

◆ 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 43 of file DataProxy.h.

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

43  {
44  m_data->make();
45  m_initializer(const_cast<DataT&>((*m_data)()));
46  }
Initializer m_initializer
Definition: DataProxy.h:56
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:55

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 56 of file DataProxy.h.

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