19#include "GaudiKernel/MsgStream.h"
20#include "GaudiKernel/EventIDBase.h"
47 m_timestamp = eid.time_stamp()*1000000000LL + eid.time_stamp_ns_offset();
49 if (eid.isRunEvent()) {
50 m_time = ( (uint64_t) eid.run_number() << 32) + eid.event_number();
51 if (eid.isTimeStamp()) {
56 }
else if (eid.isLumiEvent()) {
57 m_time = ( (uint64_t) eid.lumi_block() << 32) + eid.event_number();
58 if (eid.isTimeStamp()) {
156IOVTime::operator std::string ()
const {
157 std::ostringstream os;
170IOVTime::operator EventIDBase()
const {
172 return EventIDBase(
run(),EventIDBase::UNDEFEVT,
173 std::min(
timestamp()/1000000000LL,(
unsigned long long)(std::numeric_limits<unsigned int>::max()-1)),
timestamp()%1000000000LL,
176 return EventIDBase(EventIDBase::UNDEFNUM,EventIDBase::UNDEFEVT,
177 std::min(
timestamp()/1000000000LL,(
unsigned long long)(std::numeric_limits<unsigned int>::max()-1)),
timestamp()%1000000000LL);
179 return EventIDBase(
run(),EventIDBase::UNDEFEVT,
180 EventIDBase::UNDEFNUM,0,
183 return EventIDBase();
188 os << (std::string) rhs;
193 os << (std::string) rhs;
MsgStream & operator<<(MsgStream &os, const IOVTime &rhs)
Basic time unit for IOVSvc.
static constexpr uint64_t MAXTIMESTAMP
static constexpr uint32_t MAXRUN
bool isBoth() const noexcept
void setRETime(uint64_t time) noexcept
void setRunEvent(uint32_t run, uint32_t event) noexcept
uint32_t event() const noexcept
uint64_t timestamp() const noexcept
bool isValid() const noexcept
static constexpr uint64_t UNDEFTIMESTAMP
void setTimestamp(uint64_t timestamp) noexcept
static constexpr uint64_t UNDEFRETIME
uint32_t run() const noexcept
bool isTimestamp() const noexcept
bool isRunEvent() const noexcept