5#ifndef ATHENAKERNEL_IOVTIME_H
6#define ATHENAKERNEL_IOVTIME_H
45 static constexpr uint32_t
MINRUN = std::numeric_limits<uint32_t>::min();
49 static constexpr uint32_t
MAXRUN = (std::numeric_limits<uint32_t>::max() >> 1);
51 static constexpr uint32_t
MINEVENT = std::numeric_limits<uint32_t>::min();
52 static constexpr uint32_t
MAXEVENT = (std::numeric_limits<uint32_t>::max());
55 static constexpr uint64_t
UNDEFRETIME = std::numeric_limits<uint64_t>::max();
57 static constexpr uint64_t
MINTIMESTAMP = std::numeric_limits<uint64_t>::min();
59 static constexpr uint64_t
MAXTIMESTAMP = (std::numeric_limits<uint64_t>::max() >> 1);
60 static constexpr uint64_t
UNDEFTIMESTAMP = std::numeric_limits<uint64_t>::max();
70 return t1.timestamp() > t2.timestamp();
73 return t1->timestamp() > t2->timestamp();
84 return t1.re_time() > t2.re_time();
87 return t1->re_time() > t2->re_time();
99 IOVTime(
const EventIDBase& eid);
102 void setRETime( uint64_t time )
noexcept;
104 void reset() noexcept;
106 inline uint32_t
run()
const noexcept {
return static_cast<uint32_t
> (
m_time>>32); }
107 inline uint32_t
event()
const noexcept {
return static_cast<uint32_t
> (
m_time & 0xFFFFFFFF); }
118 operator std::string()
const;
119 operator EventIDBase()
const;
140 :
public formatter<string_view>
142 template <
class FmtContext>
145 return formatter<string_view>::format (
static_cast<std::string
>(io), ctx);
155 if (lhs.isTimestamp() && rhs.isTimestamp()) {
156 return lhs.m_timestamp <=> rhs.m_timestamp;
158 return lhs.m_time <=> rhs.m_time;
162 if (lhs.isTimestamp() && rhs.isTimestamp()) {
163 return lhs.m_timestamp == rhs.m_timestamp;
165 return lhs.m_time == rhs.m_time;
bool operator==(const IOVTime &lhs, const IOVTime &rhs) noexcept
std::strong_ordering 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
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
uint64_t timestamp() const noexcept
bool isValid() const noexcept
static constexpr uint32_t MINEVENT
static constexpr uint64_t MINTIMESTAMP
static constexpr uint64_t UNDEFTIMESTAMP
void setTimestamp(uint64_t timestamp) noexcept
static constexpr uint64_t UNDEFRETIME
uint32_t run() const noexcept
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 std::strong_ordering operator<=>(const IOVTime &lhs, const IOVTime &rhs) noexcept
bool isRunEvent() const noexcept
static constexpr uint64_t MAXRETIME
int run(int argc, char *argv[])