CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 boost::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 (boost::shared_ptr< cond::persistency::PayloadProxy< DataT > > pdata)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyTemplate< RecordT, DataT >
 DataProxyTemplate ()
 
virtual const void * getImpl (const EventSetupRecord &iRecord, const DataKey &iKey)
 
- Public Member Functions inherited from edm::eventsetup::DataProxy
bool cacheIsValid () const
 
 DataProxy ()
 
void doGet (EventSetupRecord const &iRecord, DataKey const &iKey, bool iTransiently) const
 
void const * get (EventSetupRecord const &, DataKey const &iKey, bool iTransiently) 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

virtual void invalidateCache ()
 
virtual void invalidateTransientCache ()
 
virtual const DataT * make (const RecordT &, const edm::eventsetup::DataKey &)
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 

Private Member Functions

const DataProxyoperator= (const DataProxy &)
 

Private Attributes

boost::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 boost::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 ( boost::shared_ptr< cond::persistency::PayloadProxy< DataT > >  pdata)
inlineexplicit

Definition at line 25 of file DataProxy.h.

25  : m_data(pdata) {
26 
27  }
boost::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>>
virtual void DataProxy< RecordT, DataT, Initializer >::invalidateCache ( )
inlineprotectedvirtual

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>>
virtual void DataProxy< RecordT, DataT, Initializer >::invalidateTransientCache ( )
inlineprotectedvirtual

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.

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

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

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

Definition at line 37 of file DataProxy.h.

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

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
boost::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 > &  )
private

Member Data Documentation

template<class RecordT , class DataT , typename Initializer = cond::DefaultInitializer<DataT>>
boost::shared_ptr<cond::persistency::PayloadProxy<DataT> > DataProxy< RecordT, DataT, Initializer >::m_data
private
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.

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