GammaLib
2.1.0.dev
|
Abstract event container class. More...
#include <GEvents.hpp>
Public Member Functions | |
GEvents (void) | |
Void constructor. More... | |
GEvents (const GEvents &events) | |
Copy constructor. More... | |
virtual | ~GEvents (void) |
Destructor. More... | |
virtual GEvents & | operator= (const GEvents &events) |
Assignment operator. More... | |
virtual GEvent * | operator[] (const int &index)=0 |
virtual const GEvent * | operator[] (const int &index) const =0 |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GEvents * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual int | size (void) const =0 |
virtual void | load (const GFilename &filename)=0 |
virtual void | save (const GFilename &filename, const bool &clobber=false) const =0 |
virtual void | read (const GFits &file)=0 |
virtual void | write (GFits &file) const =0 |
virtual int | number (void) const =0 |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
void | ebounds (const GEbounds &ebounds) |
Set energy boundaries. More... | |
void | gti (const GGti >i) |
Set Good Time Intervals. More... | |
const GEbounds & | ebounds (void) const |
Return energy boundaries. More... | |
const GGti & | gti (void) const |
Return Good Time Intervals. More... | |
const GTime & | tstart (void) const |
Return start time. More... | |
const GTime & | tstop (void) const |
Return stop time. More... | |
const GEnergy & | emin (void) const |
Return minimum energy. More... | |
const GEnergy & | emax (void) const |
Return maximum energy. 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 GEvents &events) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
virtual void | set_energies (void)=0 |
virtual void | set_times (void)=0 |
Protected Attributes | |
GEbounds | m_ebounds |
Energy boundaries covered by events. More... | |
GGti | m_gti |
Good time intervals covered by events. More... | |
Abstract event container class.
This class is an abstract container base class for events. It also holds the energy boundaries and the Good Time Intervals (GTIs) that define the data space. Access to the energy boundaries is provided by the ebounds() methods, the GTI can be accessed by the gti() methods. Furthermore, the emin() and emax() methods return the lowest and highest energy covered by the event container, while the tstart() and tstop() methods return the first and the last time.
Access to events (in form of atoms or bins) is provided through the element access operator[].
The size() method gives the number of event atoms or bins that is found in the container. The number() method provides the total number of events in the container.
An event iterator allows iterating over the event atoms or bins of the container.
Definition at line 66 of file GEvents.hpp.
GEvents::GEvents | ( | void | ) |
GEvents::GEvents | ( | const GEvents & | events | ) |
Copy constructor.
[in] | events | Event container. |
Definition at line 66 of file GEvents.cpp.
References copy_members(), and init_members().
|
virtual |
|
pure virtual |
Return class name.
Returns the class name for non-abstract classes in a human readable way.
Implements GBase.
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
|
pure virtual |
Clear object.
Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.
Implements GBase.
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GBase.
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
Referenced by GObservation::copy_members(), and GObservation::events().
|
protected |
Copy class members.
[in] | events | Event container. |
Definition at line 192 of file GEvents.cpp.
References m_ebounds, and m_gti.
Referenced by GEvents(), and operator=().
void GEvents::ebounds | ( | const GEbounds & | ebounds | ) |
Set energy boundaries.
[in] | ebounds | Energy boundaries. |
Definition at line 136 of file GEvents.cpp.
References ebounds(), m_ebounds, and set_energies().
Referenced by GCTAObservation::ebounds(), GCTACubeBackground::GCTACubeBackground(), GCTACubeEdisp::GCTACubeEdisp(), GCTACubeExposure::GCTACubeExposure(), GCTACubePsf::GCTACubePsf(), GSPIResponse::irf(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), GCTAModelBackground::mc(), GObservation::npred_spec(), GCTAObservation::read(), GLATMeanPsf::set(), GSPIResponse::set(), and GCTAObservation::write().
|
inline |
Return energy boundaries.
Definition at line 122 of file GEvents.hpp.
References m_ebounds.
Referenced by ebounds(), GCTAEventCube::GCTAEventCube(), GCOMEventCube::init_cube(), GCOMEventList::print(), GLATEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GLATEventCube::set_energies(), GCTAEventCube::set_energies(), GLATEventCube::write(), and GCTAEventCube::write().
|
inline |
Return maximum energy.
Definition at line 182 of file GEvents.hpp.
References GEbounds::emax(), and m_ebounds.
Referenced by GCOMObservation::GCOMObservation(), GCOMObservation::load_dre(), GMWLSpectrum::print(), GCOMEventList::print(), GLATEventCube::print(), GCOMEventCube::print(), GSPIEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GCOMEventList::read_events(), GMWLSpectrum::set_ebounds(), GLATEventCube::set_energies(), GCTAEventCube::set_energies(), and GCTAEventList::write_ds_keys().
|
inline |
Return minimum energy.
Definition at line 170 of file GEvents.hpp.
References GEbounds::emin(), and m_ebounds.
Referenced by GCOMObservation::GCOMObservation(), GCOMObservation::load_dre(), GMWLSpectrum::print(), GCOMEventList::print(), GLATEventCube::print(), GCOMEventCube::print(), GSPIEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GCOMEventList::read_events(), GMWLSpectrum::set_ebounds(), GLATEventCube::set_energies(), GCTAEventCube::set_energies(), and GCTAEventList::write_ds_keys().
|
protected |
Delete class members.
Definition at line 206 of file GEvents.cpp.
Referenced by GMWLSpectrum::clear(), GCOMEventList::clear(), GLATEventCube::clear(), GLATEventList::clear(), GCOMEventCube::clear(), GSPIEventCube::clear(), GCTAEventList::clear(), GCTAEventCube::clear(), operator=(), and ~GEvents().
void GEvents::gti | ( | const GGti & | gti | ) |
Set Good Time Intervals.
[in] | gti | Good Time Intervals. |
Definition at line 154 of file GEvents.cpp.
References gti(), m_gti, and set_times().
Referenced by GCTACubeBackground::fill(), GCOMObservation::GCOMObservation(), GCTAObservation::gti(), GCOMObservation::load_dre(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), GCTAModelBackground::mc(), GObservation::npred(), GCTAObservation::read(), GSPIModelDataSpace::setup_date(), GSPIModelDataSpace::split_pointing_indices(), GCTAObservation::write(), and GCTAObservation::write_attributes().
|
inline |
Return Good Time Intervals.
Definition at line 134 of file GEvents.hpp.
References m_gti.
Referenced by GCTAEventCube::GCTAEventCube(), gti(), GCOMEventCube::init_cube(), GCOMEventList::print(), GLATEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GLATEventList::read(), GSPIEventCube::read(), GCTAEventList::read(), GLATEventCube::write(), GCTAEventCube::write(), and GCTAEventList::write().
|
protected |
Initialise class members.
Definition at line 176 of file GEvents.cpp.
References GGti::clear(), GEbounds::clear(), m_ebounds, and m_gti.
Referenced by GMWLSpectrum::clear(), GCOMEventList::clear(), GLATEventCube::clear(), GLATEventList::clear(), GCOMEventCube::clear(), GSPIEventCube::clear(), GCTAEventList::clear(), GCTAEventCube::clear(), GEvents(), and operator=().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventCube, GLATEventList, GMWLSpectrum, GCOMEventList, GEventList, and GEventCube.
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventCube, GLATEventList, GMWLSpectrum, GCOMEventList, GEventList, and GEventCube.
Referenced by GObservation::nobserved().
Assignment operator.
[in] | events | Event container. |
Definition at line 104 of file GEvents.cpp.
References copy_members(), free_members(), and init_members().
Referenced by GEventCube::operator=(), and GEventList::operator=().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
Print content of object.
[in] | chatter | Chattiness (defaults to NORMAL). |
Formats the content in a standard way and puts this content in a C++ string that is returned.
Implements GBase.
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
Referenced by GLATObservation::print(), GMWLObservation::print(), GSPIObservation::print(), GCTAObservation::print(), and GCOMObservation::print().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventCube, GLATEventList, GMWLSpectrum, GCOMEventList, GEventList, and GEventCube.
Referenced by GCOMObservation::load_dre().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventCube, GLATEventList, GMWLSpectrum, GCOMEventList, GEventList, and GEventCube.
|
protectedpure virtual |
Implemented in GCTAEventCube, GCTAEventList, GLATEventCube, GSPIEventCube, GCOMEventCube, GLATEventList, GCOMEventList, GEventList, and GEventCube.
Referenced by ebounds().
|
protectedpure virtual |
Implemented in GCTAEventCube, GCTAEventList, GLATEventCube, GSPIEventCube, GCOMEventCube, GLATEventList, GCOMEventList, GEventList, and GEventCube.
Referenced by gti().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventList, GLATEventCube, GCOMEventList, GMWLSpectrum, GEventList, and GEventCube.
Referenced by GResponse::convolve(), GModelData::eval(), GModels::eval(), GResponse::eval_probs(), GResponse::irf_composite(), GResponse::irf_diffuse(), GResponse::irf_elliptical(), GResponse::irf_ptsrc(), GCTAResponseCube::irf_radial(), GResponse::irf_radial(), GResponse::irf_spatial(), GObservation::likelihood_gaussian_binned(), GObservation::likelihood_poisson_binned(), GObservation::likelihood_poisson_unbinned(), and GObservation::model().
|
inline |
Return start time.
Definition at line 146 of file GEvents.hpp.
References m_gti, and GGti::tstart().
Referenced by GCTAModelAeffBackground::mc(), GMWLSpectrum::print(), GCOMEventList::print(), GLATEventCube::print(), GCOMEventCube::print(), GSPIEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GLATEventList::read(), GCTAEventList::read(), GSPIEventCube::read_gti(), and GCTAObservation::write_attributes().
|
inline |
Return stop time.
Definition at line 158 of file GEvents.hpp.
References m_gti, and GGti::tstop().
Referenced by GMWLSpectrum::print(), GCOMEventList::print(), GLATEventCube::print(), GCOMEventCube::print(), GSPIEventCube::print(), GCTAEventList::print(), GCTAEventCube::print(), GLATEventList::read(), GCTAEventList::read(), GSPIEventCube::read_gti(), and GCTAObservation::write_attributes().
|
pure virtual |
Implemented in GCTAEventCube, GCTAEventList, GSPIEventCube, GCOMEventCube, GLATEventCube, GLATEventList, GMWLSpectrum, GCOMEventList, GEventList, and GEventCube.
|
protected |
Energy boundaries covered by events.
Definition at line 111 of file GEvents.hpp.
Referenced by copy_members(), ebounds(), emax(), emin(), init_members(), GMWLSpectrum::print(), GCTAEventList::read(), GSPIEventCube::read_ebds(), GLATEventCube::read_ebds(), GCTAEventCube::read_ebds(), GCOMEventList::read_events(), GMWLSpectrum::set_ebounds(), and GCOMEventCube::set_energies().
|
protected |
Good time intervals covered by events.
Definition at line 112 of file GEvents.hpp.
Referenced by copy_members(), GCTAEventCube::copy_members(), GCTAEventList::copy_members(), gti(), init_members(), GCTAEventCube::init_members(), GCTAEventList::init_members(), GMWLSpectrum::print(), GCOMEventList::read(), GLATEventList::read(), GCTAEventList::read(), GLATEventList::read_events(), GCTAEventList::read_events(), GSPIEventCube::read_gti(), GLATEventCube::read_gti(), GCTAEventCube::read_gti(), GCOMEventCube::set_times(), GLATEventCube::set_times(), GCTAEventCube::set_times(), tstart(), tstop(), and GCTAEventList::write_events().