CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 initKeyList (PayloadProxy const &)
 
void make () override
 
const DataT & operator() () const
 
 PayloadProxy (Iov_t const *mostRecentCurrentIov, Session const *mostRecentSession, std::shared_ptr< std::vector< Iov_t >> const *mostRecentRequests, const char *source=nullptr)
 
 ~PayloadProxy () override
 
- Public Member Functions inherited from cond::persistency::BasePayloadProxy
 BasePayloadProxy (Iov_t const *mostRecentCurrentIov, Session const *mostRecentSession, std::shared_ptr< std::vector< Iov_t >> const *mostRecentRequests)
 
void initializeForNewIOV ()
 
bool isValid () const
 
virtual void loadMore (CondGetter const &)
 
virtual ~BasePayloadProxy ()
 

Protected Member Functions

void loadPayload () override
 

Private Attributes

Hash m_currentPayloadId
 
std::unique_ptr< DataT > m_data
 

Additional Inherited Members

- Protected Attributes inherited from cond::persistency::BasePayloadProxy
Iov_t m_iovAtInitialization
 
Iov_t const * m_mostRecentCurrentIov
 
std::shared_ptr< std::vector
< Iov_t > > const * 
m_mostRecentRequests
 
Session const * m_mostRecentSession
 
std::shared_ptr< std::vector
< Iov_t > > 
m_requests
 
Session m_session
 

Detailed Description

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

Definition at line 61 of file PayloadProxy.h.

Constructor & Destructor Documentation

template<typename DataT>
cond::persistency::PayloadProxy< DataT >::PayloadProxy ( Iov_t const *  mostRecentCurrentIov,
Session const *  mostRecentSession,
std::shared_ptr< std::vector< Iov_t >> const *  mostRecentRequests,
const char *  source = nullptr 
)
inlineexplicit

Definition at line 63 of file PayloadProxy.h.

67  : BasePayloadProxy(mostRecentCurrentIov, mostRecentSession, mostRecentRequests) {}
BasePayloadProxy(Iov_t const *mostRecentCurrentIov, Session const *mostRecentSession, std::shared_ptr< std::vector< Iov_t >> const *mostRecentRequests)
Definition: PayloadProxy.cc:7
template<typename DataT>
cond::persistency::PayloadProxy< DataT >::~PayloadProxy ( )
inlineoverride

Definition at line 69 of file PayloadProxy.h.

69 {}

Member Function Documentation

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

Definition at line 71 of file PayloadProxy.h.

71 {}
template<typename DataT>
void cond::persistency::PayloadProxy< DataT >::loadPayload ( )
inlineoverrideprotectedvirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 92 of file PayloadProxy.h.

Referenced by cond::persistency::PayloadProxy< std::vector< cond::Time_t > >::make().

92  {
93  if (m_iovAtInitialization.payloadId.empty()) {
94  throwException("Can't load payload: no valid IOV found.", "PayloadProxy::loadPayload");
95  }
99  }
std::shared_ptr< std::vector< Iov_t > > m_requests
Definition: PayloadProxy.h:50
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:213
Hash payloadId
Definition: Types.h:55
std::unique_ptr< DataT > m_data
Definition: PayloadProxy.h:102
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
template<typename DataT>
void cond::persistency::PayloadProxy< DataT >::make ( )
inlineoverridevirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 81 of file PayloadProxy.h.

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

Definition at line 74 of file PayloadProxy.h.

74  {
75  if (!m_data) {
76  throwException("The Payload has not been loaded.", "PayloadProxy::operator()");
77  }
78  return (*m_data);
79  }
std::unique_ptr< DataT > m_data
Definition: PayloadProxy.h:102
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

Member Data Documentation

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