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
IOVRangeoperator= (const IOVRange &r)=default
const IOVTimestart () const
const IOVTimestop () 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 24 of file IOVRange.cxx.

24 :
26}
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 28 of file IOVRange.cxx.

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

◆ 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 37 of file IOVRange.cxx.

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

◆ operator std::string()

IOVRange::operator std::string ( ) const

Definition at line 52 of file IOVRange.cxx.

52 {
53 std::ostringstream os;
54 os << '{' << m_start << " - " << m_stop << '}';
55 return os.str();
56}

◆ 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 47 of file IOVRange.cxx.

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

◆ operator<< [2/2]

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

Definition at line 42 of file IOVRange.cxx.

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

◆ 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: