89 void remove(
const int& index);
94 const bool& clobber =
false)
const;
104 const double&
telapse(
void)
const;
105 const double&
ontime(
void)
const;
virtual ~GGti(void)
Destructor.
bool contains(const GTime &time) const
Checks whether Good Time Intervals contains time.
double m_ontime
Sum of GTIs durations (in seconds)
void reserve(const int &num)
Reserve space for Good Time Intervals.
int m_last_index
Last index for containment test.
void insert(const GTime &tstart, const GTime &tstop)
Insert Good Time Interval.
const GTimeReference & reference(void) const
Return time reference for Good Time Intervals.
GFilename m_xml_filename
XML filename.
void free_members(void)
Delete class members.
GTimeReference m_reference
Time reference.
const std::string extname_gti
void insert_gti(const int &index, const GTime &tstart, const GTime &tstop)
Insert Good Time Interval.
std::string print(const GChatter &chatter=NORMAL) const
Print Good Time Intervals.
GGti * clone(void) const
Clone Good Time Intervals.
void init_members(void)
Initialise class members.
void append(const GTime &tstart, const GTime &tstop)
Append Good Time Interval.
GGti(void)
Void constructor.
int size(void) const
Return number of Good Time Intervals.
double m_telapse
Time between start of first GTI and stop of last GTI (in seconds)
GGti & operator=(const GGti >i)
Assignment operator.
void save(const GFilename &filename, const bool &clobber=false) const
Save Good Time Intervals into FITS file.
void clear(void)
Clear Good Time Intervals.
int m_num
Number of Good Time Intervals.
void load(const GFilename &filename)
Load Good Time Intervals from FITS file.
Time reference class interface definition.
Abstract interface for FITS table.
Good Time Interval class.
const GTime & tstop(void) const
Returns latest stop time in Good Time Intervals.
void set_attributes(void)
Set class attributes.
const GTime & tstart(void) const
Returns earliest start time in Good Time Intervals.
GTime m_tstart
Start time of Good Time Intervals.
void copy_members(const GGti >i)
Copy class members.
double overlap(const GTime &tstart, const GTime &tstop) const
Computes overlap of time interval with GTIs.
GTime m_tstop
Stop time of Good Time Intervals.
void read(const GFitsTable &table)
Read Good Time Intervals and time reference from FITS table.
Implements a time reference.
Definition of interface for container classes.
GTime * m_stop
Array of stop times.
const double & telapse(void) const
Returns elapsed time.
bool is_empty(void) const
Signal if there are no Good Time Intervals.
void write(GFits &fits, const std::string &extname=gammalib::extname_gti) const
Write Good Time Intervals and time reference into FITS object.
GTime * m_start
Array of start times.
Time class interface definition.
void extend(const GGti >i)
Append Good Time Intervals.
const double & ontime(void) const
Returns ontime.
std::string classname(void) const
Return class name.
void reduce(const GTime &tstart, const GTime &tstop)
Reduce Good Time Intervals to specified interval.
Interface class for container classes.
Filename class interface definition.
void merge(void)
Merge all overlapping Good Time Intervals.