40 #define G_ACCESS "GCOMHkds::operator[](std::string&)"
41 #define G_AT "GCOMHkds::at(int&)"
42 #define G_SET1 "GCOMHkds::set(int&, GCOMHkd&)"
43 #define G_SET2 "GCOMHkds::set(std::string&, GCOMHkd&)"
44 #define G_INSERT "GCOMHkds::insert(int&, GCOMHkd&)"
45 #define G_REMOVE "GCOMHkds::remove(int&)"
46 #define G_READ "GCOMHkds::read(GFitsTable&)"
181 std::string msg =
"Housekeeping parameter \""+name+
"\" not found in "
182 "Housekeeping Data collection. Please specify a "
183 "valid housekeeping parameter name.";
213 std::string msg =
"Housekeeping parameter \""+name+
"\" not found in "
214 "Housekeeping Data collection. Please specify a "
215 "valid housekeeping parameter name.";
272 if (index < 0 || index >=
size()) {
273 std::string msg =
"Housekeeping Data container index";
297 if (index < 0 || index >=
size()) {
298 std::string msg =
"Housekeeping Data container index";
329 #if defined(G_RANGE_CHECK)
330 if (index < 0 || index >=
size()) {
331 std::string msg =
"Housekeeping Data container index";
338 if (inx != -1 && inx != index) {
340 "Attempt to set Housekeeping Data container with name \""+
342 ", but a Housekeeping Data container with the same name exists "
343 "already at index "+
gammalib::str(inx)+
" in the collection. "
344 "Every Housekeeping Data container in the collection needs a "
384 std::string msg =
"Housekeeping parameter \""+name+
"\" not found in "
385 "Housekeeping Data collection. Please specify a "
386 "Housekeeping parameter name that exists in the "
393 if (inx != -1 && inx != index) {
395 "Attempt to set Housekeeping Data container with name \""+
397 ", but a Housekeeping Data container with the same name exists "
398 "already at index "+
gammalib::str(inx)+
" in the collection. "
399 "Every Housekeeping Data container in the collection needs a "
447 #if defined(G_RANGE_CHECK)
450 std::string msg =
"Housekeeping Data container index";
455 if (index < 0 || index >=
size()) {
456 std::string msg =
"Housekeeping Data container index";
483 #if defined(G_RANGE_CHECK)
484 if (index < 0 || index >=
size()) {
485 std::string msg =
"Housekeeping Data container index";
513 return (index != -1);
531 for (
int i = 0; i < hkds.
size(); ++i) {
536 m_hkds[i].extend(hkds[i]);
564 GFits fits(filename);
594 int num = table.
nrows();
606 for (
int i = 0; i < num; ++i) {
617 hkd = &((*this)[index]);
648 result.append(
"=== GCOMHkds ===");
655 for (
int i = 0; i <
size(); ++i) {
728 for (
int i = 0; i <
size(); ++i) {
729 if (
m_hkds[i].name() == name) {
void load(const GFilename &filename)
Load Housekeeping Data collection from FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
GCOMHkd & append(const GCOMHkd &hkd)
Append Housekeeping Data container to collection.
void remove(const int &index)
Remove Housekeeping Data container from collection.
GCOMHkd & at(const int &index)
Return reference to Housekeeping Data container.
GCOMHkds * clone(void) const
Clone Housekeeping Data collection.
FITS file class interface definition.
GCOMHkd & insert(const int &index, const GCOMHkd &hkd)
Insert Housekeeping Data container into collection.
GTime com_time(const int &tjd, const int &tics)
Convert TJD and COMPTEL tics in GTime object.
GCOMHkds & operator=(const GCOMHkds &hkds)
Assignment operator.
void init_members(void)
Initialise class members.
void clear(void)
Clear Housekeeping Data collection.
Implementation of support function used by COMPTEL classes.
void read(const GFitsTable &table)
Read Housekeeping Data collection from FITS table.
virtual std::string string(const int &row, const int &inx=0) const =0
void copy_members(const GCOMHkds &hkds)
Copy class members.
bool is_empty(void) const
Signals if there are no Housekeeping Data containers in collection.
std::vector< GCOMHkd > m_hkds
Housekeeping Data containers.
Abstract interface for FITS table column.
COMPTEL Housekeeping Data collection class.
Abstract interface for FITS table.
void extend(const GCOMHkds &hkds)
Extend Housekeeping Data collection.
std::string print(const GChatter &chatter=NORMAL) const
Print Housekeeping Data collection.
void free_members(void)
Delete class members.
const int & nrows(void) const
Return number of rows in table.
COMPTEL Housekeeping Data container class.
virtual int integer(const int &row, const int &inx=0) const =0
int size(void) const
Return number of Housekeeping parameters in collection.
bool contains(const std::string &name) const
Signals if Housekeeping parameter exists in collection.
virtual double real(const int &row, const int &inx=0) const =0
int get_index(const std::string &name) const
Return Housekeeping Data container index by parameter name.
virtual ~GCOMHkds(void)
Destructor.
const std::string & name(void) const
Return Housekeeping Data name.
Exception handler interface definition.
COMPTEL Housekeeping Data collection class definition.
GCOMHkds(void)
Void constructor.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
GCOMHkd & operator[](const int &index)
Return reference to Housekeeping Data container.
void close(void)
Close FITS file.
void append(const GTime &time, const double &value)
Append Housekeeping Data to container.
GCOMHkd & set(const int &index, const GCOMHkd &hkd)
Set Housekeeping Data container in collection.
Mathematical function definitions.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
FITS table abstract base class interface definition.