ATLAS Offline Software
Loading...
Searching...
No Matches
IOVTime.h File Reference

Basic time unit for IOVSvc. More...

#include <compare>
#include <iosfwd>
#include <string>
#include <stdint.h>
#include <limits>
#include <format>
Include dependency graph for IOVTime.h:

Go to the source code of this file.

Classes

class  IOVTime
 Basic time unit for IOVSvc. More...
class  IOVTime::SortByTimeStamp
 Predicate. More...
class  IOVTime::SortByRunEvent
 Predicate. More...
struct  std::formatter< IOVTime >
 A C++20-compatible formatter for IOVTime. More...

Namespaces

namespace  std
 STL namespace.

Functions

std::strong_ordering operator<=> (const IOVTime &lhs, const IOVTime &rhs)
bool operator== (const IOVTime &lhs, const IOVTime &rhs)

Detailed Description

Basic time unit for IOVSvc.

Hold time as a combination of run and event numbers

Author
Charles Leggett

Definition in file IOVTime.h.

Function Documentation

◆ operator<=>()

std::strong_ordering operator<=> ( const IOVTime & lhs,
const IOVTime & rhs )
inlinenoexcept

Definition at line 153 of file IOVTime.h.

154 =>(const IOVTime& lhs, const IOVTime& rhs) noexcept {
155 if (lhs.isTimestamp() && rhs.isTimestamp()) {
156 return lhs.m_timestamp <=> rhs.m_timestamp;
157 } else {
158 return lhs.m_time <=> rhs.m_time;
159 }
160}
Basic time unit for IOVSvc.
Definition IOVTime.h:34
uint64_t m_time
Definition IOVTime.h:130
bool isTimestamp() const noexcept
Definition IOVTime.h:112
uint64_t m_timestamp
Definition IOVTime.h:131

◆ operator==()

bool operator== ( const IOVTime & lhs,
const IOVTime & rhs )
inlinenoexcept

Definition at line 161 of file IOVTime.h.

161 {
162 if (lhs.isTimestamp() && rhs.isTimestamp()) {
163 return lhs.m_timestamp == rhs.m_timestamp;
164 } else {
165 return lhs.m_time == rhs.m_time;
166 }
167}