GammaLib
2.1.0.dev
|
COMPTEL instrument status class. More...
#include <GCOMStatus.hpp>
Public Member Functions | |
GCOMStatus (void) | |
Void constructor. More... | |
GCOMStatus (const GCOMStatus &status) | |
Copy constructor. More... | |
virtual | ~GCOMStatus (void) |
Destructor. More... | |
GCOMStatus & | operator= (const GCOMStatus &status) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear COMPTEL instrument status. More... | |
virtual GCOMStatus * | clone (void) const |
Clone COMPTEL instrument status. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const |
Print COMPTEL instrument status. More... | |
void | load (void) const |
Load COMPTEL instrument status database. More... | |
int | d1status (const int &tjd, const int &module) const |
Return D1 module status. More... | |
int | d2status (const int &tjd, const int &module) const |
Return D2 module status. 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 GCOMStatus &status) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | update_cache (const int &tjd) const |
Update module status cache. More... | |
void | load_status (void) const |
Load status information from database. More... | |
Protected Attributes | |
std::vector< int > | m_tjds |
TJD for status. More... | |
std::vector< std::vector< int > > | m_d1status |
D1 module status. More... | |
std::vector< std::vector< int > > | m_d2status |
D2 module status. More... | |
int | m_last_tjd |
Last TJD. More... | |
std::vector< int > | m_last_d1status |
Last D1 module status. More... | |
std::vector< int > | m_last_d2status |
Last D2 module status. More... | |
COMPTEL instrument status class.
The class implements a database of the COMPTEL instrument status. For the time being the database contains the status of the D1 and D2 modules for all days that are covered by the CGRO mission.
Definition at line 49 of file GCOMStatus.hpp.
GCOMStatus::GCOMStatus | ( | void | ) |
Void constructor.
Definition at line 61 of file GCOMStatus.cpp.
References init_members().
Referenced by clone().
GCOMStatus::GCOMStatus | ( | const GCOMStatus & | status | ) |
Copy constructor.
[in] | status | COMPTEL instrument status. |
Definition at line 76 of file GCOMStatus.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 97 of file GCOMStatus.hpp.
|
virtual |
Clear COMPTEL instrument status.
Implements GBase.
Definition at line 144 of file GCOMStatus.cpp.
References free_members(), and init_members().
|
virtual |
Clone COMPTEL instrument status.
Implements GBase.
Definition at line 162 of file GCOMStatus.cpp.
References GCOMStatus().
|
protected |
Copy class members.
[in] | status | COMPTEL instrument status. |
Definition at line 310 of file GCOMStatus.cpp.
References m_d1status, m_d2status, m_last_d1status, m_last_d2status, m_last_tjd, and m_tjds.
Referenced by GCOMStatus(), and operator=().
int GCOMStatus::d1status | ( | const int & | tjd, |
const int & | module | ||
) | const |
Return D1 module status.
[in] | tjd | TJD for status inquiry. |
[in] | module | D1 module number (1-7). |
Definition at line 188 of file GCOMStatus.cpp.
References G_D1STATUS, load_status(), m_last_d1status, m_tjds, gammalib::str(), and update_cache().
Referenced by GCOMDri::compute_geometry(), load_status(), and GCOMSelection::use_event().
int GCOMStatus::d2status | ( | const int & | tjd, |
const int & | module | ||
) | const |
Return D2 module status.
[in] | tjd | TJD for status inquiry. |
[in] | module | D2 module number (1-14). |
Definition at line 217 of file GCOMStatus.cpp.
References G_D2STATUS, load_status(), m_last_d2status, m_tjds, gammalib::str(), and update_cache().
Referenced by GCOMDri::compute_geometry(), load_status(), and GCOMSelection::use_event().
|
protected |
Delete class members.
Definition at line 330 of file GCOMStatus.cpp.
Referenced by clear(), operator=(), and ~GCOMStatus().
|
protected |
Initialise class members.
Definition at line 288 of file GCOMStatus.cpp.
References m_d1status, m_d2status, m_last_d1status, m_last_d2status, m_last_tjd, and m_tjds.
Referenced by clear(), GCOMStatus(), and operator=().
void GCOMStatus::load | ( | void | ) | const |
Load COMPTEL instrument status database.
Definition at line 171 of file GCOMStatus.cpp.
References load_status().
|
protected |
Load status information from database.
Loads the status information from the database.
Definition at line 383 of file GCOMStatus.cpp.
References GFits::close(), d1status(), d2status(), GCaldb::filename(), G_LOAD_STATUS, GFitsTableCol::integer(), GFilename::is_empty(), m_d1status, m_d2status, m_tjds, GFitsTable::nrows(), and GFits::table().
Referenced by d1status(), d2status(), and load().
GCOMStatus & GCOMStatus::operator= | ( | const GCOMStatus & | status | ) |
Assignment operator.
[in] | status | COMPTEL instrument status. |
Definition at line 114 of file GCOMStatus.cpp.
References copy_members(), free_members(), and init_members().
Print COMPTEL instrument status.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 245 of file GCOMStatus.cpp.
References m_tjds, gammalib::parformat(), SILENT, and gammalib::str().
|
protected |
Update module status cache.
[in] | tjd | TJD for status inquiry. |
Definition at line 342 of file GCOMStatus.cpp.
References G_UPDATE_CACHE, m_d1status, m_d2status, m_last_d1status, m_last_d2status, m_last_tjd, m_tjds, and gammalib::str().
Referenced by d1status(), and d2status().
|
mutableprotected |
D1 module status.
Definition at line 81 of file GCOMStatus.hpp.
Referenced by copy_members(), init_members(), load_status(), and update_cache().
|
mutableprotected |
D2 module status.
Definition at line 82 of file GCOMStatus.hpp.
Referenced by copy_members(), init_members(), load_status(), and update_cache().
|
mutableprotected |
Last D1 module status.
Definition at line 86 of file GCOMStatus.hpp.
Referenced by copy_members(), d1status(), init_members(), and update_cache().
|
mutableprotected |
Last D2 module status.
Definition at line 87 of file GCOMStatus.hpp.
Referenced by copy_members(), d2status(), init_members(), and update_cache().
|
mutableprotected |
Last TJD.
Definition at line 85 of file GCOMStatus.hpp.
Referenced by copy_members(), init_members(), and update_cache().
|
mutableprotected |
TJD for status.
Definition at line 80 of file GCOMStatus.hpp.
Referenced by copy_members(), d1status(), d2status(), init_members(), load_status(), print(), and update_cache().