GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GEvents Class Referenceabstract

Abstract event container class. More...

#include <GEvents.hpp>

Inheritance diagram for GEvents:
GBase GEventCube GEventList GCOMEventCube GCTAEventCube GLATEventCube GMWLSpectrum GSPIEventCube GCOMEventList GCTAEventList GLATEventList

Public Member Functions

 GEvents (void)
 Void constructor. More...
 
 GEvents (const GEvents &events)
 Copy constructor. More...
 
virtual ~GEvents (void)
 Destructor. More...
 
virtual GEventsoperator= (const GEvents &events)
 Assignment operator. More...
 
virtual GEventoperator[] (const int &index)=0
 
virtual const GEventoperator[] (const int &index) const =0
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GEventsclone (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 &gti)
 Set Good Time Intervals. More...
 
const GEboundsebounds (void) const
 Return energy boundaries. More...
 
const GGtigti (void) const
 Return Good Time Intervals. More...
 
const GTimetstart (void) const
 Return start time. More...
 
const GTimetstop (void) const
 Return stop time. More...
 
const GEnergyemin (void) const
 Return minimum energy. More...
 
const GEnergyemax (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

GEvents::GEvents ( void  )

Void constructor.

Definition at line 51 of file GEvents.cpp.

References init_members().

GEvents::GEvents ( const GEvents events)

Copy constructor.

Parameters
[in]eventsEvent container.

Definition at line 66 of file GEvents.cpp.

References copy_members(), and init_members().

GEvents::~GEvents ( void  )
virtual

Destructor.

Definition at line 82 of file GEvents.cpp.

References free_members().

Member Function Documentation

virtual std::string GEvents::classname ( void  ) const
pure virtual

Return class name.

Returns
String containing the 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.

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

virtual GEvents* GEvents::clone ( void  ) const
pure virtual

Clones object.

Returns
Pointer to deep copy of 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().

void GEvents::copy_members ( const GEvents events)
protected

Copy class members.

Parameters
[in]eventsEvent container.

Definition at line 192 of file GEvents.cpp.

References m_ebounds, and m_gti.

Referenced by GEvents(), and operator=().

virtual void GEvents::load ( const GFilename filename)
pure virtual
virtual int GEvents::number ( void  ) const
pure virtual
GEvents & GEvents::operator= ( const GEvents events)
virtual

Assignment operator.

Parameters
[in]eventsEvent container.
Returns
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=().

virtual GEvent* GEvents::operator[] ( const int &  index)
pure virtual
virtual const GEvent* GEvents::operator[] ( const int &  index) const
pure virtual
virtual std::string GEvents::print ( const GChatter chatter = NORMAL) const
pure virtual

Print content of object.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing the content of the object.

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

virtual void GEvents::read ( const GFits file)
pure virtual
virtual void GEvents::save ( const GFilename filename,
const bool &  clobber = false 
) const
pure virtual
virtual void GEvents::set_energies ( void  )
protectedpure virtual
virtual void GEvents::set_times ( void  )
protectedpure virtual
virtual void GEvents::write ( GFits file) const
pure virtual

Member Data Documentation


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