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)
 
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 48 of file PayloadProxy.cc.

References m_iovProxy.

48  {
49  return m_iovProxy;
50  }
bool cond::persistency::BasePayloadProxy::isValid ( void  ) const

Definition at line 44 of file PayloadProxy.cc.

References cond::Iov_t::isValid(), and m_currentIov.

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

44  {
45  return m_currentIov.isValid();
46  }
bool isValid() const
Definition: Types.cc:16
virtual void cond::persistency::BasePayloadProxy::loadMore ( CondGetter const &  )
inlinevirtual

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

Definition at line 50 of file PayloadProxy.h.

50  {
51  }
virtual void cond::persistency::BasePayloadProxy::loadPayload ( )
privatepure virtual
void cond::persistency::BasePayloadProxy::loadTag ( const std::string &  tag)
virtual void cond::persistency::BasePayloadProxy::make ( )
pure virtual
const Hash& cond::persistency::BasePayloadProxy::payloadId ( ) const
inline

Definition at line 41 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 55 of file PayloadProxy.h.

References m_requests.

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

Definition at line 30 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().

30  {
31  if( !m_currentIov.isValidFor( time ) ){
33  m_session.transaction().start(true);
34  auto it = m_iovProxy.find( time );
35  if( it != m_iovProxy.end() ) {
36  m_currentIov = *it;
37  if(load) loadPayload();
38  }
40  }
42  }
virtual void clear()
Definition: Types.cc:10
void start(bool readOnly=true)
Definition: Session.cc:22
Time_t since
Definition: Types.h:46
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:230
bool isValidFor(Time_t target) const
Definition: Types.cc:20
Iterator end() const
Definition: IOVProxy.cc:208
Time_t till
Definition: Types.h:47
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 48 of file PayloadProxy.h.

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

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

Member Data Documentation

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

Definition at line 64 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