ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
AthenaKernel
IOVRange.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAKERNEL_IOVRANGE_H
6
#define ATHENAKERNEL_IOVRANGE_H
7
18
19
#include "
AthenaKernel/IOVTime.h
"
20
#include <string>
21
#include <iosfwd>
22
23
class
MsgStream;
24
class
EventIDRange;
25
30
class
IOVRange
{
31
public
:
32
IOVRange
():
m_start
(0),
m_stop
(0) {};
33
IOVRange
(
const
IOVTime
&
start
,
const
IOVTime
&
stop
);
34
IOVRange
(
const
EventIDRange& eir);
35
IOVRange
(
const
IOVRange
&
r
) =
default
;
36
IOVRange
&
operator=
(
const
IOVRange
&
r
) =
default
;
37
38
const
IOVTime
&
start
()
const
{
return
m_start
; }
39
const
IOVTime
&
stop
()
const
{
return
m_stop
; }
40
41
bool
isInRange
(
const
IOVTime
& t)
const
{
42
return
( t>=
m_start
&& t<
m_stop
);
43
}
44
45
friend
bool
operator==
(
const
IOVRange
& lhs,
const
IOVRange
& rhs);
46
friend
bool
operator!=
(
const
IOVRange
& lhs,
const
IOVRange
& rhs);
47
48
friend
std::ostream&
operator<<
(std::ostream& os,
const
IOVRange
& rhs);
49
friend
MsgStream&
operator<<
(MsgStream& os,
const
IOVRange
& rhs);
50
51
operator
std::string()
const
;
52
operator
EventIDRange()
const
;
53
54
private
:
55
56
IOVTime
m_start
;
57
IOVTime
m_stop
;
58
59
};
60
61
62
inline
bool
operator==
(
const
IOVRange
& lhs,
const
IOVRange
& rhs) {
63
return
lhs.
m_start
==rhs.
m_start
&&
64
lhs.
m_stop
==rhs.
m_stop
;
65
}
66
67
inline
bool
operator!=
(
const
IOVRange
& lhs,
const
IOVRange
& rhs) {
68
return
! (lhs == rhs);
69
}
70
71
72
namespace
std
{
73
75
template
<>
76
struct
formatter<
IOVRange
>
77
:
public
formatter<string_view>
78
{
79
template
<
class
FmtContext>
80
FmtContext::iterator
format
(
const
IOVRange
&
r
, FmtContext& ctx)
const
81
{
82
return
formatter<string_view>::format (
static_cast<
std::string
>
(
r
), ctx);
83
}
84
};
85
86
}
// namespace std
87
88
89
#endif
operator==
bool operator==(const IOVRange &lhs, const IOVRange &rhs)
Definition
IOVRange.h:62
operator!=
bool operator!=(const IOVRange &lhs, const IOVRange &rhs)
Definition
IOVRange.h:67
IOVTime.h
Basic time unit for IOVSvc.
IOVRange
Validity Range object.
Definition
IOVRange.h:30
IOVRange::stop
const IOVTime & stop() const
Definition
IOVRange.h:39
IOVRange::operator==
friend bool operator==(const IOVRange &lhs, const IOVRange &rhs)
Definition
IOVRange.h:62
IOVRange::IOVRange
IOVRange()
Definition
IOVRange.h:32
IOVRange::operator=
IOVRange & operator=(const IOVRange &r)=default
IOVRange::isInRange
bool isInRange(const IOVTime &t) const
Definition
IOVRange.h:41
IOVRange::IOVRange
IOVRange(const IOVRange &r)=default
IOVRange::start
const IOVTime & start() const
Definition
IOVRange.h:38
IOVRange::operator!=
friend bool operator!=(const IOVRange &lhs, const IOVRange &rhs)
Definition
IOVRange.h:67
IOVRange::operator<<
friend std::ostream & operator<<(std::ostream &os, const IOVRange &rhs)
Definition
IOVRange.cxx:43
IOVRange::m_start
IOVTime m_start
Definition
IOVRange.h:56
IOVRange::m_stop
IOVTime m_stop
Definition
IOVRange.h:57
IOVTime
Basic time unit for IOVSvc.
Definition
IOVTime.h:34
r
int r
Definition
globals.cxx:22
std
STL namespace.
std::formatter< IOVRange >::format
FmtContext::iterator format(const IOVRange &r, FmtContext &ctx) const
Definition
IOVRange.h:80
Generated on
for ATLAS Offline Software by
1.17.0