#include <IOVProxy.h>
Public Member Functions | |
IOVElementProxy () | |
IOVElementProxy (cond::Time_t is, cond::Time_t it, std::string const &itoken) | |
void | set (IOVSequence const &v, int i) |
void | set (cond::Time_t is, cond::Time_t it, std::string const &itoken) |
cond::Time_t | since () const |
cond::Time_t | till () const |
std::string const & | token () const |
Private Attributes | |
cond::Time_t | m_since |
cond::Time_t | m_till |
std::string | m_token |
Definition at line 47 of file IOVProxy.h.
cond::IOVElementProxy::IOVElementProxy | ( | ) | [inline] |
Definition at line 49 of file IOVProxy.h.
: m_since(cond::invalidTime), m_till(cond::invalidTime), m_token("") {}
cond::IOVElementProxy::IOVElementProxy | ( | cond::Time_t | is, |
cond::Time_t | it, | ||
std::string const & | itoken | ||
) | [inline] |
Definition at line 54 of file IOVProxy.h.
void cond::IOVElementProxy::set | ( | cond::Time_t | is, |
cond::Time_t | it, | ||
std::string const & | itoken | ||
) | [inline] |
Definition at line 59 of file IOVProxy.h.
References m_since, m_till, and m_token.
Referenced by cond::BasePayloadProxy::loadFor(), cond::BasePayloadProxy::make(), and cond::IterHelp::operator()().
void cond::IOVElementProxy::set | ( | IOVSequence const & | v, |
int | i | ||
) |
Definition at line 36 of file IOVProxy.cc.
References i, cond::invalidTime(), cond::IOVSequence::iovs(), cond::IOVSequence::lastTill(), timeUnitHelper::pack(), cond::timestamp, cond::IOVSequence::timeType(), and timeUnitHelper::unpack().
{ if (ii>=(int)v.iovs().size() || ii<0) { set(cond::invalidTime, cond::invalidTime,""); return; } size_t i =ii; m_token = v.iovs()[i].token(); m_since = v.iovs()[i].sinceTime(); if(i+1==v.iovs().size()) { m_till = v.lastTill(); return; } cond::UnpackedTime unpackedTime; cond::Time_t totalNanoseconds; cond::Time_t totalSecondsInNanoseconds; switch (v.timeType()) { case timestamp: //unpacking unpackedTime = cond::time::unpack(v.iovs()[i+1].sinceTime()); //number of seconds in nanoseconds (avoid multiply and divide by 1e09) totalSecondsInNanoseconds = ((cond::Time_t)unpackedTime.first)*1000000000; //total number of nanoseconds totalNanoseconds = totalSecondsInNanoseconds + ((cond::Time_t)(unpackedTime.second)); //now decrementing of 1 nanosecond totalNanoseconds--; //now repacking (just change the value of the previous pair) unpackedTime.first = (unsigned int) (totalNanoseconds/1000000000); unpackedTime.second = (unsigned int)(totalNanoseconds - (cond::Time_t)unpackedTime.first*1000000000); m_till = cond::time::pack(unpackedTime); break; default: m_till = v.iovs()[i+1].sinceTime()-1; } }
cond::Time_t cond::IOVElementProxy::since | ( | ) | const [inline] |
Definition at line 67 of file IOVProxy.h.
References m_since.
Referenced by BOOST_PYTHON_MODULE(), cond::BasePayloadProxy::isValid(), cond::PayLoadInspector< DataT >::load(), cond::BasePayloadProxy::loadFor(), cond::BasePayloadProxy::make(), cond::IterHelp::operator()(), cond::BasePayloadProxy::setIntervalFor(), and cond::service::PoolDBOutputService::tagInfo().
{ return m_since; }
cond::Time_t cond::IOVElementProxy::till | ( | ) | const [inline] |
Definition at line 71 of file IOVProxy.h.
References m_till.
Referenced by BOOST_PYTHON_MODULE(), cond::BasePayloadProxy::isValid(), cond::BasePayloadProxy::loadFor(), cond::IterHelp::operator()(), cond::BasePayloadProxy::setIntervalFor(), and cond::service::PoolDBOutputService::tagInfo().
{ return m_till; }
std::string const& cond::IOVElementProxy::token | ( | ) | const [inline] |
Definition at line 75 of file IOVProxy.h.
References m_token.
Referenced by BOOST_PYTHON_MODULE(), cond::BasePayloadProxy::isValid(), cond::PayLoadInspector< DataT >::load(), cond::BasePayloadProxy::make(), cond::IterHelp::operator()(), and cond::service::PoolDBOutputService::tagInfo().
{ return m_token; }
cond::Time_t cond::IOVElementProxy::m_since [private] |
Definition at line 80 of file IOVProxy.h.
cond::Time_t cond::IOVElementProxy::m_till [private] |
Definition at line 81 of file IOVProxy.h.
std::string cond::IOVElementProxy::m_token [private] |
Definition at line 82 of file IOVProxy.h.