GammaLib
2.0.0
|
COMPTEL Good Time Intervals class. More...
#include <GCOMTim.hpp>
Public Member Functions | |
GCOMTim (void) | |
Void constructor. More... | |
GCOMTim (const GGti >i) | |
Good Time Interval constructor. More... | |
GCOMTim (const GCOMTim &tim) | |
Copy constructor. More... | |
GCOMTim (const GFilename &filename, const std::string &usage="YES", const std::string &mode="NORMAL") | |
File name constructor. More... | |
virtual | ~GCOMTim (void) |
Destructor. More... | |
GCOMTim & | operator= (const GCOMTim &tim) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear COMPTEL good time intervals. More... | |
virtual GCOMTim * | clone (void) const |
Clone COMPTEL good time intervals. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const |
Print COMPTEL Good Time Intervals. More... | |
bool | contains (const GTime &time) const |
Check if time is comprised in the Good Time Intervals. More... | |
void | reduce (const GGti >i) |
Reduces Good Time Intervals to intersection with intervals. More... | |
const GGti & | gti (void) const |
Return Good Time Intervals. More... | |
void | gti (const GGti >i) |
Set Good Time Intervals. More... | |
void | load (const GFilename &filename, const std::string &usage="YES", const std::string &mode="NORMAL") |
Load COMPTEL Good Time Intervals from FITS file. More... | |
void | save (const GFilename &filename, const bool &clobber=false) const |
Save Good Time Intervals into FITS file. More... | |
void | read (const GFitsTable &table, const std::string &usage="YES", const std::string &mode="NORMAL") |
Read COMPTEL Good Time Intervals from FITS table. More... | |
void | write (GFitsBinTable &table) const |
Write COMPTEL Good Time Intervals into FITS binary table. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GCOMTim &tim) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Attributes | |
GGti | m_gti |
Good Time intervals. More... | |
COMPTEL Good Time Intervals class.
Definition at line 50 of file GCOMTim.hpp.
GCOMTim::GCOMTim | ( | void | ) |
Void constructor.
Definition at line 59 of file GCOMTim.cpp.
References init_members().
Referenced by clone().
|
explicit |
Good Time Interval constructor.
[in] | gti | Good Time Intervals. |
Definition at line 74 of file GCOMTim.cpp.
References gti(), init_members(), and m_gti.
GCOMTim::GCOMTim | ( | const GCOMTim & | tim | ) |
Copy constructor.
[in] | tim | COMPTEL Good Time Intervals. |
Definition at line 92 of file GCOMTim.cpp.
References copy_members(), and init_members().
GCOMTim::GCOMTim | ( | const GFilename & | filename, |
const std::string & | usage = "YES" , |
||
const std::string & | mode = "NORMAL" |
||
) |
File name constructor.
[in] | filename | TIM file name. |
[in] | usage | Usage selection (blank: accept all usage strings). |
[in] | mode | Mode selection (blank: accept all mode strings). |
Constructs COMPTEL Good Time Intervals from the information in a TIM FITS file.
Definition at line 115 of file GCOMTim.cpp.
References init_members(), and load().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 99 of file GCOMTim.hpp.
|
virtual |
Clear COMPTEL good time intervals.
Implements GBase.
Definition at line 185 of file GCOMTim.cpp.
References free_members(), and init_members().
Referenced by GCOMObservation::init_members(), and read().
|
virtual |
Clone COMPTEL good time intervals.
Implements GBase.
Definition at line 203 of file GCOMTim.cpp.
References GCOMTim().
|
inline |
Check if time is comprised in the Good Time Intervals.
[in] | time | Time. |
Checks if a time is comprised in the Good Time Intervals.
Definition at line 114 of file GCOMTim.hpp.
References GGti::contains(), and m_gti.
Referenced by GCOMDri::use_superpacket().
|
protected |
Copy class members.
[in] | tim | COMPTEL Good Time Intervals. |
Definition at line 476 of file GCOMTim.cpp.
References m_gti.
Referenced by GCOMTim(), and operator=().
|
protected |
Delete class members.
Definition at line 489 of file GCOMTim.cpp.
Referenced by clear(), operator=(), and ~GCOMTim().
|
inline |
Return Good Time Intervals.
Returns the Good Time Intervals.
Definition at line 144 of file GCOMTim.hpp.
References m_gti.
Referenced by GCOMTim(), gti(), GCOMObservation::load(), and GCOMObservation::print().
|
inline |
Set Good Time Intervals.
[in] | gti | Good Time Intervals. |
Sets the Good Time Intervals.
Definition at line 158 of file GCOMTim.hpp.
|
protected |
Initialise class members.
Definition at line 461 of file GCOMTim.cpp.
References GGti::clear(), and m_gti.
Referenced by clear(), GCOMTim(), and operator=().
void GCOMTim::load | ( | const GFilename & | filename, |
const std::string & | usage = "YES" , |
||
const std::string & | mode = "NORMAL" |
||
) |
Load COMPTEL Good Time Intervals from FITS file.
[in] | filename | TIM file name. |
[in] | usage | Usage selection (blank: accept all usage strings). |
[in] | mode | Mode selection (blank: accept all mode strings). |
Load COMPTEL Good Time Intervals from the information in a TIM FITS file.
Definition at line 218 of file GCOMTim.cpp.
References GFits::close(), read(), and GFits::table().
Referenced by GCOMTim(), and GCOMObservation::load().
Assignment operator.
[in] | tim | COMPTEL Good Time Intervals. |
Definition at line 155 of file GCOMTim.cpp.
References copy_members(), free_members(), and init_members().
Print COMPTEL Good Time Intervals.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 408 of file GCOMTim.cpp.
References gammalib::com_tics(), gammalib::com_tjd(), m_gti, GTime::mjd(), GGti::ontime(), gammalib::parformat(), SILENT, GGti::size(), gammalib::str(), GGti::telapse(), GGti::tstart(), GGti::tstop(), and GTime::utc().
Referenced by GCOMObservation::print().
void GCOMTim::read | ( | const GFitsTable & | table, |
const std::string & | usage = "YES" , |
||
const std::string & | mode = "NORMAL" |
||
) |
Read COMPTEL Good Time Intervals from FITS table.
[in] | table | TIM FITS table. |
[in] | usage | Usage selection (blank: accept all usage strings). |
[in] | mode | Mode selection (blank: accept all mode strings). |
Reads COMPTEL Good Time Intervals from the information in a TIM FITS table.
Definition at line 280 of file GCOMTim.cpp.
References clear(), gammalib::com_time(), GGti::insert(), GFitsTableCol::integer(), m_gti, GGti::merge(), GFitsTable::nrows(), and GFitsTableCol::string().
Referenced by load().
|
inline |
Reduces Good Time Intervals to intersection with intervals.
[in] | gti | Good Time Intervals. |
Reduces the Good Time Intervals to the intersection with the specified list of Good Time Intervals.
Definition at line 129 of file GCOMTim.hpp.
References m_gti, and GGti::reduce().
Referenced by GCOMDri::compute_dre(), GCOMDri::compute_drg(), and GCOMDri::compute_drx().
void GCOMTim::save | ( | const GFilename & | filename, |
const bool & | clobber = false |
||
) | const |
Save Good Time Intervals into FITS file.
[in] | filename | FITS file name. |
[in] | clobber | Overwrite existing FITS file. |
Saves the event list into a FITS file. See the write() method for details.
Definition at line 247 of file GCOMTim.cpp.
References GFits::append(), GFits::saveto(), GFilename::url(), and write().
void GCOMTim::write | ( | GFitsBinTable & | table | ) | const |
Write COMPTEL Good Time Intervals into FITS binary table.
[in] | table | TIM FITS table. |
Writes COMPTEL Good Time Intervals from the information in a TIM FITS binary table.
Definition at line 343 of file GCOMTim.cpp.
References GFitsTable::append(), gammalib::com_tics(), gammalib::com_tjd(), GFitsHDU::extname(), m_gti, GGti::size(), GGti::tstart(), GGti::tstop(), and GFitsTableCol::unit().
Referenced by save().
|
protected |
Good Time intervals.
Definition at line 89 of file GCOMTim.hpp.
Referenced by contains(), copy_members(), GCOMTim(), gti(), init_members(), print(), read(), reduce(), and write().