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 Attributes | Private Member Functions
cond::persistency::BasePayloadProxy Class Referenceabstract

#include <PayloadProxy.h>

Inheritance diagram for cond::persistency::BasePayloadProxy:
cond::persistency::PayloadProxy< DataT > cond::persistency::PayloadProxy< std::vector< cond::Time_t > > cond::persistency::PayloadProxy< cond::persistency::KeyList >

Public Member Functions

 BasePayloadProxy ()
 
virtual void invalidateCache ()=0
 
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)
 
virtual void make ()=0
 
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 Attributes

Iov_t m_currentIov
 
IOVProxy m_iovProxy
 
std::vector< Iov_tm_requests
 
Session m_session
 

Private Member Functions

virtual void loadPayload ()=0
 

Detailed Description

Definition at line 22 of file PayloadProxy.h.

Constructor & Destructor Documentation

cond::persistency::BasePayloadProxy::BasePayloadProxy ( )

Definition at line 7 of file PayloadProxy.cc.

cond::persistency::BasePayloadProxy::~BasePayloadProxy ( )
virtual

Definition at line 11 of file PayloadProxy.cc.

11 {}

Member Function Documentation

virtual void cond::persistency::BasePayloadProxy::invalidateCache ( )
pure virtual
IOVProxy cond::persistency::BasePayloadProxy::iov ( )

Definition at line 55 of file PayloadProxy.cc.

References m_iovProxy.

55  {
56  return m_iovProxy;
57  }
bool cond::persistency::BasePayloadProxy::isValid ( void  ) const
virtual void cond::persistency::BasePayloadProxy::loadMore ( CondGetter const &  )
inlinevirtual

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

Definition at line 52 of file PayloadProxy.h.

52  {
53  }
virtual void cond::persistency::BasePayloadProxy::loadPayload ( )
privatepure virtual
void cond::persistency::BasePayloadProxy::loadTag ( const std::string &  tag)
void cond::persistency::BasePayloadProxy::loadTag ( const std::string &  tag,
const boost::posix_time::ptime &  snapshotTime 
)
virtual void cond::persistency::BasePayloadProxy::make ( )
pure virtual
const Hash& cond::persistency::BasePayloadProxy::payloadId ( ) const
inline

Definition at line 43 of file PayloadProxy.h.

References m_currentIov, and cond::Iov_t::payloadId.

void cond::persistency::BasePayloadProxy::reload ( )
const std::vector<Iov_t>& cond::persistency::BasePayloadProxy::requests ( ) const
inline

Definition at line 57 of file PayloadProxy.h.

References m_requests.

57  {
58  return m_requests;
59  }
std::vector< Iov_t > m_requests
Definition: PayloadProxy.h:69
ValidityInterval cond::persistency::BasePayloadProxy::setIntervalFor ( cond::Time_t  time,
bool  loadPayload = false 
)

Definition at line 37 of file PayloadProxy.cc.

References cond::Iov_t::clear(), cond::persistency::Transaction::commit(), cond::persistency::IOVProxy::end(), cond::persistency::IOVProxy::find(), cond::Iov_t::isValidFor(), loadPayload(), m_currentIov, m_iovProxy, m_session, cond::Iov_t::since, cond::persistency::Transaction::start(), cond::Iov_t::till, and cond::persistency::Session::transaction().

37  {
38  if( !m_currentIov.isValidFor( time ) ){
40  m_session.transaction().start(true);
41  auto it = m_iovProxy.find( time );
42  if( it != m_iovProxy.end() ) {
43  m_currentIov = *it;
44  if(load) loadPayload();
45  }
47  }
49  }
virtual void clear()
Definition: Types.cc:10
void start(bool readOnly=true)
Definition: Session.cc:22
Time_t since
Definition: Types.h:56
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
Transaction & transaction()
Definition: Session.cc:66
def load
Definition: svgfig.py:546
Iterator find(cond::Time_t time)
Definition: IOVProxy.cc:288
bool isValidFor(Time_t target) const
Definition: Types.cc:20
Iterator end() const
Definition: IOVProxy.cc:265
Time_t till
Definition: Types.h:57
void cond::persistency::BasePayloadProxy::setUp ( Session  dbSession)

Definition at line 13 of file PayloadProxy.cc.

References invalidateCache(), and m_session.

13  {
14  m_session = dbSession;
15  invalidateCache();
16  }
TimeType cond::persistency::BasePayloadProxy::timeType ( ) const
inline

Definition at line 50 of file PayloadProxy.h.

References m_iovProxy, and cond::persistency::IOVProxy::timeType().

50 { return m_iovProxy.timeType();}
cond::TimeType timeType() const
Definition: IOVProxy.cc:191

Member Data Documentation

Iov_t cond::persistency::BasePayloadProxy::m_currentIov
protected
IOVProxy cond::persistency::BasePayloadProxy::m_iovProxy
protected

Definition at line 66 of file PayloadProxy.h.

Referenced by iov(), loadTag(), reload(), setIntervalFor(), and timeType().

std::vector<Iov_t> cond::persistency::BasePayloadProxy::m_requests
protected
Session cond::persistency::BasePayloadProxy::m_session
protected