CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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

virtual void invalidateCache ()
 
virtual void make ()
 
const DataT & operator() () const
 
 PayloadProxy (const char *source=0)
 
virtual ~PayloadProxy ()
 
- 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)
 
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

virtual void loadPayload ()
 

Private Attributes

Hash m_currentPayloadId
 
boost::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 76 of file PayloadProxy.h.

Constructor & Destructor Documentation

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

Definition at line 79 of file PayloadProxy.h.

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

Reimplemented in cond::persistency::PayloadProxy< cond::persistency::KeyList >.

Definition at line 82 of file PayloadProxy.h.

82 {}

Member Function Documentation

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

Implements cond::persistency::BasePayloadProxy.

Reimplemented in cond::persistency::PayloadProxy< cond::persistency::KeyList >.

Definition at line 101 of file PayloadProxy.h.

101  {
102  m_data.reset();
103  m_currentPayloadId.clear();
105  m_requests.clear();
106  }
virtual void clear()
Definition: Types.cc:10
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:67
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:119
template<typename DataT>
virtual void cond::persistency::PayloadProxy< DataT >::loadPayload ( )
inlineprotectedvirtual

Implements cond::persistency::BasePayloadProxy.

Reimplemented in cond::persistency::PayloadProxy< cond::persistency::KeyList >.

Definition at line 109 of file PayloadProxy.h.

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

109  {
110  if( m_currentIov.payloadId.empty() ){
111  throwException( "Can't load payload: no valid IOV found.","PayloadProxy::loadPayload" );
112  }
115  m_requests.push_back( m_currentIov );
116  }
boost::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:188
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:67
Hash payloadId
Definition: Types.h:53
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:119
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
template<typename DataT>
virtual void cond::persistency::PayloadProxy< DataT >::make ( )
inlinevirtual

Implements cond::persistency::BasePayloadProxy.

Definition at line 92 of file PayloadProxy.h.

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

Definition at line 85 of file PayloadProxy.h.

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

Member Data Documentation

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