GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCOMOads Class Reference

COMPTEL Orbit Aspect Data container class. More...

#include <GCOMOads.hpp>

Inheritance diagram for GCOMOads:
GContainer GBase

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...
 
GCOMOadsoperator= (const GCOMOads &oads)
 Assignment operator. More...
 
GCOMOadoperator[] (const int &index)
 Return reference to Orbit Aspect Data. More...
 
const GCOMOadoperator[] (const int &index) const
 Return reference to Orbit Aspect Data (const version) More...
 
void clear (void)
 Clear COMPTEL Orbit Aspect Data container. More...
 
GCOMOadsclone (void) const
 Clone COMPTEL Orbit Aspect Data container. More...
 
std::string classname (void) const
 Return class name. More...
 
GCOMOadat (const int &index)
 Return reference to Orbit Aspect Data. More...
 
const GCOMOadat (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...
 
GCOMOadappend (const GCOMOad &oad)
 Append Orbit Aspect Data to container. More...
 
GCOMOadinsert (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< GCOMOadm_oads
 Orbit Aspect Data records. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

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().

GCOMOads::GCOMOads ( const GFilename filename)
explicit

Filename constructor.

Parameters
[in]filenameOrbit 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.

Parameters
[in]oadsCOMPTEL Orbit Aspect Data container.

Definition at line 99 of file GCOMOads.cpp.

References copy_members(), and init_members().

GCOMOads::~GCOMOads ( void  )
virtual

Destructor.

Definition at line 115 of file GCOMOads.cpp.

References free_members().

Member Function Documentation

GCOMOad & GCOMOads::append ( const GCOMOad oad)

Append Orbit Aspect Data to container.

Parameters
[in]oadOrbit Aspect Data.
Returns
Reference to appended 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.

References m_oads, and size().

GCOMOad & GCOMOads::at ( const int &  index)

Return reference to Orbit Aspect Data.

Parameters
[in]indexOrbit Aspect Data index [0,...,size()-1].
Exceptions
GException::out_of_rangeOrbit 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.

References G_AT, m_oads, and size().

const GCOMOad & GCOMOads::at ( const int &  index) const

Return reference to Orbit Aspect Data (const version)

Parameters
[in]indexOrbit Aspect Data index [0,...,size()-1].
Exceptions
GException::out_of_rangeOrbit 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.

References G_AT, m_oads, and size().

std::string GCOMOads::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GCOMOads").

Implements GBase.

Definition at line 99 of file GCOMOads.hpp.

void GCOMOads::clear ( void  )
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().

GCOMOads * GCOMOads::clone ( void  ) const
virtual

Clone COMPTEL Orbit Aspect Data container.

Returns
Pointer to deep copy of COMPTEL Orbit Aspect Data container.

Implements GBase.

Definition at line 185 of file GCOMOads.cpp.

References GCOMOads().

void GCOMOads::copy_members ( const GCOMOads oads)
protected

Copy class members.

Parameters
[in]oadsCOMPTEL 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.

Parameters
[in]oadsCOMPTEL 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().

void GCOMOads::free_members ( void  )
protected

Delete class members.

Definition at line 608 of file GCOMOads.cpp.

Referenced by clear(), operator=(), and ~GCOMOads().

void GCOMOads::init_members ( void  )
protected

Initialise class members.

Definition at line 580 of file GCOMOads.cpp.

References m_oads.

Referenced by clear(), GCOMOads(), and operator=().

GCOMOad & GCOMOads::insert ( const int &  index,
const GCOMOad oad 
)

Insert Orbit Aspect Data into container.

Parameters
[in]indexOrbit Aspect Data index (0,...,size()-1).
[in]oadOrbit Aspect Data.
Exceptions
GException::out_of_rangeOrbit 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().

bool GCOMOads::is_empty ( void  ) const
inlinevirtual

Signals if there are no Orbit Aspect Data in container.

Returns
True if container is empty, false otherwise.

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.

Parameters
[in]filenameCOMPTEL 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().

GCOMOads & GCOMOads::operator= ( const GCOMOads oads)

Assignment operator.

Parameters
[in]oadsCOMPTEL Orbit Aspect Data container.
Returns
COMPTEL Orbit Aspect Data container.

Definition at line 137 of file GCOMOads.cpp.

References copy_members(), free_members(), and init_members().

GCOMOad & GCOMOads::operator[] ( const int &  index)
inline

Return reference to Orbit Aspect Data.

Parameters
[in]indexOrbit 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.

const GCOMOad & GCOMOads::operator[] ( const int &  index) const
inline

Return reference to Orbit Aspect Data (const version)

Parameters
[in]indexOrbit 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.

std::string GCOMOads::print ( const GChatter chatter = NORMAL) const
virtual

Print COMPTEL Orbit Aspect Data container.

Parameters
[in]chatterChattiness.
Returns
String containing COMPTEL Orbit Aspect Data container information.

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.

Parameters
[in]tableCOMPTEL 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().

void GCOMOads::remove ( const int &  index)
virtual

Remove Orbit Aspect Data from container.

Parameters
[in]indexOrbit Aspect Data index (0,...,size()-1).
Exceptions
GException::out_of_rangeOrbit 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.

References G_REMOVE, m_oads, and size().

void GCOMOads::reserve ( const int &  num)
inlinevirtual

Reserves space for Orbit Aspect Data in container.

Parameters
[in]numNumber 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().

int GCOMOads::size ( void  ) const
inlinevirtual

Return number of Orbit Aspect Data in container.

Returns
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().

Member Data Documentation

std::vector<GCOMOad> GCOMOads::m_oads
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().


The documentation for this class was generated from the following files: