ATLAS Offline Software
Loading...
Searching...
No Matches
IOVRange.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAKERNEL_IOVRANGE_H
6#define ATHENAKERNEL_IOVRANGE_H
7
18
20#include <string>
21#include <iosfwd>
22
23class MsgStream;
24class EventIDRange;
25
30class IOVRange {
31public:
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
54private:
55
58
59};
60
61
62inline 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
67inline bool operator!=(const IOVRange& lhs, const IOVRange& rhs) {
68 return ! (lhs == rhs);
69}
70
71
72#endif
bool operator==(const IOVRange &lhs, const IOVRange &rhs)
Definition IOVRange.h:62
bool operator!=(const IOVRange &lhs, const IOVRange &rhs)
Definition IOVRange.h:67
Basic time unit for IOVSvc.
Validity Range object.
Definition IOVRange.h:30
const IOVTime & stop() const
Definition IOVRange.h:39
friend bool operator==(const IOVRange &lhs, const IOVRange &rhs)
Definition IOVRange.h:62
IOVRange()
Definition IOVRange.h:32
IOVRange & operator=(const IOVRange &r)=default
bool isInRange(const IOVTime &t) const
Definition IOVRange.h:41
IOVRange(const IOVRange &r)=default
const IOVTime & start() const
Definition IOVRange.h:38
friend bool operator!=(const IOVRange &lhs, const IOVRange &rhs)
Definition IOVRange.h:67
friend std::ostream & operator<<(std::ostream &os, const IOVRange &rhs)
Definition IOVRange.cxx:42
IOVTime m_start
Definition IOVRange.h:56
IOVTime m_stop
Definition IOVRange.h:57
Basic time unit for IOVSvc.
Definition IOVTime.h:33
int r
Definition globals.cxx:22