27#ifndef GTIMEREFERENCE_HPP
28#define GTIMEREFERENCE_HPP
64 const std::string&
timesys =
"TT",
65 const std::string&
timeref =
"LOCAL");
67 const double& mrdreff,
69 const std::string&
timesys =
"TT",
70 const std::string&
timeref =
"LOCAL");
85 void set(
const double& mrdref,
87 const std::string&
timesys =
"TT",
88 const std::string&
timeref =
"LOCAL");
92 const std::string&
timesys =
"TT",
93 const std::string&
timeref =
"LOCAL");
94 const double&
mjdref(
void)
const;
97 const std::string&
timeunit(
void)
const;
98 const std::string&
timesys(
void)
const;
99 const std::string&
timeref(
void)
const;
126 return (
"GTimeReference");
Definition of interface for all GammaLib classes.
Interface class for all GammaLib classes.
Abstract FITS extension base class.
Implements a time reference.
GTimeReference * clone(void) const
Clone object.
std::string m_timesys
Time system.
void write(GFitsHDU &hdu) const
Write time reference into FITS header.
void set(const double &mrdref, const std::string &timeunit, const std::string ×ys="TT", const std::string &timeref="LOCAL")
Set time reference.
double mjdreff(void) const
Returns fractional part of MJD reference (units: days)
GTimeReference & operator=(const GTimeReference &ref)
Assignment operator.
double m_mjdref
Time MJD reference (days)
double unitseconds(void) const
Return the time unit in seconds.
const double & mjdref(void) const
Return MJD reference (units: days)
void clear(void)
Clear time reference.
int mjdrefi(void) const
Returns integer part of MJD reference (units: days)
std::string print(const GChatter &chatter=NORMAL) const
Print time reference.
const std::string & timeunit(void) const
Return time unit.
void read(const GFitsHDU &hdu)
Read time reference from FITS header.
bool m_unit_sec
True: unit is seconds, False: unit is days.
void init_members(void)
Initialise class members.
std::string classname(void) const
Return class name.
std::string m_timeref
Time reference.
virtual ~GTimeReference(void)
Destructor.
void copy_members(const GTimeReference &ref)
Copy class members.
const std::string & timeref(void) const
Return time reference.
const std::string & timesys(void) const
Return time system.
void free_members(void)
Delete class members.
std::string m_timeunit
Time unit.
GTimeReference(void)
Void constructor.