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 invalidateTransientCache ()
 
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)
 
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

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 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>
virtual cond::persistency::PayloadProxy< DataT >::~PayloadProxy ( )
inlinevirtual

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

Definition at line 84 of file PayloadProxy.h.

84 {}

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 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::vector< Iov_t > m_requests
Definition: PayloadProxy.h:69
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
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  }
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
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 116 of file PayloadProxy.h.

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

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  }
boost::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:215
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:69
Hash payloadId
Definition: Types.h:58
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
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 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  }
boost::shared_ptr< DataT > m_data
Definition: PayloadProxy.h:126
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