39#define G_D1STATUS "GCOMStatus::d1status(int&, int&)"
40#define G_D2STATUS "GCOMStatus::d2status(int&, int&)"
41#define G_UPDATE_CACHE "GCOMStatus::update_cache(int&)"
42#define G_LOAD_STATUS "GCOMStatus::load_status()"
117 if (
this != &status) {
196 if (module < 1 || module > 7) {
197 std::string msg =
"Invalid D1 module number ("+
gammalib::str(module)+
198 "). Number needs to be comprised within [1,7].";
225 if (module < 1 || module > 14) {
226 std::string msg =
"Invalid D2 module number ("+
gammalib::str(module)+
227 "). Number needs to be comprised within [1,14].";
254 result.append(
"=== GCOMStatus ===");
259 result.append(
"not loaded");
262 result.append(
"loaded");
267 result.append(
" - ");
269 result.append(
" days");
351 bool success =
false;
354 for (
int i = 0; i <
m_tjds.size(); ++i) {
365 std::string msg =
"No COMPTEL status information found for TJD "+
367 "Please exclude that day from your analysis.";
392 GCaldb caldb(
"cgro",
"comptel");
399 std::string msg =
"COMPTEL status information not found in COMPTEL "
400 "calibration database. Make sure that the COMPTEL "
401 "calibration database is in the path of the $CALDB "
402 "environment variable.";
407 GFits fits(filename);
413 int num = table.
nrows();
429 for (
int i = 0; i < num; ++i) {
436 for (
int k = 0; k < 7; ++k) {
443 for (
int k = 0; k < 14; ++k) {
COMPTEL instrument status class definition.
Calibration database class interface definition.
Exception handler interface definition.
FITS table abstract base class interface definition.
FITS file class interface definition.
COMPTEL instrument status class.
std::vector< std::vector< int > > m_d1status
D1 module status.
GCOMStatus(void)
Void constructor.
std::vector< std::vector< int > > m_d2status
D2 module status.
virtual GCOMStatus * clone(void) const
Clone COMPTEL instrument status.
int d2status(const int &tjd, const int &module) const
Return D2 module status.
std::vector< int > m_last_d1status
Last D1 module status.
int d1status(const int &tjd, const int &module) const
Return D1 module status.
void init_members(void)
Initialise class members.
void load(void) const
Load COMPTEL instrument status database.
virtual ~GCOMStatus(void)
Destructor.
std::vector< int > m_last_d2status
Last D2 module status.
void load_status(void) const
Load status information from database.
GCOMStatus & operator=(const GCOMStatus &status)
Assignment operator.
void free_members(void)
Delete class members.
void update_cache(const int &tjd) const
Update module status cache.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL instrument status.
virtual void clear(void)
Clear COMPTEL instrument status.
std::vector< int > m_tjds
TJD for status.
void copy_members(const GCOMStatus &status)
Copy class members.
Calibration database class.
GFilename filename(const std::string &detector, const std::string &filter, const std::string &codename, const std::string &date, const std::string &time, const std::string &expr)
Return calibration file name based on selection parameters.
bool is_empty(void) const
Signal if filename is empty.
Abstract interface for FITS table column.
virtual int integer(const int &row, const int &inx=0) const =0
Abstract interface for FITS table.
const int & nrows(void) const
Return number of rows in table.
void close(void)
Close FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.