68 GEnergy(
const double& eng,
const std::string& unit);
77 void operator()(
const double& eng,
const std::string& unit);
78 double operator()(
const std::string& unit)
const;
84 double erg(
void)
const;
85 double keV(
void)
const;
86 double MeV(
void)
const;
87 double GeV(
void)
const;
88 double TeV(
void)
const;
95 double log10(
const std::string& unit)
const;
96 void erg(
const double& eng);
97 void keV(
const double& eng);
98 void MeV(
const double& eng);
99 void GeV(
const double& eng);
100 void TeV(
const double& eng);
101 void Angstrom(
const double& wavelength);
107 void log10(
const double& eng,
const std::string& unit);
GArf operator/(const GArf &arf, const double &scale)
Auxiliary Response File vision operator friend.
std::string classname(void) const
Return class name.
double log10erg(void) const
Return log10 of energy in erg.
friend bool operator<(const GEnergy &a, const GEnergy &b)
Energy smaller than operator friend.
friend GEnergy operator-(const GEnergy &a, const GEnergy &b)
Energy subtraction operator friend.
void operator()(const double &eng, const std::string &unit)
Unit set operator.
void init_members(void)
Initialise class members.
Definition of interface for all GammaLib classes.
double m_energy
Energy in MeV.
GEnergy & operator=(const GEnergy &eng)
Assignment operator.
double TeV(void) const
Return energy in TeV.
double log10TeV(void) const
Return log10 of energy in TeV.
double MeV(void) const
Return energy in MeV.
friend bool operator<=(const GEnergy &a, const GEnergy &b)
Energy smaller than or equal to operator friend.
void copy_members(const GEnergy &eng)
Copy class members.
friend bool operator>(const GEnergy &a, const GEnergy &b)
Energy larger than operator friend.
GEnergy * clone(void) const
Clone object.
GArf operator+(const GArf &a, const GArf &b)
Auxiliary Response File addition operator friend.
double log10MeV(void) const
Return log10 of energy in MeV.
bool operator<=(const GEnergy &a, const GEnergy &b)
Energy smaller than or equal to operator friend.
bool operator<(const GEnergy &a, const GEnergy &b)
Energy smaller than operator friend.
friend bool operator>=(const GEnergy &a, const GEnergy &b)
Energy larger than or equal to operator friend.
double Angstrom(void) const
Return energy as wavelength in Angstrom.
void free_members(void)
Delete class members.
std::string print(const GChatter &chatter=NORMAL) const
Print energy.
bool m_has_log10
log10 of energy is valid
Interface class for all GammaLib classes.
double log10GeV(void) const
Return log10 of energy in GeV.
friend bool operator==(const GEnergy &a, const GEnergy &b)
Energy equality operator friend.
double m_elog10
log10 of energy in MeV
double erg(void) const
Return energy in erg.
double log10keV(void) const
Return log10 of energy in keV.
friend GEnergy operator*(const double &a, const GEnergy &b)
Energy multiplication operator friend.
GArf operator*(const GArf &arf, const double &scale)
Auxiliary Response File scaling operator friend.
friend GEnergy operator/(const GEnergy &a, const double &b)
Energy division operator friend.
double GeV(void) const
Return energy in GeV.
GEnergy & operator-=(const GEnergy &eng)
Energy unary differnce operator.
GEnergy & operator+=(const GEnergy &eng)
Energy unary addition operator.
GEnergy & operator*=(const double &scale)
Energy unary multiplication operator.
double log10(const std::string &unit) const
Set log10 of energy with unit specification.
double keV(void) const
Return energy in keV.
friend GEnergy operator+(const GEnergy &a, const GEnergy &b)
Energy addition operator friend.
bool operator>=(const GEnergy &a, const GEnergy &b)
Energy larger than or equal to operator friend.
friend bool operator!=(const GEnergy &a, const GEnergy &b)
Energy non-equality operator friend.
GEnergy & operator/=(const double &scale)
Energy unary division operator.
virtual ~GEnergy(void)
Destructor.
bool operator>(const GEnergy &a, const GEnergy &b)
Energy larger than operator friend.
bool operator==(const GEnergy &a, const GEnergy &b)
Energy equality operator friend.
GEnergy(void)
Void constructor.
GArf operator-(const GArf &a, const GArf &b)
Auxiliary Response File subtraction operator friend.
bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
void clear(void)
Clear instance.
Class that handles energies in a unit independent way.