#include <GaudiKernel/TimePoint.h>
Inheritance diagram for TimePoint:
Public Types | |
typedef longlong | AbsoluteTime |
typedef double | DimensionedTime |
Public Member Functions | |
TimePoint () | |
Constructors. | |
TimePoint (const ITime::AbsoluteTime &atime) | |
TimePoint (const ITime &itime) | |
~TimePoint () | |
Virtual destructor. | |
ITime::AbsoluteTime | absoluteTime () const |
Accessor to internal representation. | |
ITime::DimensionedTime | seconds () const |
accessor to representation in seconds | |
ITime::DimensionedTime | minutes () const |
accessor to representation in minutes | |
ITime::DimensionedTime | hours () const |
accessor to representation in hours | |
ITime::DimensionedTime | days () const |
accessor to representation in days | |
unsigned long | msb () const |
most significant bits | |
unsigned long | lsb () const |
less significant bits | |
bool | operator== (const ITime &T) const |
comparison operators | |
bool | operator!= (const ITime &T) const |
bool | operator<= (const ITime &T) const |
bool | operator>= (const ITime &T) const |
bool | operator< (const ITime &T) const |
bool | operator> (const ITime &T) const |
ITime & | operator+= (const ITime &T) |
adding | |
ITime & | operator-= (const ITime &T) |
substract | |
virtual std::ostream & | printOut (std::ostream &) const |
printout | |
Private Attributes | |
ITime::AbsoluteTime | m_time |
Friends | |
StreamBuffer & | operator>> (StreamBuffer &s, TimePoint &t) |
The internal precision is nanosecond (1.0e-9 seconds)
Definition at line 17 of file TimePoint.h.
typedef longlong ITime::AbsoluteTime [inherited] |
typedef double ITime::DimensionedTime [inherited] |
TimePoint::TimePoint | ( | ) | [inline] |
TimePoint::TimePoint | ( | const ITime::AbsoluteTime & | atime | ) | [inline] |
TimePoint::TimePoint | ( | const ITime & | itime | ) | [inline] |
TimePoint::~TimePoint | ( | ) | [inline] |
ITime::AbsoluteTime TimePoint::absoluteTime | ( | ) | const [inline, virtual] |
Accessor to internal representation.
Implements ITime.
Definition at line 29 of file TimePoint.h.
00029 { return m_time; }
ITime::DimensionedTime TimePoint::seconds | ( | void | ) | const [inline, virtual] |
accessor to representation in seconds
Implements ITime.
Definition at line 32 of file TimePoint.h.
00032 { return (DimensionedTime) ( absoluteTime() / 1.0e+9 ) ; }
ITime::DimensionedTime TimePoint::minutes | ( | void | ) | const [inline, virtual] |
accessor to representation in minutes
Implements ITime.
Definition at line 35 of file TimePoint.h.
00035 { return seconds() / 60.0 ; }
ITime::DimensionedTime TimePoint::hours | ( | void | ) | const [inline, virtual] |
accessor to representation in hours
Implements ITime.
Definition at line 38 of file TimePoint.h.
00038 { return minutes() / 60.0 ; }
ITime::DimensionedTime TimePoint::days | ( | void | ) | const [inline, virtual] |
accessor to representation in days
Implements ITime.
Definition at line 41 of file TimePoint.h.
00041 { return hours () / 24.0 ; }
unsigned long TimePoint::msb | ( | ) | const [inline] |
most significant bits
Definition at line 44 of file TimePoint.h.
00044 { return (unsigned long)(m_time >> 32);}
unsigned long TimePoint::lsb | ( | ) | const [inline] |
bool TimePoint::operator== | ( | const ITime & | T | ) | const [inline, virtual] |
comparison operators
Implements ITime.
Definition at line 49 of file TimePoint.h.
00049 { return absoluteTime()==T.absoluteTime(); }
bool TimePoint::operator!= | ( | const ITime & | T | ) | const [inline, virtual] |
Implements ITime.
Definition at line 50 of file TimePoint.h.
00050 { return absoluteTime()!=T.absoluteTime(); }
bool TimePoint::operator<= | ( | const ITime & | T | ) | const [inline, virtual] |
Implements ITime.
Definition at line 51 of file TimePoint.h.
00051 { return absoluteTime()<=T.absoluteTime(); }
bool TimePoint::operator>= | ( | const ITime & | T | ) | const [inline, virtual] |
Implements ITime.
Definition at line 52 of file TimePoint.h.
00052 { return absoluteTime()>=T.absoluteTime(); }
bool TimePoint::operator< | ( | const ITime & | T | ) | const [inline, virtual] |
Implements ITime.
Definition at line 53 of file TimePoint.h.
00053 { return absoluteTime()< T.absoluteTime(); }
bool TimePoint::operator> | ( | const ITime & | T | ) | const [inline, virtual] |
Implements ITime.
Definition at line 54 of file TimePoint.h.
00054 { return absoluteTime()> T.absoluteTime(); }
adding
Implements ITime.
Definition at line 75 of file TimePoint.h.
00076 { 00077 m_time +=T.absoluteTime(); 00078 m_time = ( m_time > time_absolutefuture.absoluteTime() ) ? time_absolutefuture.absoluteTime() : m_time ; 00079 m_time = ( m_time < time_absolutepast .absoluteTime() ) ? time_absolutepast .absoluteTime() : m_time ; 00080 return *this; 00081 }
substract
Implements ITime.
Definition at line 84 of file TimePoint.h.
00085 { 00086 m_time -= T.absoluteTime(); 00087 m_time = ( m_time > time_absolutefuture.absoluteTime() ) ? time_absolutefuture.absoluteTime() : m_time ; 00088 m_time = ( m_time < time_absolutepast .absoluteTime() ) ? time_absolutepast .absoluteTime() : m_time ; 00089 return *this; 00090 }
std::ostream & TimePoint::printOut | ( | std::ostream & | ) | const [inline, virtual] |
printout
Implements ITime.
Definition at line 92 of file TimePoint.h.
00092 { 00093 return os << "Time is " << seconds() << "[s]"; 00094 }
StreamBuffer& operator>> | ( | StreamBuffer & | s, | |
TimePoint & | t | |||
) | [friend] |
ITime::AbsoluteTime TimePoint::m_time [private] |
Definition at line 67 of file TimePoint.h.