GammaLib
2.0.0
|
Interface for the Fermi LAT energy dispersion. More...
#include <GLATEdisp.hpp>
Public Member Functions | |
GLATEdisp (void) | |
Void constructor. More... | |
GLATEdisp (const GFilename &filename, const std::string &evtype) | |
File constructor. More... | |
GLATEdisp (const GLATEdisp &edisp) | |
Copy constructor. More... | |
virtual | ~GLATEdisp (void) |
Destructor. More... | |
GLATEdisp & | operator= (const GLATEdisp &edisp) |
Assignment operator. More... | |
void | clear (void) |
Clear energy dispersion response. More... | |
GLATEdisp * | clone (void) const |
Clone energy dispersion response. More... | |
std::string | classname (void) const |
Return class name. More... | |
const std::string & | evtype (void) const |
Return event type. More... | |
void | load (const GFilename &filename, const std::string &evtype) |
Load energy dispersion from FITS file. More... | |
void | save (const GFilename &filename, const bool &clobber=false) |
Save energy dispersion into FITS file. More... | |
void | read (const GFits &file, const std::string &evtype) |
Read energy dispersion from FITS file. More... | |
void | write (GFits &file) const |
Write energy dispersion into FITS file. More... | |
int | size (void) const |
Return number of bins in energy dispersion response. More... | |
int | nenergies (void) const |
Return number of energies in energy dispersion response. More... | |
int | ncostheta (void) const |
Return number of cosine theta bins in energy dispersion response. More... | |
bool | has_phi (void) const |
Signal that energy dispersion has Phi dependence. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print energy dispersion information. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Private Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GLATEdisp &edisp) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | read_edisp (const GFitsTable &table) |
Read energy dispersion from FITS table. More... | |
void | write_edisp (GFits &file) const |
Write energy dispersion into FITS file. More... | |
Private Attributes | |
std::string | m_evtype |
Event type. More... | |
GLATResponseTable | m_edisp_bins |
Energy dispersion energy and cos theta binning. More... | |
std::vector< double > | m_norm |
Energy dispersion normalization. More... | |
std::vector< double > | m_ls1 |
Energy dispersion ... More... | |
std::vector< double > | m_scale |
Energy dispersion scaling parameters. More... | |
Interface for the Fermi LAT energy dispersion.
Definition at line 55 of file GLATEdisp.hpp.
GLATEdisp::GLATEdisp | ( | void | ) |
Void constructor.
Definition at line 62 of file GLATEdisp.cpp.
References init_members().
Referenced by clone().
GLATEdisp::GLATEdisp | ( | const GFilename & | filename, |
const std::string & | evtype | ||
) |
File constructor.
[in] | filename | FITS file name. |
[in] | evtype | Event type. |
Construct instance by loading the energy dispersion information from FITS file.
Definition at line 81 of file GLATEdisp.cpp.
References init_members(), and load().
GLATEdisp::GLATEdisp | ( | const GLATEdisp & | edisp | ) |
Copy constructor.
[in] | edisp | Energy dispersion. |
Definition at line 99 of file GLATEdisp.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 112 of file GLATEdisp.hpp.
|
virtual |
Clear energy dispersion response.
This method properly resets the object to an initial state.
Implements GBase.
Definition at line 169 of file GLATEdisp.cpp.
References free_members(), and init_members().
Referenced by read().
|
virtual |
Clone energy dispersion response.
Implements GBase.
Definition at line 187 of file GLATEdisp.cpp.
References GLATEdisp().
|
private |
Copy class members.
[in] | edisp | Energy dispersion. |
Definition at line 347 of file GLATEdisp.cpp.
References m_edisp_bins, m_evtype, m_ls1, m_norm, and m_scale.
Referenced by GLATEdisp(), and operator=().
|
inline |
Return event type.
Definition at line 124 of file GLATEdisp.hpp.
References m_evtype.
Referenced by read().
|
private |
Delete class members.
Definition at line 364 of file GLATEdisp.cpp.
Referenced by clear(), operator=(), and ~GLATEdisp().
|
inline |
Signal that energy dispersion has Phi dependence.
Definition at line 172 of file GLATEdisp.hpp.
|
private |
Initialise class members.
Definition at line 328 of file GLATEdisp.cpp.
References GLATResponseTable::clear(), m_edisp_bins, m_evtype, m_ls1, m_norm, and m_scale.
Referenced by clear(), GLATEdisp(), and operator=().
void GLATEdisp::load | ( | const GFilename & | filename, |
const std::string & | evtype | ||
) |
Load energy dispersion from FITS file.
[in] | filename | FITS file. |
[in] | evtype | Event type. |
Definition at line 199 of file GLATEdisp.cpp.
References read().
Referenced by GLATEdisp().
|
inline |
Return number of cosine theta bins in energy dispersion response.
Definition at line 160 of file GLATEdisp.hpp.
References m_edisp_bins, and GLATResponseTable::ncostheta().
|
inline |
Return number of energies in energy dispersion response.
Definition at line 148 of file GLATEdisp.hpp.
References m_edisp_bins, and GLATResponseTable::nenergies().
Assignment operator.
[in] | edisp | Energy dispersion. |
Definition at line 137 of file GLATEdisp.cpp.
References copy_members(), free_members(), and init_members().
Print energy dispersion information.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 295 of file GLATEdisp.cpp.
References ncostheta(), nenergies(), gammalib::parformat(), SILENT, and gammalib::str().
void GLATEdisp::read | ( | const GFits & | fits, |
const std::string & | evtype | ||
) |
Read energy dispersion from FITS file.
[in] | fits | FITS file. |
[in] | evtype | Event type. |
Definition at line 242 of file GLATEdisp.cpp.
References clear(), GFits::contains(), evtype(), gammalib::extname_lat_edisp, m_evtype, read_edisp(), and GFits::table().
Referenced by load().
|
private |
Read energy dispersion from FITS table.
[in] | table | FITS table. |
GException::invalid_argument | Inconsistent response table encountered |
Definition at line 381 of file GLATEdisp.cpp.
References m_edisp_bins, m_ls1, m_norm, GLATResponseTable::read(), GLATResponseTable::size(), and size().
Referenced by read().
void GLATEdisp::save | ( | const GFilename & | filename, |
const bool & | clobber = false |
||
) |
Save energy dispersion into FITS file.
[in] | filename | FITS file. |
[in] | clobber | Overwrite existing file? (default: false) |
Definition at line 218 of file GLATEdisp.cpp.
References GFits::saveto(), and write().
|
inline |
Return number of bins in energy dispersion response.
Definition at line 136 of file GLATEdisp.hpp.
References ncostheta(), and nenergies().
Referenced by read_edisp(), and write_edisp().
void GLATEdisp::write | ( | GFits & | fits | ) | const |
Write energy dispersion into FITS file.
[in] | fits | FITS file. |
Definition at line 279 of file GLATEdisp.cpp.
References write_edisp().
Referenced by save().
|
private |
Write energy dispersion into FITS file.
[in] | file | FITS file. |
This method does not write anything if the instance is empty.
Definition at line 440 of file GLATEdisp.cpp.
References GFits::append(), GFitsHDU::extname(), gammalib::extname_lat_edisp, m_edisp_bins, GLATResponseTable::size(), size(), and GLATResponseTable::write().
Referenced by write().
|
private |
Energy dispersion energy and cos theta binning.
Definition at line 99 of file GLATEdisp.hpp.
Referenced by copy_members(), init_members(), ncostheta(), nenergies(), read_edisp(), and write_edisp().
|
private |
Event type.
Definition at line 98 of file GLATEdisp.hpp.
Referenced by copy_members(), evtype(), init_members(), and read().
|
private |
Energy dispersion ...
Definition at line 101 of file GLATEdisp.hpp.
Referenced by copy_members(), init_members(), and read_edisp().
|
private |
Energy dispersion normalization.
Definition at line 100 of file GLATEdisp.hpp.
Referenced by copy_members(), init_members(), and read_edisp().
|
private |
Energy dispersion scaling parameters.
Definition at line 102 of file GLATEdisp.hpp.
Referenced by copy_members(), and init_members().