CMS 3D CMS Logo

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

#include <FWCore/Framework/interface/DataProxy.h>

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

Public Types

typedef std::shared_ptr< cond::persistency::PayloadProxy< DataT > > DataP
 
typedef DataProxy< RecordT, DataT > self
 
- Public Types inherited from edm::eventsetup::DataProxyTemplate< RecordT, DataT >
typedef RecordT record_type
 
typedef DataT value_type
 

Public Member Functions

 DataProxy (std::shared_ptr< cond::persistency::PayloadProxy< DataT > > pdata)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyTemplate< RecordT, DataT >
 DataProxyTemplate ()
 
const void * getImpl (const EventSetupRecordImpl &iRecord, const DataKey &iKey) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxy
bool cacheIsValid () const
 
 DataProxy ()
 
void doGet (EventSetupRecordImpl const &iRecord, DataKey const &iKey, bool iTransiently, ActivityRegistry const *) const
 
void const * get (EventSetupRecordImpl const &, DataKey const &iKey, bool iTransiently, ActivityRegistry const *) const
 
void invalidate ()
 
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 invalidateCache () override
 
void invalidateTransientCache () override
 
const DataT * make (const RecordT &, const edm::eventsetup::DataKey &) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 
virtual void const * getImpl (EventSetupRecordImpl const &, DataKey const &iKey)=0
 

Private Member Functions

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 >

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

Member Typedef Documentation

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

Definition at line 23 of file DataProxy.h.

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

Definition at line 22 of file DataProxy.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file DataProxy.h.

25  : m_data(pdata) {
26 
27  }
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:54

Member Function Documentation

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

indicates that the Proxy should invalidate any cached information as that information has 'expired' (i.e. we have moved to a new IOV)

Implements edm::eventsetup::DataProxy.

Definition at line 42 of file DataProxy.h.

42  {
43  // don't, preserve data for future access
44  // m_data->invalidateCache();
45  }
template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
void DataProxy< RecordT, DataT, Initializer >::invalidateTransientCache ( )
inlineoverrideprotectedvirtual

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 from edm::eventsetup::DataProxy.

Definition at line 46 of file DataProxy.h.

46  {
47  m_data->invalidateTransientCache();
48  }
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:54
template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
const DataT* DataProxy< RecordT, DataT, Initializer >::make ( const RecordT &  ,
const edm::eventsetup::DataKey  
)
inlineoverrideprotectedvirtual

Implements edm::eventsetup::DataProxyTemplate< RecordT, DataT >.

Definition at line 37 of file DataProxy.h.

37  {
38  m_data->make();
39  m_initializer(const_cast<DataT&>((*m_data)()));
40  return &(*m_data)();
41  }
Initializer m_initializer
Definition: DataProxy.h:55
std::shared_ptr< cond::persistency::PayloadProxy< DataT > > m_data
Definition: DataProxy.h:54
template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
const DataProxy& DataProxy< RecordT, DataT, Initializer >::operator= ( const DataProxy< RecordT, DataT, Initializer > &  )
privatedelete

Member Data Documentation

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

Definition at line 54 of file DataProxy.h.

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

Definition at line 55 of file DataProxy.h.