GammaLib
2.1.0.dev
|
Abstract interface for the event atom class. More...
#include <GEventAtom.hpp>
Public Member Functions | |
GEventAtom (void) | |
Void constructor. More... | |
GEventAtom (const GEventAtom &atom) | |
Copy constructor. More... | |
virtual | ~GEventAtom (void) |
Destructor. More... | |
virtual GEventAtom & | operator= (const GEventAtom &atom) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GEvent * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual double | size (void) const |
Return size of an event atom. More... | |
virtual const GInstDir & | dir (void) const =0 |
virtual const GEnergy & | energy (void) const =0 |
virtual const GTime & | time (void) const =0 |
virtual double | counts (void) const |
Return number of counts in event atom. More... | |
virtual double | error (void) const |
Return error in number of counts in event atom. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
bool | is_atom (void) const |
Signal if event is an atom. More... | |
bool | is_bin (void) const |
Signal if event is a bin. More... | |
Public Member Functions inherited from GEvent | |
GEvent (void) | |
Void constructor. More... | |
GEvent (const GEvent &event) | |
Copy constructor. More... | |
virtual | ~GEvent (void) |
Destructor. More... | |
virtual GEvent & | operator= (const GEvent &event) |
Assignment operator. 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 GEventAtom &atom) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Member Functions inherited from GEvent | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GEvent &event) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Friends | |
class | GEvents |
Abstract interface for the event atom class.
An event atom is a single event occurring in an instrument. Event atoms are used for unbinned analysis.
Each event has 3 attributes: energy, instrument direction and time. These attributes can be accessed and changed through the energy(), dir(), and time() methods.
The counts() and error() methods return the number of counts and the error in this number for each event. For event atoms the number of counts is 1 and the error is 0.
The size() method returns the size of an event bin ,which is the quantity that has to be multiplied by the probability for an event to occur to predict the number of events in a bin. For event atoms this quantity is by definition 1.
The GEventAtom class does not hold any data members. Data members are stored in the derived classes.
Definition at line 62 of file GEventAtom.hpp.
GEventAtom::GEventAtom | ( | void | ) |
GEventAtom::GEventAtom | ( | const GEventAtom & | atom | ) |
Copy constructor.
[in] | atom | Event atom. |
Definition at line 66 of file GEventAtom.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 GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
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 GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
protected |
Copy class members.
[in] | atom | Event atom. |
Definition at line 155 of file GEventAtom.cpp.
Referenced by GEventAtom(), and operator=().
|
inlinevirtual |
Return number of counts in event atom.
Implements GEvent.
Definition at line 123 of file GEventAtom.hpp.
|
pure virtual |
Implements GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
pure virtual |
Implements GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
inlinevirtual |
Return error in number of counts in event atom.
Implements GEvent.
Definition at line 135 of file GEventAtom.hpp.
|
protected |
Delete class members.
Definition at line 165 of file GEventAtom.cpp.
Referenced by GCOMEventAtom::clear(), GLATEventAtom::clear(), GCTAEventAtom::clear(), operator=(), and ~GEventAtom().
|
protected |
Initialise class members.
Definition at line 143 of file GEventAtom.cpp.
Referenced by GCOMEventAtom::clear(), GLATEventAtom::clear(), GCTAEventAtom::clear(), GEventAtom(), and operator=().
|
inlinevirtual |
Signal if event is an atom.
Implements GEvent.
Definition at line 147 of file GEventAtom.hpp.
|
inlinevirtual |
Signal if event is a bin.
Implements GEvent.
Definition at line 159 of file GEventAtom.hpp.
|
virtual |
Assignment operator.
[in] | atom | Event atom. |
Definition at line 104 of file GEventAtom.cpp.
References copy_members(), free_members(), init_members(), and GEvent::operator=().
Referenced by GCOMEventAtom::operator=(), GLATEventAtom::operator=(), and GCTAEventAtom::operator=().
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 GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
inlinevirtual |
Return size of an event atom.
Returns the size of an event atom. The size is only useful for event bins, for which it is defined as the quantity that needs to be multiplied by the event probability to give the predicted number of events in a bin. For event atoms, the size is fixed to 1.0.
Implements GEvent.
Definition at line 111 of file GEventAtom.hpp.
|
pure virtual |
Implements GEvent.
Implemented in GCTAEventAtom, GLATEventAtom, and GCOMEventAtom.
|
friend |
Definition at line 65 of file GEventAtom.hpp.