GammaLib
2.1.0.dev
|
COMPTEL Orbit Aspect Data container class. More...
#include <GCOMOads.hpp>
Public Member Functions | |
GCOMOads (void) | |
Void constructor. More... | |
GCOMOads (const GFilename &filename) | |
Filename constructor. More... | |
GCOMOads (const GCOMOads &oads) | |
Copy constructor. More... | |
virtual | ~GCOMOads (void) |
Destructor. More... | |
GCOMOads & | operator= (const GCOMOads &oads) |
Assignment operator. More... | |
GCOMOad & | operator[] (const int &index) |
Return reference to Orbit Aspect Data. More... | |
const GCOMOad & | operator[] (const int &index) const |
Return reference to Orbit Aspect Data (const version) More... | |
void | clear (void) |
Clear COMPTEL Orbit Aspect Data container. More... | |
GCOMOads * | clone (void) const |
Clone COMPTEL Orbit Aspect Data container. More... | |
std::string | classname (void) const |
Return class name. More... | |
GCOMOad & | at (const int &index) |
Return reference to Orbit Aspect Data. More... | |
const GCOMOad & | at (const int &index) const |
Return reference to Orbit Aspect Data (const version) More... | |
int | size (void) const |
Return number of Orbit Aspect Data in container. More... | |
bool | is_empty (void) const |
Signals if there are no Orbit Aspect Data in container. More... | |
GCOMOad & | append (const GCOMOad &oad) |
Append Orbit Aspect Data to container. More... | |
GCOMOad & | insert (const int &index, const GCOMOad &oad) |
Insert Orbit Aspect Data into container. More... | |
void | remove (const int &index) |
Remove Orbit Aspect Data from container. More... | |
void | reserve (const int &num) |
Reserves space for Orbit Aspect Data in container. More... | |
void | extend (const GCOMOads &oads) |
Append Orbit Aspect Data container. More... | |
void | load (const GFilename &filename) |
Load COMPTEL Orbit Aspect Data FITS file. More... | |
void | read (const GFitsTable &table) |
Read COMPTEL Orbit Aspect Data FITS table. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print COMPTEL Orbit Aspect Data container. More... | |
Public Member Functions inherited from GContainer | |
virtual | ~GContainer (void) |
Destructor. 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 GCOMOads &oads) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Attributes | |
std::vector< GCOMOad > | m_oads |
Orbit Aspect Data records. More... | |
COMPTEL Orbit Aspect Data container class.
The COMPTEL Orbit Aspect Data container class holds records of Orbit Aspect data that were extracted from one COMPTEL OAD FITS file.
Definition at line 51 of file GCOMOads.hpp.
GCOMOads::GCOMOads | ( | void | ) |
Void constructor.
Constructs an empty Orbit Aspect Data container
Definition at line 64 of file GCOMOads.cpp.
References init_members().
Referenced by clone().
|
explicit |
Filename constructor.
[in] | filename | Orbit Aspect Data FITS file |
Constructs an Orbit Aspect Data container from an OAD FITS file.
Definition at line 81 of file GCOMOads.cpp.
References init_members(), and load().
GCOMOads::GCOMOads | ( | const GCOMOads & | oads | ) |
Copy constructor.
[in] | oads | COMPTEL Orbit Aspect Data container. |
Definition at line 99 of file GCOMOads.cpp.
References copy_members(), and init_members().
|
virtual |
Append Orbit Aspect Data to container.
[in] | oad | Orbit Aspect Data. |
Appends Orbit Aspect Data to the container by making a deep copy of the Orbit Aspect Data.
Definition at line 246 of file GCOMOads.cpp.
GCOMOad & GCOMOads::at | ( | const int & | index | ) |
Return reference to Orbit Aspect Data.
[in] | index | Orbit Aspect Data index [0,...,size()-1]. |
GException::out_of_range | Orbit Aspect Data index is out of range. |
Returns a reference to the Orbit Aspect Data with the specified index
.
Definition at line 201 of file GCOMOads.cpp.
const GCOMOad & GCOMOads::at | ( | const int & | index | ) | const |
Return reference to Orbit Aspect Data (const version)
[in] | index | Orbit Aspect Data index [0,...,size()-1]. |
GException::out_of_range | Orbit Aspect Data index is out of range. |
Returns a reference to the Orbit Aspect Data with the specified index
.
Definition at line 224 of file GCOMOads.cpp.
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 99 of file GCOMOads.hpp.
|
virtual |
Clear COMPTEL Orbit Aspect Data container.
Implements GBase.
Definition at line 167 of file GCOMOads.cpp.
References free_members(), and init_members().
Referenced by GCOMObservation::init_members(), and read().
|
virtual |
Clone COMPTEL Orbit Aspect Data container.
Implements GBase.
Definition at line 185 of file GCOMOads.cpp.
References GCOMOads().
|
protected |
Copy class members.
[in] | oads | COMPTEL Orbit Aspect Data container. |
Definition at line 595 of file GCOMOads.cpp.
References m_oads.
Referenced by GCOMOads(), and operator=().
void GCOMOads::extend | ( | const GCOMOads & | oads | ) |
Append Orbit Aspect Data container.
[in] | oads | COMPTEL Orbit Aspect Data container. |
Append COMPTEL Orbit Aspect Data container to the container.
Definition at line 329 of file GCOMOads.cpp.
References is_empty(), m_oads, reserve(), and size().
Referenced by GCOMObservation::load().
|
protected |
Delete class members.
Definition at line 608 of file GCOMOads.cpp.
Referenced by clear(), operator=(), and ~GCOMOads().
|
protected |
Initialise class members.
Definition at line 580 of file GCOMOads.cpp.
References m_oads.
Referenced by clear(), GCOMOads(), and operator=().
Insert Orbit Aspect Data into container.
[in] | index | Orbit Aspect Data index (0,...,size()-1). |
[in] | oad | Orbit Aspect Data. |
GException::out_of_range | Orbit Aspect Data index is out of range. |
Inserts an Orbit
Aspect Data into the container before the Orbit Aspect Data with the specified index
.
Definition at line 268 of file GCOMOads.cpp.
References G_INSERT, is_empty(), m_oads, and size().
|
inlinevirtual |
Signals if there are no Orbit Aspect Data in container.
Signals if the Orbit Aspect Data container does not contain any Orbit Aspect Data.
Implements GContainer.
Definition at line 156 of file GCOMOads.hpp.
References m_oads.
Referenced by extend(), insert(), and GCOMObservation::print().
void GCOMOads::load | ( | const GFilename & | filename | ) |
Load COMPTEL Orbit Aspect Data FITS file.
[in] | filename | COMPTEL OAD FITS file name. |
Loads an COMPTEL Orbit Aspect Data FITS file in the container.
Definition at line 361 of file GCOMOads.cpp.
References GFits::close(), read(), and GFits::table().
Referenced by GCOMOads().
Assignment operator.
[in] | oads | COMPTEL Orbit Aspect Data container. |
Definition at line 137 of file GCOMOads.cpp.
References copy_members(), free_members(), and init_members().
|
inline |
Return reference to Orbit Aspect Data.
[in] | index | Orbit Aspect Data index [0,...,size()-1]. |
Returns a reference to the Orbit Aspect Data with the specified index
.
Definition at line 113 of file GCOMOads.hpp.
References m_oads.
|
inline |
Return reference to Orbit Aspect Data (const version)
[in] | index | Orbit Aspect Data index [0,...,size()-1]. |
Returns a reference to the Orbit Aspect Data with the specified index
.
Definition at line 127 of file GCOMOads.hpp.
References m_oads.
Print COMPTEL Orbit Aspect Data container.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 500 of file GCOMOads.cpp.
References m_oads, gammalib::parformat(), gammalib::reduce(), SILENT, size(), and gammalib::str().
Referenced by GCOMObservation::print().
void GCOMOads::read | ( | const GFitsTable & | table | ) |
Read COMPTEL Orbit Aspect Data FITS table.
[in] | table | COMPTEL OAD FITS table. |
Reads COMPTEL Orbit Aspect Data FITS table into the container.
Definition at line 387 of file GCOMOads.cpp.
References asin(), clear(), gammalib::com_time(), GCOMOad::ehora(), G_READ, GCOMOad::gcaz(), GCOMOad::gcel(), GCOMOad::georad(), GFitsTableCol::integer(), m_oads, GFitsTable::nrows(), GCOMOad::pos(), gammalib::rad2deg, GSkyDir::radec(), GFitsTableCol::real(), sqrt(), gammalib::str(), GCOMOad::tics(), GCOMOad::tjd(), GCOMOad::tstart(), GCOMOad::tstop(), gammalib::warning(), GCOMOad::xaxis(), and GCOMOad::zaxis().
Referenced by load().
|
virtual |
Remove Orbit Aspect Data from container.
[in] | index | Orbit Aspect Data index (0,...,size()-1). |
GException::out_of_range | Orbit Aspect Data index is out of range. |
Remove Orbit Aspect Data of specified index
from container.
Implements GContainer.
Definition at line 304 of file GCOMOads.cpp.
|
inlinevirtual |
Reserves space for Orbit Aspect Data in container.
[in] | num | Number of Orbit Aspect Data. |
Reserves space for num
Orbit Aspect Data in the container.
Implements GContainer.
Definition at line 170 of file GCOMOads.hpp.
References m_oads.
Referenced by extend().
|
inlinevirtual |
Return number of Orbit Aspect Data in container.
Returns the number of Orbit Aspect Data in the container.
Implements GContainer.
Definition at line 141 of file GCOMOads.hpp.
References m_oads.
Referenced by append(), at(), GCOMDri::compute_dre(), GCOMDri::compute_drg(), GCOMDris::compute_drws_energy(), GCOMDris::compute_drws_phibar(), GCOMDri::compute_drx(), extend(), insert(), GCOMObservation::load(), print(), remove(), GCOMDris::vetorate_finish(), GCOMDris::vetorate_generate(), and GCOMDris::vetorate_setup().
|
protected |
Orbit Aspect Data records.
Definition at line 89 of file GCOMOads.hpp.
Referenced by append(), at(), copy_members(), extend(), init_members(), insert(), is_empty(), operator[](), print(), read(), remove(), reserve(), and size().