ATLAS Offline Software
Loading...
Searching...
No Matches
IOVRange Class Reference

Validity Range object. More...

#include <IOVRange.h>

Inheritance diagram for IOVRange:
Collaboration diagram for IOVRange:

Public Member Functions

 IOVRange ()
 IOVRange (const IOVTime &start, const IOVTime &stop)
 IOVRange (const EventIDRange &eir)
 IOVRange (const IOVRange &r)=default
IOVRange & operator= (const IOVRange &r)=default
const IOVTime & start () const
const IOVTime & stop () const
bool isInRange (const IOVTime &t) const
 operator std::string () const
 operator EventIDRange () const

Private Attributes

IOVTime m_start
IOVTime m_stop

Friends

bool operator== (const IOVRange &lhs, const IOVRange &rhs)
bool operator!= (const IOVRange &lhs, const IOVRange &rhs)
std::ostream & operator<< (std::ostream &os, const IOVRange &rhs)
MsgStream & operator<< (MsgStream &os, const IOVRange &rhs)

Detailed Description

Validity Range object.

Holds two IOVTimes (start and stop)

Definition at line 30 of file IOVRange.h.

Constructor & Destructor Documentation

◆ IOVRange() [1/4]

IOVRange::IOVRange ( )
inline

Definition at line 32 of file IOVRange.h.

32: m_start(0),m_stop(0) {};
IOVTime m_start
Definition IOVRange.h:56
IOVTime m_stop
Definition IOVRange.h:57

◆ IOVRange() [2/4]

IOVRange::IOVRange ( const IOVTime & start,
const IOVTime & stop )

Definition at line 25 of file IOVRange.cxx.

25 :
27}
const IOVTime & stop() const
Definition IOVRange.h:39
const IOVTime & start() const
Definition IOVRange.h:38

◆ IOVRange() [3/4]

IOVRange::IOVRange ( const EventIDRange & eir)

Definition at line 29 of file IOVRange.cxx.

29 :
30 m_start(eir.start()), m_stop(eir.stop()) {
31 static_assert(std::is_trivially_copyable<IOVRange>::value);
32 static_assert(std::is_trivially_destructible<IOVRange>::value);
33 static_assert(std::is_trivially_copyable<IOVTime>::value);
34 static_assert(std::is_trivially_destructible<IOVTime>::value);
35}

◆ IOVRange() [4/4]

IOVRange::IOVRange ( const IOVRange & r)
default

Member Function Documentation

◆ isInRange()

bool IOVRange::isInRange ( const IOVTime & t) const
inline

Definition at line 41 of file IOVRange.h.

41 {
42 return ( t>=m_start && t<m_stop );
43 }

◆ operator EventIDRange()

IOVRange::operator EventIDRange ( ) const

Definition at line 38 of file IOVRange.cxx.

38 {
39 return EventIDRange( EventIDBase(m_start), EventIDBase(m_stop) );
40}

◆ operator std::string()

IOVRange::operator std::string ( ) const

Definition at line 53 of file IOVRange.cxx.

53 {
54 return std::format ("{{{} - {}}}", m_start, m_stop);
55}

◆ operator=()

IOVRange & IOVRange::operator= ( const IOVRange & r)
default

◆ start()

const IOVTime & IOVRange::start ( ) const
inline

Definition at line 38 of file IOVRange.h.

38{ return m_start; }

◆ stop()

const IOVTime & IOVRange::stop ( ) const
inline

Definition at line 39 of file IOVRange.h.

39{ return m_stop; }

◆ operator!=

bool operator!= ( const IOVRange & lhs,
const IOVRange & rhs )
friend

Definition at line 67 of file IOVRange.h.

67 {
68 return ! (lhs == rhs);
69}

◆ operator<< [1/2]

MsgStream & operator<< ( MsgStream & os,
const IOVRange & rhs )
friend

Definition at line 48 of file IOVRange.cxx.

48 {
49 msg << (std::string) rhs;
50 return msg;
51}
MsgStream & msg
Definition testRead.cxx:32

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream & os,
const IOVRange & rhs )
friend

Definition at line 43 of file IOVRange.cxx.

43 {
44 os << (std::string) rhs;
45 return os;
46}

◆ operator==

bool operator== ( const IOVRange & lhs,
const IOVRange & rhs )
friend

Definition at line 62 of file IOVRange.h.

62 {
63 return lhs.m_start==rhs.m_start &&
64 lhs.m_stop==rhs.m_stop ;
65}

Member Data Documentation

◆ m_start

IOVTime IOVRange::m_start
private

Definition at line 56 of file IOVRange.h.

◆ m_stop

IOVTime IOVRange::m_stop
private

Definition at line 57 of file IOVRange.h.


The documentation for this class was generated from the following files: