GammaLib
2.0.0
|
CTA event list class. More...
#include <GCTAEventList.hpp>
Public Member Functions | |
GCTAEventList (void) | |
Void constructor. More... | |
GCTAEventList (const GFilename &filename) | |
File name constructor. More... | |
GCTAEventList (const GCTAEventList &list) | |
Copy constructor. More... | |
virtual | ~GCTAEventList (void) |
Destructor. More... | |
virtual GCTAEventList & | operator= (const GCTAEventList &list) |
Assignment operator. More... | |
virtual GCTAEventAtom * | operator[] (const int &index) |
Event atom access operator. More... | |
virtual const GCTAEventAtom * | operator[] (const int &index) const |
Event atom access operator. More... | |
virtual void | clear (void) |
Clear event list. More... | |
virtual GCTAEventList * | clone (void) const |
Clone event list. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual int | size (void) const |
Return number of events in list. More... | |
virtual void | load (const GFilename &filename) |
Load events from FITS file. More... | |
virtual void | save (const GFilename &filename, const bool &clobber=false) const |
Save events into FITS file. More... | |
virtual void | read (const GFits &fits) |
Read events from FITS file. More... | |
virtual void | write (GFits &fits) const |
Write CTA events and Good Time Intervals into FITS file. More... | |
virtual int | number (void) const |
Return number of events in list. More... | |
virtual void | roi (const GRoi &roi) |
Set ROI. More... | |
virtual const GCTARoi & | roi (void) const |
Return Region of Interest. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print event list information. More... | |
void | append (const GCTAEventAtom &event) |
Append event to event list. More... | |
void | append_column (const GFitsTableCol &column) |
Append FITS table column to event list. More... | |
void | reserve (const int &number) |
Reserves space for events. More... | |
void | remove (const int &index, const int &number=1) |
Remove events from event list. More... | |
void | write (GFits &fits, const std::string &evtname, const std::string >iname) const |
Write CTA events and Good Time Intervals into FITS file. More... | |
void | fetch (void) const |
Fetch events. More... | |
void | dispose (void) const |
Dispose events. More... | |
const GPhases & | phases (void) const |
Return phase intervals. More... | |
void | phases (const GPhases &phases) |
Set phase intervals. More... | |
const std::string & | gtiname (void) const |
Return Good Time Interval extension name. More... | |
void | has_phase (const bool &has_phase) |
Set phase information flag. More... | |
void | has_detxy (const bool &has_detxy) |
Set the DETX/DETY information flag. More... | |
void | has_mc_id (const bool &has_mc_id) |
Set the Monte Carlo identifier flag. More... | |
const bool & | has_phase () const |
const bool & | has_detxy () const |
const bool & | has_mc_id () const |
void | set_mc_id_names (const std::vector< int > &ids, const std::vector< std::string > &names) |
Set Monte Carlo identifiers and model names. More... | |
Public Member Functions inherited from GEventList | |
GEventList (void) | |
Void constructor. More... | |
GEventList (const GEventList &list) | |
Copy constructor. More... | |
virtual | ~GEventList (void) |
Destructor. More... | |
virtual GEventList & | operator= (const GEventList &list) |
Assignment operator. More... | |
Public Member Functions inherited from GEvents | |
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... | |
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 GCTAEventList &list) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
virtual void | set_energies (void) |
virtual void | set_times (void) |
void | read_events (const GFitsTable &table) const |
Read CTA events from FITS table. More... | |
void | read_mc_ids (const GFitsTable &table) |
Read Monte Carlo identifier keywords from FITS HDU. More... | |
void | write_events (GFitsBinTable &table) const |
Write CTA events into FITS table. More... | |
void | write_ds_keys (GFitsHDU &hdu, const std::string >iname=gammalib::extname_gti) const |
Write data sub-space keywords into FITS HDU. More... | |
void | write_mc_ids (GFitsHDU &hdu) const |
Write Monte Carlo identifier keywords into FITS HDU. More... | |
Protected Member Functions inherited from GEventList | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GEventList &list) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Member Functions inherited from GEvents | |
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... | |
Protected Attributes | |
GCTARoi | m_roi |
Region of interest. More... | |
GCTAPointing | m_pnt |
Pointing direction for DETX/Y conversion. More... | |
GPhases | m_phases |
Phase intervals. More... | |
int | m_num_events |
Number of events. More... | |
std::string | m_gti_extname |
GTI extension name. More... | |
bool | m_has_phase |
Signal presence of phase. More... | |
bool | m_has_detxy |
Signal presence of detector coordinates. More... | |
bool | m_has_mc_id |
Signal presence of MC identifier. More... | |
std::vector< int > | m_mc_ids |
List of Monte Carlo IDs. More... | |
std::vector< std::string > | m_mc_id_names |
List of model names. More... | |
std::vector< GCTAEventAtom > | m_events |
Events. More... | |
std::vector< GFitsTableCol * > | m_columns |
Pointers to optional columns. More... | |
GFilename | m_filename |
Event list file name. More... | |
Protected Attributes inherited from GEvents | |
GEbounds | m_ebounds |
Energy boundaries covered by events. More... | |
GGti | m_gti |
Good time intervals covered by events. More... | |
CTA event list class.
This class implements an event list for CTA.
Definition at line 60 of file GCTAEventList.hpp.
GCTAEventList::GCTAEventList | ( | void | ) |
Void constructor.
Constructs empty event list.
Definition at line 78 of file GCTAEventList.cpp.
References init_members().
Referenced by clone().
|
explicit |
File name constructor.
[in] | filename | Counts cube filename. |
Constructs event list by loading the events from a FITS file.
Definition at line 95 of file GCTAEventList.cpp.
References init_members(), and load().
GCTAEventList::GCTAEventList | ( | const GCTAEventList & | list | ) |
Copy constructor.
[in] | list | Event list. |
Constructs event list by coping from another event list.
Definition at line 115 of file GCTAEventList.cpp.
References copy_members(), and init_members().
|
virtual |
Destructor.
Destructs event list.
Definition at line 133 of file GCTAEventList.cpp.
References free_members().
void GCTAEventList::append | ( | const GCTAEventAtom & | event | ) |
Append event to event list.
[in] | event | Event. |
Appends an event to the end of the event list.
Definition at line 593 of file GCTAEventList.cpp.
References fetch(), m_columns, m_events, and m_num_events.
Referenced by GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), and GCTAModelBackground::mc().
void GCTAEventList::append_column | ( | const GFitsTableCol & | column | ) |
Append FITS table column to event list.
[in] | column | FITS table column to be appended. |
GException::invalid_argument | FITS column has incompatible number of rows. |
Appends a FITS table column to the event list. The length of the FITS column must be identical to the number of events in the event list.
Definition at line 630 of file GCTAEventList.cpp.
References GFitsTableCol::clone(), fetch(), G_APPEND_COLUMN, m_columns, GFitsTableCol::nrows(), size(), and gammalib::str().
|
inlinevirtual |
Return class name.
Implements GEventList.
Definition at line 149 of file GCTAEventList.hpp.
|
virtual |
Clear event list.
Clear event list.
Implements GEventList.
Definition at line 250 of file GCTAEventList.cpp.
References GEventList::free_members(), GEvents::free_members(), free_members(), GEventList::init_members(), GEvents::init_members(), and init_members().
Referenced by read().
|
virtual |
Clone event list.
Returns a pointer to a deep copy of the event list.
Implements GEventList.
Definition at line 274 of file GCTAEventList.cpp.
References GCTAEventList().
|
protected |
Copy class members.
[in] | list | Event list. |
Definition at line 985 of file GCTAEventList.cpp.
References m_columns, m_events, m_filename, GEvents::m_gti, m_gti_extname, m_has_detxy, m_has_mc_id, m_has_phase, m_mc_id_names, m_mc_ids, m_num_events, m_phases, m_pnt, and m_roi.
Referenced by GCTAEventList(), and operator=().
void GCTAEventList::dispose | ( | void | ) | const |
Dispose events.
Disposes the events to save memory. The method free's all memory associated to the events. The method should be used with care as it does not check whether the events can actually be recovered using the fetch() method. Eventually, the events should be saved before so that fetch() can recover them.
Definition at line 796 of file GCTAEventList.cpp.
References m_columns, and m_events.
Referenced by GCTAObservation::dispose_events(), and read_events().
void GCTAEventList::fetch | ( | void | ) | const |
Fetch events.
GException::file_error | File not found. Unable to load events. |
GException::invalid_value | No file name has been specified. Fetched number of events mismatches the expectation. |
Fetches the events by reading them from a FITS file. This method does nothing if the events are already loaded, if there is nothing to fetch, or if the m_filename member is empty.
The method is thread save. The method furthermore checks whether the loaded number of events corresponds to the expectation. If also checks whether the file from which events should be loaded actually exists.
Definition at line 715 of file GCTAEventList.cpp.
References GFits::close(), GFilename::extname(), gammalib::extname_cta_events, GFits::filename(), G_FETCH, GFilename::is_empty(), m_events, m_filename, read_events(), size(), gammalib::str(), and GFits::table().
Referenced by append(), append_column(), operator[](), remove(), and write_events().
|
protected |
Delete class members.
Definition at line 1018 of file GCTAEventList.cpp.
References m_columns.
Referenced by clear(), operator=(), and ~GCTAEventList().
|
inline |
Return Good Time Interval extension name.
Definition at line 237 of file GCTAEventList.hpp.
References m_gti_extname.
Referenced by write(), and write_ds_keys().
|
inline |
Set the DETX/DETY information flag.
[in] | has_detxy | DETX/DETY information flag. |
Set the DETX/DETY information flag.
Definition at line 266 of file GCTAEventList.hpp.
References has_detxy(), and m_has_detxy.
|
inline |
Definition at line 306 of file GCTAEventList.hpp.
References m_has_detxy.
Referenced by has_detxy().
|
inline |
Set the Monte Carlo identifier flag.
[in] | has_mc_id | Monte Carlo identifier flag. |
Set the Monte Carlo identifier flag.
Definition at line 281 of file GCTAEventList.hpp.
References has_mc_id(), and m_has_mc_id.
|
inline |
Definition at line 318 of file GCTAEventList.hpp.
References m_has_mc_id.
Referenced by has_mc_id().
|
inline |
Set phase information flag.
[in] | has_phase | Phase information flag. |
Sets the phase information flag of the event list.
Definition at line 251 of file GCTAEventList.hpp.
References has_phase(), and m_has_phase.
|
inline |
Definition at line 294 of file GCTAEventList.hpp.
References m_has_phase.
Referenced by has_phase().
|
protected |
Initialise class members.
< Default GTI extension name
Definition at line 955 of file GCTAEventList.cpp.
References GPhases::clear(), GCTARoi::clear(), GCTAPointing::clear(), GFilename::clear(), gammalib::extname_gti, G_CTA_MJDREF, m_columns, m_events, m_filename, GEvents::m_gti, m_gti_extname, m_has_detxy, m_has_mc_id, m_has_phase, m_mc_id_names, m_mc_ids, m_num_events, m_phases, m_pnt, m_roi, and GGti::reference().
Referenced by clear(), GCTAEventList(), and operator=().
|
virtual |
Load events from FITS file.
[in] | filename | FITS file name. |
Loads the event list from a FITS file. See the read() method for details.
Implements GEventList.
Definition at line 288 of file GCTAEventList.cpp.
References GFits::close(), and read().
Referenced by GCTAEventList().
|
inlinevirtual |
Return number of events in list.
Implements GEventList.
Definition at line 173 of file GCTAEventList.hpp.
References m_num_events.
Referenced by remove().
|
virtual |
Assignment operator.
[in] | list | Event list. |
Assigns events from another event list.
Definition at line 157 of file GCTAEventList.cpp.
References copy_members(), free_members(), init_members(), and GEventList::operator=().
|
virtual |
Event atom access operator.
[in] | index | Event index [0,...,size()-1]. |
GException::out_of_range | Event index outside valid range. |
Returns pointer to an event atom.
Implements GEventList.
Definition at line 192 of file GCTAEventList.cpp.
References fetch(), G_OPERATOR, m_events, and size().
|
virtual |
Event atom access operator.
[in] | index | Event index [0,...,size()-1]. |
GException::out_of_range | Event index outside valid range. |
Returns pointer to an event atom.
Implements GEventList.
Definition at line 221 of file GCTAEventList.cpp.
References fetch(), G_OPERATOR, m_events, and size().
|
inline |
Return phase intervals.
Definition at line 197 of file GCTAEventList.hpp.
References m_phases.
Referenced by phases().
|
inline |
Set phase intervals.
[in] | phases | Phase intervals. |
Definition at line 209 of file GCTAEventList.hpp.
Print event list information.
[in] | chatter | Chattiness. |
Implements GEventList.
Definition at line 858 of file GCTAEventList.cpp.
References gammalib::centre(), GEvents::ebounds(), GEvents::emax(), GEvents::emin(), GEvents::gti(), GFilename::is_empty(), m_events, m_filename, gammalib::parformat(), gammalib::reduce(), roi(), SILENT, size(), gammalib::str(), GEvents::tstart(), and GEvents::tstop().
|
virtual |
Read events from FITS file.
[in] | fits | FITS file. |
Reads the event list from a FITS file.
The events will be read by default from the extension EVENTS
unless an extension name is explicitly specified in the FITS file name. The FITS header of the extension will be scanned for data sub-space keywords to extract the energy boundaries, the region of interest, as well as the extension name for the Good Time Intervals. If no extension name for Good Time Intervals is found it is expected that the Good Time Intervals reside in the GTI
extension.
If a Good Time Intervals is found in the same FITS file, the Good Time Intervals will be loaded. Otherwise, a single Good Time Interval will be assumed based on the TSTART
and TSTOP
keywords found in the header of the event list.
The method clears the event list before reading, thus any events that existed before in the event list will be lost. Note that the method will actually not read the events but only the event metadata. The events are only read from the FITS file when they are actually need. This reduces the memory requirements. Events can be manually loaded into memory using the fetch() method. Events can be unloaded using the dispose() method, but the user has to take care of saving the events to disk in case he wants to keep them for further use.
Implements GEventList.
Definition at line 359 of file GCTAEventList.cpp.
References GGti::append(), clear(), GFitsTable::contains(), GFits::contains(), GCTAPointing::dir(), GFilename::extname(), gammalib::extname_cta_events, gammalib::extname_gti, GFits::filename(), GEvents::gti(), GFilename::has_expression(), GFilename::is_empty(), GEvents::m_ebounds, m_filename, GEvents::m_gti, m_gti_extname, m_has_detxy, m_has_mc_id, m_has_phase, m_num_events, m_phases, m_pnt, m_roi, GFitsTable::nrows(), GSkyDir::radec_deg(), GGti::read(), gammalib::read_ds_ebounds(), gammalib::read_ds_gti_extname(), gammalib::read_ds_phase(), gammalib::read_ds_roi(), read_events(), read_mc_ids(), GFitsHDU::real(), GGti::reference(), GFits::table(), GEvents::tstart(), and GEvents::tstop().
Referenced by load(), and GCTAObservation::read().
|
protected |
Read CTA events from FITS table.
[in] | table | FITS table. |
This method reads the CTA event list from a FITS table into memory. The following columns are mandatory in the FITS table:
- EVENT_ID - TIME - RA - DEC - ENERGY
Optionally, the
- DETX - DETY - PHASE
columns are read. Any other columns present in the FITS table will also be read, and written into the FITS table when the write_events() method is called.
Definition at line 1055 of file GCTAEventList.cpp.
References GFitsTableCol::clone(), gammalib::deg2rad, GCTAInstDir::detx(), GCTAInstDir::dety(), GCTAInstDir::dir(), dispose(), GCTAPointing::instdir(), GFitsTableCol::integer(), m_columns, GCTAEventAtom::m_dir, GCTAInstDir::m_dir, m_events, GEvents::m_gti, m_has_detxy, m_has_mc_id, m_has_phase, m_pnt, GFitsTableCol::name(), GFitsTable::ncols(), GFitsTable::nrows(), GSkyDir::radec_deg(), GFitsTableCol::real(), and GGti::reference().
|
protected |
Read Monte Carlo identifier keywords from FITS HDU.
[in] | table | FITS table HDU. |
Reads the Monte Carlo identifier keywords for an event list from the FITS table HDU.
Definition at line 1173 of file GCTAEventList.cpp.
References GFitsHDU::has_card(), GFitsHDU::integer(), m_mc_id_names, m_mc_ids, and GFitsHDU::string().
Referenced by read().
void GCTAEventList::remove | ( | const int & | index, |
const int & | number = 1 |
||
) |
Remove events from event list.
[in] | index | Index from which on events should be removed. |
[in] | number | Number of event to remove (default: 1). |
Removes events from the event list. This method does nothing if index
points beyond the event list. The method does also gently accept number
arguments where index
+ number
reach beyond the event list. In that case, all events from event index
on will be removed.
Definition at line 667 of file GCTAEventList.cpp.
References fetch(), m_columns, m_events, m_num_events, number(), and size().
|
inline |
Reserves space for events.
[in] | number | Number of events. |
Reserves space for number events in the event list.
Definition at line 224 of file GCTAEventList.hpp.
References m_events.
Referenced by GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), and GCTAModelBackground::mc().
|
virtual |
Set ROI.
[in] | roi | ROI. |
GException::invalid_argument | Invalid region of interest class specified. |
Sets the region of interest of the event list.
Implements GEventList.
Definition at line 564 of file GCTAEventList.cpp.
References G_ROI, m_roi, and roi().
Referenced by GCTAModelAeffBackground::aeff_integral(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelBackground::mc(), GCTAResponseIrf::nirf(), GCTAModelIrfBackground::npred(), GCTAModelRadialAcceptance::npred(), GCTAModelSpatial::npred(), GCTAResponseIrf::nroi_diffuse(), GCTAResponseIrf::nroi_elliptical(), GCTAResponseIrf::nroi_radial(), GCTAObservation::read(), GCTAObservation::roi(), and GCTAObservation::write().
|
inlinevirtual |
Return Region of Interest.
Implements GEventList.
Definition at line 185 of file GCTAEventList.hpp.
References m_roi.
Referenced by print(), roi(), and write_ds_keys().
|
virtual |
Save events into FITS file.
[in] | filename | FITS file name. |
[in] | clobber | Overwrite existing FITS file (default: false). |
Saves the event list into a FITS file. See the write() method for details.
Implements GEventList.
Definition at line 312 of file GCTAEventList.cpp.
References GFilename::url(), and write().
|
inlineprotectedvirtual |
Implements GEventList.
Definition at line 115 of file GCTAEventList.hpp.
void GCTAEventList::set_mc_id_names | ( | const std::vector< int > & | ids, |
const std::vector< std::string > & | names | ||
) |
Set Monte Carlo identifiers and model names.
[in] | ids | Monte Carlo identifiers. |
[in] | names | Model name for each Monte Carlo identifier. |
Sets the Monte Carlo identifiers and their corresponding model names. The information will then be written into the header file.
Definition at line 828 of file GCTAEventList.cpp.
References G_SET_MC_ID_NAMES, m_mc_id_names, m_mc_ids, and gammalib::str().
|
inlineprotectedvirtual |
Implements GEventList.
Definition at line 116 of file GCTAEventList.hpp.
|
inlinevirtual |
Return number of events in list.
Implements GEventList.
Definition at line 161 of file GCTAEventList.hpp.
References m_num_events.
Referenced by append_column(), fetch(), GCTAModelSpatialLookup::fill_buffer(), operator[](), print(), remove(), GCTAOnOffObservation::set(), and write_events().
|
virtual |
Write CTA events and Good Time Intervals into FITS file.
[in] | fits | FITS file. |
Writes the CTA event list and the Good Time intervals into a FITS file.
The events will be written by default into the extension EVENTS
unless an extension name is explicitly specified in the FITS file name. The method also writes the data sub-space keywords in the FITS header of the events table.
In addition, the method will also append a table containing the Good Time Intervals of the events to the FITS file. The extension name for the Good Time Intervals is either taken from the m_gti_extname member, or if empty, is set to GTI
.
Implements GEventList.
Definition at line 487 of file GCTAEventList.cpp.
References GFilename::extname(), gammalib::extname_cta_events, gammalib::extname_gti, GFits::filename(), gtiname(), and m_gti_extname.
Referenced by save(), and GCTAObservation::write().
void GCTAEventList::write | ( | GFits & | fits, |
const std::string & | evtname, | ||
const std::string & | gtiname | ||
) | const |
Write CTA events and Good Time Intervals into FITS file.
[in] | fits | FITS file. |
[in] | evtname | Event FITS extension name. |
[in] | gtiname | Good Time Intervals FITS extension name. |
Writes the CTA event list and the Good Time intervals into a FITS file.
The events will be written into the extension evtname
while the Good Time Intervals will be written into the extension gtiname
.
Definition at line 516 of file GCTAEventList.cpp.
References GFits::append(), GFitsHDU::card(), GSkyDir::dec_deg(), GCTAPointing::dir(), GFitsHDU::extname(), GFits::filename(), GEvents::gti(), m_filename, m_pnt, GSkyDir::ra_deg(), GGti::write(), write_ds_keys(), write_events(), and write_mc_ids().
|
protected |
Write data sub-space keywords into FITS HDU.
[in] | hdu | FITS HDU. |
[in] | gtiname | Good Time Interval FITS extension. |
GException::vector_mismatch | Lower and upper phase boundaries have different size. |
Writes the data sub-space keywords for an event list into the FITS HDU. The following keywords will be written:
DSTYP1 = "TIME" / Data sub-space type DSUNI1 = "s" / Data sub-space unit DSVAL1 = "TABLE" / Data sub-space value DSREF1 = ":[extname]" / Data sub-space reference DSTYP2 = "ENERGY" / Data sub-space type DSUNI2 = "TeV" / Data sub-space unit DSVAL2 = "[emin]:[emax]" / Data sub-space value DSTYP3 = "POS(RA,DEC)" / Data sub-space type DSUNI3 = "deg" / Data sub-space unit DSVAL3 = "CIRCLE([ra],[dec],[rad])" / Data sub-space value NDSKEYS = 3 / Number of data sub-space keys
where
[extname] is the GTI extension name @p gtiname [emin] is the minimum event energy in TeV [emax] is the maximum event energy in TeV [ra] is the Right Ascension of the Region of Interest centre in degrees [dec] is the Declination of the Region of Interest centre in degrees [rad] is the radius of the Region of Interest in degrees
Definition at line 1386 of file GCTAEventList.cpp.
References GFitsHDU::card(), GCTARoi::centre(), GCTAInstDir::dir(), GEvents::emax(), GEvents::emin(), gtiname(), GCTAInstDir::has_dir(), GCTARoi::is_valid(), m_phases, GPhases::pmax(), GPhases::pmin(), GCTARoi::radius(), roi(), GPhases::size(), gammalib::str(), and GEnergy::TeV().
Referenced by write().
|
protected |
Write CTA events into FITS table.
[in] | hdu | FITS binary table. |
Write the CTA event list into a FITS binary table.
The following mandatory columns will be written into the FITS table:
- EVENT_ID - TIME - RA - DEC - ENERGY
If available, also the
- DETX - DETY - PHASE
columns are written. Any other columns that were read by the read_events() method will be also written into the table.
Definition at line 1244 of file GCTAEventList.cpp.
References GFitsTable::append(), GFitsHDU::extname(), gammalib::extname_cta_events, fetch(), m_columns, m_events, GEvents::m_gti, m_has_detxy, m_has_mc_id, m_has_phase, gammalib::rad2deg, GGti::reference(), size(), and GFitsTableCol::unit().
Referenced by write().
|
protected |
Write Monte Carlo identifier keywords into FITS HDU.
[in] | hdu | FITS HDU. |
Writes the Monte Carlo identifier keywords for an event list into the FITS HDU. The following keywords will be written:
NMCIDS Number of Monte Carlo identifiers MID00001 First Monte Carlo identifier MMN00001 Model name for first Monte Carlo identifier MID00002 Second Monte Carlo identifier MMN00002 Model name for second Monte Carlo identifier ...
Definition at line 1488 of file GCTAEventList.cpp.
References GFitsHDU::card(), m_mc_id_names, m_mc_ids, and gammalib::str().
Referenced by write().
|
mutableprotected |
Pointers to optional columns.
Definition at line 138 of file GCTAEventList.hpp.
Referenced by append(), append_column(), copy_members(), dispose(), free_members(), init_members(), read_events(), remove(), and write_events().
|
mutableprotected |
Events.
Definition at line 137 of file GCTAEventList.hpp.
Referenced by append(), copy_members(), dispose(), fetch(), init_members(), operator[](), print(), read_events(), remove(), reserve(), and write_events().
|
mutableprotected |
Event list file name.
Definition at line 139 of file GCTAEventList.hpp.
Referenced by copy_members(), fetch(), init_members(), print(), read(), and write().
|
protected |
GTI extension name.
Definition at line 129 of file GCTAEventList.hpp.
Referenced by copy_members(), gtiname(), init_members(), read(), and write().
|
protected |
Signal presence of detector coordinates.
Definition at line 131 of file GCTAEventList.hpp.
Referenced by copy_members(), has_detxy(), init_members(), read(), read_events(), and write_events().
|
protected |
Signal presence of MC identifier.
Definition at line 132 of file GCTAEventList.hpp.
Referenced by copy_members(), has_mc_id(), init_members(), read(), read_events(), and write_events().
|
protected |
Signal presence of phase.
Definition at line 130 of file GCTAEventList.hpp.
Referenced by copy_members(), has_phase(), init_members(), read(), read_events(), and write_events().
|
protected |
List of model names.
Definition at line 134 of file GCTAEventList.hpp.
Referenced by copy_members(), init_members(), read_mc_ids(), set_mc_id_names(), and write_mc_ids().
|
protected |
List of Monte Carlo IDs.
Definition at line 133 of file GCTAEventList.hpp.
Referenced by copy_members(), init_members(), read_mc_ids(), set_mc_id_names(), and write_mc_ids().
|
protected |
Number of events.
Definition at line 128 of file GCTAEventList.hpp.
Referenced by append(), copy_members(), init_members(), number(), read(), remove(), and size().
|
protected |
Phase intervals.
Definition at line 127 of file GCTAEventList.hpp.
Referenced by copy_members(), init_members(), phases(), read(), and write_ds_keys().
|
protected |
Pointing direction for DETX/Y conversion.
Definition at line 126 of file GCTAEventList.hpp.
Referenced by copy_members(), init_members(), read(), read_events(), and write().
|
protected |
Region of interest.
Definition at line 125 of file GCTAEventList.hpp.
Referenced by copy_members(), init_members(), read(), and roi().