5#ifndef ATHENAKERNEL_IOVTIME_H
6#define ATHENAKERNEL_IOVTIME_H
44 static constexpr uint32_t
MINRUN = std::numeric_limits<uint32_t>::min();
48 static constexpr uint32_t
MAXRUN = (std::numeric_limits<uint32_t>::max() >> 1);
50 static constexpr uint32_t
MINEVENT = std::numeric_limits<uint32_t>::min();
51 static constexpr uint32_t
MAXEVENT = (std::numeric_limits<uint32_t>::max());
54 static constexpr uint64_t
UNDEFRETIME = std::numeric_limits<uint64_t>::max();
56 static constexpr uint64_t
MINTIMESTAMP = std::numeric_limits<uint64_t>::min();
58 static constexpr uint64_t
MAXTIMESTAMP = (std::numeric_limits<uint64_t>::max() >> 1);
59 static constexpr uint64_t
UNDEFTIMESTAMP = std::numeric_limits<uint64_t>::max();
69 return t1.timestamp() > t2.timestamp();
72 return t1->timestamp() > t2->timestamp();
83 return t1.re_time() > t2.re_time();
86 return t1->re_time() > t2->re_time();
98 IOVTime(
const EventIDBase& eid);
101 void setRETime( uint64_t time )
noexcept;
103 void reset() noexcept;
105 inline uint32_t
run()
const noexcept {
return static_cast<uint32_t
> (
m_time>>32); }
106 inline uint32_t
event()
const noexcept {
return static_cast<uint32_t
> (
m_time & 0xFFFFFFFF); }
117 operator std::string()
const;
118 operator EventIDBase()
const;
138 if (lhs.isTimestamp() && rhs.isTimestamp()) {
139 return lhs.m_timestamp < rhs.m_timestamp;
141 return lhs.m_time < rhs.m_time;
145 if (lhs.isTimestamp() && rhs.isTimestamp()) {
146 return lhs.m_timestamp > rhs.m_timestamp;
148 return lhs.m_time > rhs.m_time;
152 if (lhs.isTimestamp() && rhs.isTimestamp()) {
153 return lhs.m_timestamp == rhs.m_timestamp;
155 return lhs.m_time == rhs.m_time;
159 return !(lhs == rhs) ;
162 return !( lhs < rhs );
165 return !( lhs > rhs );
bool operator>=(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator!=(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator==(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator<(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator<=(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator>(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool operator()(const IOVTime &t1, const IOVTime &t2) const noexcept
bool operator()(const IOVTime &t1, const IOVTime &t2) const noexcept
Basic time unit for IOVSvc.
static constexpr uint64_t MAXTIMESTAMP
static constexpr uint32_t MAXRUN
friend bool operator>=(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool isBoth() const noexcept
IOVTime(uint64_t timestamp)
void setRETime(uint64_t time) noexcept
void setRunEvent(uint32_t run, uint32_t event) noexcept
uint32_t event() const noexcept
friend bool operator!=(const IOVTime &lhs, const IOVTime &rhs) noexcept
friend bool operator==(const IOVTime &lhs, const IOVTime &rhs) noexcept
uint64_t timestamp() const noexcept
bool isValid() const noexcept
static constexpr uint32_t MINEVENT
friend bool operator<(const IOVTime &lhs, const IOVTime &rhs) noexcept
friend bool operator<=(const IOVTime &lhs, const IOVTime &rhs) noexcept
static constexpr uint64_t MINTIMESTAMP
static constexpr uint64_t UNDEFTIMESTAMP
void setTimestamp(uint64_t timestamp) noexcept
static constexpr uint64_t UNDEFRETIME
static constexpr uint32_t MAXEVENT
uint64_t re_time() const noexcept
static constexpr uint32_t MINRUN
bool isTimestamp() const noexcept
friend std::ostream & operator<<(std::ostream &os, const IOVTime &rhs)
friend bool operator>(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool isRunEvent() const noexcept
static constexpr uint64_t MAXRETIME