Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
JGEOMETRY3D::JTime Class Reference

Time. More...

#include <JTime.hh>

Inheritance diagram for JGEOMETRY3D::JTime:
JGEOMETRY3D::JTrack3D JGEOMETRY3D::JVertex3D JGEOMETRY3D::JTrack3E JFIT::JLine1Z JFIT::JPoint4D JGEOMETRY3D::JTrack3EY JFIT::JEstimator< JLine1Z > JFIT::JLine3Z JFIT::JModel< JLine1Z > JFIT::JEstimator< JPoint4D > JFIT::JModel< JPoint4D > JFIT::JShower3Z JFIT::JLine3EZ JFIT::JShower3EZ JFIT::JShowerEH

Public Member Functions

 JTime ()
 Default constructor. More...
 
 JTime (const double t)
 Constructor. More...
 
JTimenegate ()
 Prefix unary minus. More...
 
JTimeadd (const JTime &value)
 Addition operator. More...
 
JTimesub (const JTime &value)
 Subtraction operator. More...
 
JTimemul (const double value)
 Multiplication operator. More...
 
JTimediv (const double value)
 Division operator. More...
 
double getT () const
 Get time. More...
 

Protected Attributes

double __t
 

Friends

std::istream & operator>> (std::istream &in, JTime &time)
 Read time from input. More...
 
std::ostream & operator<< (std::ostream &out, const JTime &time)
 Write time to output. More...
 
JReaderoperator>> (JReader &in, JTime &time)
 Read time from input. More...
 
JWriteroperator<< (JWriter &out, const JTime &time)
 Write time to output. More...
 

Detailed Description

Time.

Definition at line 27 of file JGeometry3D/JTime.hh.

Constructor & Destructor Documentation

JGEOMETRY3D::JTime::JTime ( )
inline

Default constructor.

Definition at line 33 of file JGeometry3D/JTime.hh.

33  :
34  __t(0.0)
35  {}
JGEOMETRY3D::JTime::JTime ( const double  t)
inline

Constructor.

Parameters
ttime

Definition at line 43 of file JGeometry3D/JTime.hh.

43  :
44  __t(t)
45  {}

Member Function Documentation

JTime& JGEOMETRY3D::JTime::negate ( )
inline

Prefix unary minus.

Returns
time

Definition at line 53 of file JGeometry3D/JTime.hh.

54  {
55  __t = -__t;
56 
57  return *this;
58  }
JTime& JGEOMETRY3D::JTime::add ( const JTime value)
inline

Addition operator.

Parameters
valuetime
Returns
time

Definition at line 67 of file JGeometry3D/JTime.hh.

68  {
69  __t += value.getT();
70 
71  return *this;
72  }
double getT() const
Get time.
JTime& JGEOMETRY3D::JTime::sub ( const JTime value)
inline

Subtraction operator.

Parameters
valuetime
Returns
time

Definition at line 81 of file JGeometry3D/JTime.hh.

82  {
83  __t -= value.getT();
84 
85  return *this;
86  }
double getT() const
Get time.
JTime& JGEOMETRY3D::JTime::mul ( const double  value)
inline

Multiplication operator.

Parameters
valuemultiplication factor
Returns
time

Definition at line 95 of file JGeometry3D/JTime.hh.

96  {
97  __t *= value;
98 
99  return *this;
100  }
JTime& JGEOMETRY3D::JTime::div ( const double  value)
inline

Division operator.

Parameters
valuemultiplication factor
Returns
time

Definition at line 109 of file JGeometry3D/JTime.hh.

110  {
111  __t /= value;
112 
113  return *this;
114  }
double JGEOMETRY3D::JTime::getT ( ) const
inline

Get time.

Returns
time

Definition at line 122 of file JGeometry3D/JTime.hh.

123  {
124  return __t;
125  }

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JTime time 
)
friend

Read time from input.

Parameters
ininput stream
timetime
Returns
input stream

Definition at line 135 of file JGeometry3D/JTime.hh.

136  {
137  in >> time.__t;
138 
139  return in;
140  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
std::ostream& operator<< ( std::ostream &  out,
const JTime time 
)
friend

Write time to output.

Parameters
outoutput stream
timetime
Returns
output stream

Definition at line 150 of file JGeometry3D/JTime.hh.

151  {
152  const JFormat format(out, getFormat<JTime>(JFormat_t(9, 3, std::ios::fixed | std::ios::showpos)));
153 
154  out << time.__t;
155 
156  return out;
157  }
Auxiliary class to temporarily define format specifications.
Definition: JManip.hh:632
Data structure for format specifications.
Definition: JManip.hh:522
JReader& operator>> ( JReader in,
JTime time 
)
friend

Read time from input.

Parameters
inreader
timetime
Returns
reader

Definition at line 167 of file JGeometry3D/JTime.hh.

168  {
169  in >> time.__t;
170 
171  return in;
172  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
JWriter& operator<< ( JWriter out,
const JTime time 
)
friend

Write time to output.

Parameters
outwriter
timetime
Returns
writer

Definition at line 182 of file JGeometry3D/JTime.hh.

183  {
184  out << time.__t;
185 
186  return out;
187  }

Member Data Documentation

double JGEOMETRY3D::JTime::__t
protected

Definition at line 191 of file JGeometry3D/JTime.hh.


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