CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
cond::persistency::PayloadProxy< DataT > Class Template Reference

#include <PayloadProxy.h>

Inheritance diagram for cond::persistency::PayloadProxy< DataT >:
cond::persistency::BasePayloadProxy

Public Member Functions

void invalidateCache () override
 
virtual void invalidateTransientCache ()
 
void make () override
 
const DataT & operator() () const
 
 PayloadProxy (const char *source=0)
 
 ~PayloadProxy () override
 
- Public Member Functions inherited from cond::persistency::BasePayloadProxy
 BasePayloadProxy ()
 
IOVProxy iov ()
 
bool isValid () const
 
virtual void loadMore (CondGetter const &)
 
void loadTag (const std::string &tag)
 
void loadTag (const std::string &tag, const boost::posix_time::ptime &snapshotTime)
 
const HashpayloadId () const
 
void reload ()
 
const std::vector< Iov_t > & requests () const
 
ValidityInterval setIntervalFor (Time_t target, bool loadPayload=false)
 
void setUp (Session dbSession)
 
TimeType timeType () const
 
virtual ~BasePayloadProxy ()
 

Protected Member Functions

void loadPayload () override
 

Private Attributes

Hash m_currentPayloadId
 
std::shared_ptr< DataT > m_data
 

Additional Inherited Members

- Protected Attributes inherited from cond::persistency::BasePayloadProxy
Iov_t m_currentIov
 
IOVProxy m_iovProxy
 
std::vector< Iov_tm_requests
 
Session m_session
 

Detailed Description

template<typename DataT>
class cond::persistency::PayloadProxy< DataT >

Definition at line 78 of file PayloadProxy.h.

Constructor & Destructor Documentation

template<typename DataT>
cond::persistency::PayloadProxy< DataT >::PayloadProxy ( const char *  source = 0)
inlineexplicit

Definition at line 81 of file PayloadProxy.h.

template<typename DataT>
cond::persistency::PayloadProxy< DataT >::~PayloadProxy ( )
inlineoverride

Definition at line 84 of file PayloadProxy.h.

84 {}

Member Function Documentation

template<typename DataT>
void cond::persistency::PayloadProxy< DataT >::invalidateCache ( )
inlineoverridevirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 108 of file PayloadProxy.h.

108  {
109  m_data.reset();
110  m_currentPayloadId.clear();
112  m_requests.clear();
113  }
virtual void clear()
Definition: Types.cc:10
std::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:69
template<typename DataT>
virtual void cond::persistency::PayloadProxy< DataT >::invalidateTransientCache ( )
inlinevirtual

Definition at line 103 of file PayloadProxy.h.

103  {
104  m_data.reset();
105  m_currentPayloadId.clear();
106  }
std::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
template<typename DataT>
void cond::persistency::PayloadProxy< DataT >::loadPayload ( )
inlineoverrideprotectedvirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 116 of file PayloadProxy.h.

116  {
117  if( m_currentIov.payloadId.empty() ){
118  throwException( "Can't load payload: no valid IOV found.","PayloadProxy::loadPayload" );
119  }
122  m_requests.push_back( m_currentIov );
123  }
std::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:218
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:69
Hash payloadId
Definition: Types.h:57
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:14
template<typename DataT>
void cond::persistency::PayloadProxy< DataT >::make ( )
inlineoverridevirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 94 of file PayloadProxy.h.

template<typename DataT>
const DataT& cond::persistency::PayloadProxy< DataT >::operator() ( ) const
inline

Definition at line 87 of file PayloadProxy.h.

87  {
88  if( !m_data ) {
89  throwException( "The Payload has not been loaded.","PayloadProxy::operator()");
90  }
91  return (*m_data);
92  }
std::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:14

Member Data Documentation

template<typename DataT>
Hash cond::persistency::PayloadProxy< DataT >::m_currentPayloadId
private

Definition at line 127 of file PayloadProxy.h.

template<typename DataT>
std::shared_ptr<DataT> cond::persistency::PayloadProxy< DataT >::m_data
private

Definition at line 126 of file PayloadProxy.h.