|
GammaLib 2.2.0.dev
|
COSI event atom class. More...
#include <GCOSEventAtom.hpp>
Public Member Functions | |
| GCOSEventAtom (void) | |
| Void constructor. | |
| GCOSEventAtom (const GCOSEventAtom &atom) | |
| Copy constructor. | |
| GCOSEventAtom (const GCOSInstDir &dir, const GEnergy &energy, const GTime &time) | |
| Event constructor. | |
| virtual | ~GCOSEventAtom (void) |
| Destructor. | |
| GCOSEventAtom & | operator= (const GCOSEventAtom &atom) |
| Assignment operator. | |
| void | clear (void) |
| Clear event atom. | |
| GCOSEventAtom * | clone (void) const |
| Clone event atom. | |
| std::string | classname (void) const |
| Return class name. | |
| const GCOSInstDir & | dir (void) const |
| Return event instrument direction. | |
| const GEnergy & | energy (void) const |
| Return event energy. | |
| const GTime & | time (void) const |
| Return event time. | |
| std::string | print (const GChatter &chatter=NORMAL) const |
| Print event information. | |
| void | dir (const GCOSInstDir &dir) |
| Set event instrument direction. | |
| void | energy (const GEnergy &energy) |
| Set event energy. | |
| void | time (const GTime &time) |
| Set event time. | |
Public Member Functions inherited from GEventAtom | |
| GEventAtom (void) | |
| Void constructor. | |
| GEventAtom (const GEventAtom &atom) | |
| Copy constructor. | |
| virtual | ~GEventAtom (void) |
| Destructor. | |
| virtual GEventAtom & | operator= (const GEventAtom &atom) |
| Assignment operator. | |
| virtual double | size (void) const |
| Return size of an event atom. | |
| virtual double | counts (void) const |
| Return number of counts in event atom. | |
| virtual double | error (void) const |
| Return error in number of counts in event atom. | |
| bool | is_atom (void) const |
| Signal if event is an atom. | |
| bool | is_bin (void) const |
| Signal if event is a bin. | |
Public Member Functions inherited from GEvent | |
| GEvent (void) | |
| Void constructor. | |
| GEvent (const GEvent &event) | |
| Copy constructor. | |
| virtual | ~GEvent (void) |
| Destructor. | |
| virtual GEvent & | operator= (const GEvent &event) |
| Assignment operator. | |
Public Member Functions inherited from GBase | |
| virtual | ~GBase (void) |
| Destructor. | |
Protected Member Functions | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GCOSEventAtom &atom) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Member Functions inherited from GEventAtom | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GEventAtom &atom) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Member Functions inherited from GEvent | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GEvent &event) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Attributes | |
| GCOSInstDir | m_dir |
| Event direction. | |
| GEnergy | m_energy |
| Event energy. | |
| GTime | m_time |
| Event time. | |
Friends | |
| bool | operator< (const GCOSEventAtom &a, const GCOSEventAtom &b) |
| Check if time of one event atom is smaller than time of another event atom. | |
COSI event atom class.
Definition at line 47 of file GCOSEventAtom.hpp.
| GCOSEventAtom::GCOSEventAtom | ( | void | ) |
Void constructor.
Creates an empty COSI event atom.
Definition at line 54 of file GCOSEventAtom.cpp.
References init_members().
Referenced by clone().
| GCOSEventAtom::GCOSEventAtom | ( | const GCOSEventAtom & | atom | ) |
Copy constructor.
| [in] | atom | COSI event atom. |
Definition at line 69 of file GCOSEventAtom.cpp.
References copy_members(), and init_members().
| GCOSEventAtom::GCOSEventAtom | ( | const GCOSInstDir & | dir, |
| const GEnergy & | energy, | ||
| const GTime & | time ) |
Event constructor.
| [in] | dir | COSI instrument direction. |
| [in] | energy | Event energy. |
| [in] | time | Event trigger time. |
Constructs a COSI event from the instrument direction, event energy and event trigger time.
Definition at line 92 of file GCOSEventAtom.cpp.
References dir(), energy(), init_members(), and time().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GEventAtom.
Definition at line 95 of file GCOSEventAtom.hpp.
|
virtual |
Clear event atom.
Clears COSI event atom by resetting all class members to an initial state. Any information that was present before will be lost.
Implements GEventAtom.
Definition at line 170 of file GCOSEventAtom.cpp.
References free_members(), GEvent::free_members(), GEventAtom::free_members(), init_members(), GEvent::init_members(), and GEventAtom::init_members().
|
virtual |
Clone event atom.
Implements GEventAtom.
Definition at line 192 of file GCOSEventAtom.cpp.
References GCOSEventAtom().
|
protected |
Copy class members.
| [in] | atom | COSI event atom. |
Definition at line 250 of file GCOSEventAtom.cpp.
References m_dir, m_energy, and m_time.
Referenced by GCOSEventAtom(), and operator=().
|
inline |
Set event instrument direction.
| [in] | dir | Event instrument direction. |
Sets the event instrument direction.
Definition at line 125 of file GCOSEventAtom.hpp.
|
inlinevirtual |
Return event instrument direction.
Returns the instrument direction of the event. The instrument direction is the event location in the three-dimensional COSI data space, spanned by the scattering angles Chi and Psi and the Compton scatter angle Phi.
Implements GEventAtom.
Definition at line 111 of file GCOSEventAtom.hpp.
References m_dir.
Referenced by dir(), and GCOSEventAtom().
|
inline |
Set event energy.
| [in] | energy | Event energy. |
Sets the event energy.
Definition at line 154 of file GCOSEventAtom.hpp.
|
inlinevirtual |
Return event energy.
Returns the measured energy of the photon on the sky.
Implements GEventAtom.
Definition at line 140 of file GCOSEventAtom.hpp.
References m_energy.
Referenced by energy(), and GCOSEventAtom().
|
protected |
Delete class members.
Definition at line 265 of file GCOSEventAtom.cpp.
Referenced by clear(), operator=(), and ~GCOSEventAtom().
|
protected |
Initialise class members.
Definition at line 233 of file GCOSEventAtom.cpp.
References GCOSInstDir::clear(), GEnergy::clear(), GTime::clear(), m_dir, m_energy, and m_time.
Referenced by clear(), GCOSEventAtom(), GCOSEventAtom(), GCOSEventAtom(), and operator=().
| GCOSEventAtom & GCOSEventAtom::operator= | ( | const GCOSEventAtom & | atom | ) |
Assignment operator.
| [in] | atom | COSI event atom. |
Definition at line 134 of file GCOSEventAtom.cpp.
References copy_members(), free_members(), init_members(), and GEventAtom::operator=().
Print event information.
| [in] | chatter | Chattiness. |
Implements GEventAtom.
Definition at line 204 of file GCOSEventAtom.cpp.
References m_dir, m_energy, m_time, GCOSInstDir::print(), GEnergy::print(), GTime::print(), gammalib::reduce(), and SILENT.
|
inline |
Set event time.
| [in] | time | Event time. |
Sets the event time.
Definition at line 183 of file GCOSEventAtom.hpp.
|
inlinevirtual |
Return event time.
Returns the event triggering time.
Implements GEventAtom.
Definition at line 169 of file GCOSEventAtom.hpp.
References m_time.
Referenced by GCOSEventAtom(), and time().
|
friend |
Check if time of one event atom is smaller than time of another event atom.
| [in] | a | First event atom. |
| [in] | b | Second event atom. |
a is smaller than time of b. Definition at line 199 of file GCOSEventAtom.hpp.
|
protected |
Event direction.
Definition at line 83 of file GCOSEventAtom.hpp.
Referenced by copy_members(), dir(), dir(), init_members(), and print().
|
protected |
Event energy.
Definition at line 84 of file GCOSEventAtom.hpp.
Referenced by copy_members(), energy(), energy(), init_members(), and print().
|
protected |
Event time.
Definition at line 85 of file GCOSEventAtom.hpp.
Referenced by copy_members(), init_members(), print(), time(), and time().