Commit 9617fcc0b370c1a617bf14afef64a2fe79708867
1 parent
bcba39d8
use new FITS table column classes
Showing
3 changed files
with
56 additions
and
56 deletions
inst/cta/src/GCTAEventList.cpp
| ... | ... | @@ -26,11 +26,11 @@ |
| 26 | 26 | #include "GCTAObservation.hpp" |
| 27 | 27 | #include "GCTAResponse.hpp" |
| 28 | 28 | #include "GFitsTableBitCol.hpp" |
| 29 | -#include "GFitsTableFltCol.hpp" | |
| 30 | -#include "GFitsTableDblCol.hpp" | |
| 31 | -#include "GFitsTableLngCol.hpp" | |
| 32 | -#include "GFitsTableShtCol.hpp" | |
| 33 | -#include "GFitsTableStrCol.hpp" | |
| 29 | +#include "GFitsTableFloatCol.hpp" | |
| 30 | +#include "GFitsTableDoubleCol.hpp" | |
| 31 | +#include "GFitsTableLongCol.hpp" | |
| 32 | +#include "GFitsTableShortCol.hpp" | |
| 33 | +#include "GFitsTableStringCol.hpp" | |
| 34 | 34 | |
| 35 | 35 | /* __ Method name definitions ____________________________________________ */ |
| 36 | 36 | |
| ... | ... | @@ -331,29 +331,29 @@ void GCTAEventList::load_events(GFitsHDU* hdu) |
| 331 | 331 | m_events = new GCTAEventAtom[m_num]; |
| 332 | 332 | |
| 333 | 333 | // Get column pointers |
| 334 | - GFitsTableLngCol* ptr_eid = (GFitsTableLngCol*)hdu->column("EVENT_ID"); | |
| 335 | - GFitsTableDblCol* ptr_time = (GFitsTableDblCol*)hdu->column("TIME"); | |
| 336 | - GFitsTableShtCol* ptr_multip = (GFitsTableShtCol*)hdu->column("MULTIP"); | |
| 337 | - GFitsTableFltCol* ptr_ra = (GFitsTableFltCol*)hdu->column("RA"); | |
| 338 | - GFitsTableFltCol* ptr_dec = (GFitsTableFltCol*)hdu->column("DEC"); | |
| 339 | - GFitsTableFltCol* ptr_dir_err = (GFitsTableFltCol*)hdu->column("DIR_ERR"); | |
| 340 | - GFitsTableFltCol* ptr_detx = (GFitsTableFltCol*)hdu->column("DETX"); | |
| 341 | - GFitsTableFltCol* ptr_dety = (GFitsTableFltCol*)hdu->column("DETY"); | |
| 342 | - GFitsTableFltCol* ptr_alt_pnt = (GFitsTableFltCol*)hdu->column("ALT_PNT"); | |
| 343 | - GFitsTableFltCol* ptr_az_pnt = (GFitsTableFltCol*)hdu->column("AZ_PNT"); | |
| 344 | - GFitsTableFltCol* ptr_alt = (GFitsTableFltCol*)hdu->column("ALT"); | |
| 345 | - GFitsTableFltCol* ptr_az = (GFitsTableFltCol*)hdu->column("AZ"); | |
| 346 | - GFitsTableFltCol* ptr_corex = (GFitsTableFltCol*)hdu->column("COREX"); | |
| 347 | - GFitsTableFltCol* ptr_corey = (GFitsTableFltCol*)hdu->column("COREY"); | |
| 348 | - GFitsTableFltCol* ptr_core_err = (GFitsTableFltCol*)hdu->column("CORE_ERR"); | |
| 349 | - GFitsTableFltCol* ptr_xmax = (GFitsTableFltCol*)hdu->column("XMAX"); | |
| 350 | - GFitsTableFltCol* ptr_xmax_err = (GFitsTableFltCol*)hdu->column("XMAX_ERR"); | |
| 351 | - GFitsTableDblCol* ptr_energy = (GFitsTableDblCol*)hdu->column("ENERGY"); | |
| 352 | - GFitsTableFltCol* ptr_energy_err = (GFitsTableFltCol*)hdu->column("ENERGY_ERR"); | |
| 353 | - GFitsTableFltCol* ptr_hil_msw = (GFitsTableFltCol*)hdu->column("HIL_MSW"); | |
| 354 | - GFitsTableFltCol* ptr_hil_msw_err = (GFitsTableFltCol*)hdu->column("HIL_MSW_ERR"); | |
| 355 | - GFitsTableFltCol* ptr_hil_msl = (GFitsTableFltCol*)hdu->column("HIL_MSL"); | |
| 356 | - GFitsTableFltCol* ptr_hil_msl_err = (GFitsTableFltCol*)hdu->column("HIL_MSL_ERR"); | |
| 334 | + GFitsTableLongCol* ptr_eid = (GFitsTableLongCol*)hdu->column("EVENT_ID"); | |
| 335 | + GFitsTableDoubleCol* ptr_time = (GFitsTableDoubleCol*)hdu->column("TIME"); | |
| 336 | + GFitsTableShortCol* ptr_multip = (GFitsTableShortCol*)hdu->column("MULTIP"); | |
| 337 | + GFitsTableFloatCol* ptr_ra = (GFitsTableFloatCol*)hdu->column("RA"); | |
| 338 | + GFitsTableFloatCol* ptr_dec = (GFitsTableFloatCol*)hdu->column("DEC"); | |
| 339 | + GFitsTableFloatCol* ptr_dir_err = (GFitsTableFloatCol*)hdu->column("DIR_ERR"); | |
| 340 | + GFitsTableFloatCol* ptr_detx = (GFitsTableFloatCol*)hdu->column("DETX"); | |
| 341 | + GFitsTableFloatCol* ptr_dety = (GFitsTableFloatCol*)hdu->column("DETY"); | |
| 342 | + GFitsTableFloatCol* ptr_alt_pnt = (GFitsTableFloatCol*)hdu->column("ALT_PNT"); | |
| 343 | + GFitsTableFloatCol* ptr_az_pnt = (GFitsTableFloatCol*)hdu->column("AZ_PNT"); | |
| 344 | + GFitsTableFloatCol* ptr_alt = (GFitsTableFloatCol*)hdu->column("ALT"); | |
| 345 | + GFitsTableFloatCol* ptr_az = (GFitsTableFloatCol*)hdu->column("AZ"); | |
| 346 | + GFitsTableFloatCol* ptr_corex = (GFitsTableFloatCol*)hdu->column("COREX"); | |
| 347 | + GFitsTableFloatCol* ptr_corey = (GFitsTableFloatCol*)hdu->column("COREY"); | |
| 348 | + GFitsTableFloatCol* ptr_core_err = (GFitsTableFloatCol*)hdu->column("CORE_ERR"); | |
| 349 | + GFitsTableFloatCol* ptr_xmax = (GFitsTableFloatCol*)hdu->column("XMAX"); | |
| 350 | + GFitsTableFloatCol* ptr_xmax_err = (GFitsTableFloatCol*)hdu->column("XMAX_ERR"); | |
| 351 | + GFitsTableDoubleCol* ptr_energy = (GFitsTableDoubleCol*)hdu->column("ENERGY"); | |
| 352 | + GFitsTableFloatCol* ptr_energy_err = (GFitsTableFloatCol*)hdu->column("ENERGY_ERR"); | |
| 353 | + GFitsTableFloatCol* ptr_hil_msw = (GFitsTableFloatCol*)hdu->column("HIL_MSW"); | |
| 354 | + GFitsTableFloatCol* ptr_hil_msw_err = (GFitsTableFloatCol*)hdu->column("HIL_MSW_ERR"); | |
| 355 | + GFitsTableFloatCol* ptr_hil_msl = (GFitsTableFloatCol*)hdu->column("HIL_MSL"); | |
| 356 | + GFitsTableFloatCol* ptr_hil_msl_err = (GFitsTableFloatCol*)hdu->column("HIL_MSL_ERR"); | |
| 357 | 357 | |
| 358 | 358 | // Copy data from columns into GCTAEventAtom objects |
| 359 | 359 | GCTAEventAtom* ptr = (GCTAEventAtom*)m_events; | ... | ... |
inst/lat/src/GLATEventList.cpp
| ... | ... | @@ -23,11 +23,11 @@ |
| 23 | 23 | #include <iostream> |
| 24 | 24 | #include "GException.hpp" |
| 25 | 25 | #include "GLATEventList.hpp" |
| 26 | -#include "GFitsTableFltCol.hpp" | |
| 27 | -#include "GFitsTableDblCol.hpp" | |
| 28 | -#include "GFitsTableLngCol.hpp" | |
| 29 | -#include "GFitsTableShtCol.hpp" | |
| 30 | -#include "GFitsTableStrCol.hpp" | |
| 26 | +#include "GFitsTableFloatCol.hpp" | |
| 27 | +#include "GFitsTableDoubleCol.hpp" | |
| 28 | +#include "GFitsTableLongCol.hpp" | |
| 29 | +#include "GFitsTableShortCol.hpp" | |
| 30 | +#include "GFitsTableStringCol.hpp" | |
| 31 | 31 | |
| 32 | 32 | /* __ Method name definitions ____________________________________________ */ |
| 33 | 33 | |
| ... | ... | @@ -402,21 +402,21 @@ void GLATEventList::load_events(GFitsHDU* hdu) |
| 402 | 402 | m_events = new GLATEventAtom[m_num]; |
| 403 | 403 | |
| 404 | 404 | // Get column pointers |
| 405 | - GFitsTableDblCol* ptr_time = (GFitsTableDblCol*)hdu->column("TIME"); | |
| 406 | - GFitsTableFltCol* ptr_energy = (GFitsTableFltCol*)hdu->column("ENERGY"); | |
| 407 | - GFitsTableFltCol* ptr_ra = (GFitsTableFltCol*)hdu->column("RA"); | |
| 408 | - GFitsTableFltCol* ptr_dec = (GFitsTableFltCol*)hdu->column("DEC"); | |
| 409 | - GFitsTableFltCol* ptr_theta = (GFitsTableFltCol*)hdu->column("THETA"); | |
| 410 | - GFitsTableFltCol* ptr_phi = (GFitsTableFltCol*)hdu->column("PHI"); | |
| 411 | - GFitsTableFltCol* ptr_zenith = (GFitsTableFltCol*)hdu->column("ZENITH_ANGLE"); | |
| 412 | - GFitsTableFltCol* ptr_azimuth = (GFitsTableFltCol*)hdu->column("EARTH_AZIMUTH_ANGLE"); | |
| 413 | - GFitsTableLngCol* ptr_eid = (GFitsTableLngCol*)hdu->column("EVENT_ID"); | |
| 414 | - GFitsTableLngCol* ptr_rid = (GFitsTableLngCol*)hdu->column("RUN_ID"); | |
| 415 | - GFitsTableShtCol* ptr_recon = (GFitsTableShtCol*)hdu->column("RECON_VERSION"); | |
| 416 | - GFitsTableShtCol* ptr_calib = (GFitsTableShtCol*)hdu->column("CALIB_VERSION"); | |
| 417 | - GFitsTableShtCol* ptr_class = (GFitsTableShtCol*)hdu->column("EVENT_CLASS"); | |
| 418 | - GFitsTableShtCol* ptr_conv = (GFitsTableShtCol*)hdu->column("CONVERSION_TYPE"); | |
| 419 | - GFitsTableDblCol* ptr_ltime = (GFitsTableDblCol*)hdu->column("LIVETIME"); | |
| 405 | + GFitsTableDoubleCol* ptr_time = (GFitsTableDoubleCol*)hdu->column("TIME"); | |
| 406 | + GFitsTableFloatCol* ptr_energy = (GFitsTableFloatCol*)hdu->column("ENERGY"); | |
| 407 | + GFitsTableFloatCol* ptr_ra = (GFitsTableFloatCol*)hdu->column("RA"); | |
| 408 | + GFitsTableFloatCol* ptr_dec = (GFitsTableFloatCol*)hdu->column("DEC"); | |
| 409 | + GFitsTableFloatCol* ptr_theta = (GFitsTableFloatCol*)hdu->column("THETA"); | |
| 410 | + GFitsTableFloatCol* ptr_phi = (GFitsTableFloatCol*)hdu->column("PHI"); | |
| 411 | + GFitsTableFloatCol* ptr_zenith = (GFitsTableFloatCol*)hdu->column("ZENITH_ANGLE"); | |
| 412 | + GFitsTableFloatCol* ptr_azimuth = (GFitsTableFloatCol*)hdu->column("EARTH_AZIMUTH_ANGLE"); | |
| 413 | + GFitsTableLongCol* ptr_eid = (GFitsTableLongCol*)hdu->column("EVENT_ID"); | |
| 414 | + GFitsTableLongCol* ptr_rid = (GFitsTableLongCol*)hdu->column("RUN_ID"); | |
| 415 | + GFitsTableShortCol* ptr_recon = (GFitsTableShortCol*)hdu->column("RECON_VERSION"); | |
| 416 | + GFitsTableShortCol* ptr_calib = (GFitsTableShortCol*)hdu->column("CALIB_VERSION"); | |
| 417 | + GFitsTableShortCol* ptr_class = (GFitsTableShortCol*)hdu->column("EVENT_CLASS"); | |
| 418 | + GFitsTableShortCol* ptr_conv = (GFitsTableShortCol*)hdu->column("CONVERSION_TYPE"); | |
| 419 | + GFitsTableDoubleCol* ptr_ltime = (GFitsTableDoubleCol*)hdu->column("LIVETIME"); | |
| 420 | 420 | |
| 421 | 421 | // Copy data from columns into GLATEventAtom objects |
| 422 | 422 | GLATEventAtom* ptr = (GLATEventAtom*)m_events; |
| ... | ... | @@ -468,7 +468,7 @@ void GLATEventList::load_events(GFitsHDU* hdu) |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | // Get column pointer |
| 471 | - GFitsTableFltCol* ptr_dif = (GFitsTableFltCol*)hdu->column(std::string(keyword)); | |
| 471 | + GFitsTableFloatCol* ptr_dif = (GFitsTableFloatCol*)hdu->column(std::string(keyword)); | |
| 472 | 472 | |
| 473 | 473 | // Copy data from columns into GLATEventAtom objects |
| 474 | 474 | GLATEventAtom* ptr = (GLATEventAtom*)m_events; | ... | ... |
inst/lat/src/GLATResponseTable.cpp
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GLATResponseTable.hpp" |
| 19 | 19 | #include "GFitsHDU.hpp" |
| 20 | -#include "GFitsTableFltCol.hpp" | |
| 20 | +#include "GFitsTableFloatCol.hpp" | |
| 21 | 21 | |
| 22 | 22 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 23 | |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | /***********************************************************************//** |
| 40 | 40 | * @brief Constructor |
| 41 | 41 | ***************************************************************************/ |
| 42 | -GLATResponseTable::GLATResponseTable() | |
| 42 | +GLATResponseTable::GLATResponseTable(void) | |
| 43 | 43 | { |
| 44 | 44 | // Initialise class members for clean destruction |
| 45 | 45 | init_members(); |
| ... | ... | @@ -70,7 +70,7 @@ GLATResponseTable::GLATResponseTable(const GLATResponseTable& table) |
| 70 | 70 | /***********************************************************************//** |
| 71 | 71 | * @brief Destructor |
| 72 | 72 | ***************************************************************************/ |
| 73 | -GLATResponseTable::~GLATResponseTable() | |
| 73 | +GLATResponseTable::~GLATResponseTable(void) | |
| 74 | 74 | { |
| 75 | 75 | // Free members |
| 76 | 76 | free_members(); |
| ... | ... | @@ -204,10 +204,10 @@ void GLATResponseTable::save(GFitsHDU* hdu) const |
| 204 | 204 | GFitsBinTable table(1); |
| 205 | 205 | |
| 206 | 206 | // Allocate floating point vector columns |
| 207 | - GFitsTableFltCol col_energy_lo = GFitsTableFltCol("ENERG_LO", 1, m_energy_num); | |
| 208 | - GFitsTableFltCol col_energy_hi = GFitsTableFltCol("ENERG_HI", 1, m_energy_num); | |
| 209 | - GFitsTableFltCol col_ctheta_lo = GFitsTableFltCol("CTHETA_LO", 1, m_ctheta_num); | |
| 210 | - GFitsTableFltCol col_ctheta_hi = GFitsTableFltCol("CTHETA_HI", 1, m_ctheta_num); | |
| 207 | + GFitsTableFloatCol col_energy_lo = GFitsTableFloatCol("ENERG_LO", 1, m_energy_num); | |
| 208 | + GFitsTableFloatCol col_energy_hi = GFitsTableFloatCol("ENERG_HI", 1, m_energy_num); | |
| 209 | + GFitsTableFloatCol col_ctheta_lo = GFitsTableFloatCol("CTHETA_LO", 1, m_ctheta_num); | |
| 210 | + GFitsTableFloatCol col_ctheta_hi = GFitsTableFloatCol("CTHETA_HI", 1, m_ctheta_num); | |
| 211 | 211 | |
| 212 | 212 | // Set column values |
| 213 | 213 | for (int i = 0; i < m_energy_num; ++i) { | ... | ... |