Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JGEOMETRY3D::JEnergy Class Reference

Energy. More...

#include <JEnergy.hh>

Inheritance diagram for JGEOMETRY3D::JEnergy:
JGEOMETRY3D::JShower3E JGEOMETRY3D::JTrack3E JGEOMETRY3D::JShower3EY JGEOMETRY3D::JTrack3EY

Public Member Functions

 JEnergy ()
 Default constructor.
 
 JEnergy (const double E)
 Constructor.
 
void setE (const double energy)
 Set energy.
 
double getE () const
 Get energy.
 

Protected Attributes

double __E
 

Friends

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

Detailed Description

Energy.

Definition at line 28 of file JGeometry3D/JEnergy.hh.

Constructor & Destructor Documentation

◆ JEnergy() [1/2]

JGEOMETRY3D::JEnergy::JEnergy ( )
inline

Default constructor.

Definition at line 34 of file JGeometry3D/JEnergy.hh.

34 :
35 __E(0.0)
36 {}

◆ JEnergy() [2/2]

JGEOMETRY3D::JEnergy::JEnergy ( const double E)
inline

Constructor.

Parameters
Eenergy

Definition at line 44 of file JGeometry3D/JEnergy.hh.

44 :
45 __E(E)
46 {}

Member Function Documentation

◆ setE()

void JGEOMETRY3D::JEnergy::setE ( const double energy)
inline

Set energy.

Parameters
energyenergy

Definition at line 54 of file JGeometry3D/JEnergy.hh.

55 {
56 __E = energy;
57 }

◆ getE()

double JGEOMETRY3D::JEnergy::getE ( ) const
inline

Get energy.

Returns
energy

Definition at line 65 of file JGeometry3D/JEnergy.hh.

66 {
67 return __E;
68 }

Friends And Related Symbol Documentation

◆ operator>> [1/2]

std::istream & operator>> ( std::istream & in,
JEnergy & energy )
friend

Read energy from input.

Parameters
ininput stream
energyenergy
Returns
input stream

Definition at line 78 of file JGeometry3D/JEnergy.hh.

79 {
80 in >> energy.__E;
81
82 return in;
83 }

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & out,
const JEnergy & energy )
friend

Write energy to output.

Parameters
outoutput stream
energyenergy
Returns
output stream

Definition at line 93 of file JGeometry3D/JEnergy.hh.

94 {
95 const JFormat format(out, getFormat<JEnergy>(JFormat_t(12, 3, std::ios::scientific)));
96
97 out << energy.__E;
98
99 return out;
100 }
JFormat_t & getFormat()
Get format for given type.
Definition JManip.hh:682
Data structure for format specifications.
Definition JManip.hh:524
Auxiliary class to temporarily define format specifications.
Definition JManip.hh:636

◆ operator>> [2/2]

JReader & operator>> ( JReader & in,
JEnergy & energy )
friend

Read energy from input.

Parameters
inreader
energyenergy
Returns
reader

Definition at line 110 of file JGeometry3D/JEnergy.hh.

111 {
112 in >> energy.__E;
113
114 return in;
115 }

◆ operator<< [2/2]

JWriter & operator<< ( JWriter & out,
const JEnergy & energy )
friend

Write energy to output.

Parameters
outwriter
energyenergy
Returns
writer

Definition at line 125 of file JGeometry3D/JEnergy.hh.

126 {
127 out << energy.__E;
128
129 return out;
130 }

Member Data Documentation

◆ __E

double JGEOMETRY3D::JEnergy::__E
protected

Definition at line 134 of file JGeometry3D/JEnergy.hh.


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