116 const std::string& usage,
117 const std::string& mode)
123 load(filename, usage, mode);
219 const std::string& usage,
220 const std::string& mode)
223 GFits fits(filename);
229 read(hdu, usage, mode);
248 const bool& clobber)
const
281 const std::string& usage,
282 const std::string& mode)
288 int num = table.
nrows();
302 for (
int i = 0; i < num; ++i) {
305 if (!usage.empty() && ptr_usage->
string(i) != usage) {
310 if (!mode.empty() && ptr_mode->
string(i) != mode) {
363 col_start_tjd.
unit(
"d");
364 col_end_tjd.
unit(
"d");
367 for (
int i = 0; i <size; ++i) {
373 col_usage(i) =
"YES";
374 col_mode(i) =
"NORMAL";
380 table.
append(col_start_tjd);
381 table.
append(col_start_tic);
382 table.
append(col_end_tjd);
383 table.
append(col_end_tic);
387 table.
append(col_descrip);
417 result.append(
"=== GCOMTim ===");
432 result.append(
" - ");
438 result.append(
" - ");
442 result.append(
" - ");
void unit(const std::string &unit)
Set column unit.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
GCOMTim & operator=(const GCOMTim &tim)
Assignment operator.
void insert(const GTime &tstart, const GTime &tstop)
Insert Good Time Interval.
FITS table unsigned long integer column class interface definition.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL Good Time Intervals.
void init_members(void)
Initialise class members.
virtual ~GCOMTim(void)
Destructor.
void read(const GFitsTable &table, const std::string &usage="YES", const std::string &mode="NORMAL")
Read COMPTEL Good Time Intervals from FITS table.
GFitsTableCol * append(const GFitsTableCol &column)
Append column to the table.
void free_members(void)
Delete class members.
FITS file class interface definition.
GTime com_time(const int &tjd, const int &tics)
Convert TJD and COMPTEL tics in GTime object.
COMPTEL Good Time Intervals class definition.
Implementation of support function used by COMPTEL classes.
int size(void) const
Return number of Good Time Intervals.
virtual std::string string(const int &row, const int &inx=0) const =0
FITS table string column.
void write(GFitsBinTable &table) const
Write COMPTEL Good Time Intervals into FITS binary table.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
void clear(void)
Clear Good Time Intervals.
void copy_members(const GCOMTim &tim)
Copy class members.
Abstract interface for FITS table column.
int com_tjd(const GTime &time)
Convert GTime in COMPTEL TJD.
GCOMTim(void)
Void constructor.
FITS table unsigned long integer column.
FITS table string column class interface definition.
Abstract interface for FITS table.
virtual GCOMTim * clone(void) const
Clone COMPTEL good time intervals.
virtual void clear(void)
Clear COMPTEL good time intervals.
Good Time Interval class.
const GTime & tstop(void) const
Returns latest stop time in Good Time Intervals.
const std::string & extname(void) const
Return extension name.
const GTime & tstart(void) const
Returns earliest start time in Good Time Intervals.
const int & nrows(void) const
Return number of rows in table.
int com_tics(const GTime &time)
Convert GTime in COMPTEL tics.
std::string url(void) const
Return Uniform Resource Locator (URL)
virtual int integer(const int &row, const int &inx=0) const =0
void load(const GFilename &filename, const std::string &usage="YES", const std::string &mode="NORMAL")
Load COMPTEL Good Time Intervals from FITS file.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
FITS binary table class definition.
void save(const GFilename &filename, const bool &clobber=false) const
Save Good Time Intervals into FITS file.
double mjd(void) const
Return time in Modified Julian Days (TT)
COMPTEL Good Time Intervals class.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
const double & telapse(void) const
Returns elapsed time.
void close(void)
Close FITS file.
GGti m_gti
Good Time intervals.
std::string utc(const int &precision=0) const
Return time as string in UTC time system.
const GGti & gti(void) const
Return Good Time Intervals.
const double & ontime(void) const
Returns ontime.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
FITS table abstract base class interface definition.
void merge(void)
Merge all overlapping Good Time Intervals.