From 5d076b36ab98ae5a919be70d98d3e57ace7120c7 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 10 Dec 2015 17:23:51 +0100 Subject: [PATCH] changed to --- inst/cta/include/GCTAResponseIrf.hpp | 8 ++++---- inst/cta/src/GCTAResponseIrf.cpp | 56 ++++++++++++++++++++++++++++---------------------------- inst/cta/test/data/irf_1dc.xml | 6 +++--- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/inst/cta/include/GCTAResponseIrf.hpp b/inst/cta/include/GCTAResponseIrf.hpp index c4d9f74..f55c0c6 100644 --- a/inst/cta/include/GCTAResponseIrf.hpp +++ b/inst/cta/include/GCTAResponseIrf.hpp @@ -217,13 +217,13 @@ private: std::string m_xml_caldb; //!< Calibration database string in XML file std::string m_xml_rspname; //!< Response name in XML file std::string m_xml_aeff; //!< Aeff file name in XML file - std::string m_xml_aeff_hdu; //!< Aeff HDU name in FITS file + std::string m_xml_aeff_extname; //!< Aeff HDU name in FITS file std::string m_xml_psf; //!< PSF file name in XML file - std::string m_xml_psf_hdu; //!< PSF HDU name in FITS file + std::string m_xml_psf_extname; //!< PSF HDU name in FITS file std::string m_xml_edisp; //!< Edisp file name in XML file - std::string m_xml_edisp_hdu; //!< Edisp HDU name in FITS file + std::string m_xml_edisp_extname; //!< Edisp HDU name in FITS file std::string m_xml_background; //!< Background file name in XML file - std::string m_xml_background_hdu; //!< Background HDU name in FITS file + std::string m_xml_background_extname; //!< Background HDU name in FITS file // Npred cache mutable std::vector m_npred_names; //!< Model names diff --git a/inst/cta/src/GCTAResponseIrf.cpp b/inst/cta/src/GCTAResponseIrf.cpp index a0f1dd8..f4f94d7 100644 --- a/inst/cta/src/GCTAResponseIrf.cpp +++ b/inst/cta/src/GCTAResponseIrf.cpp @@ -768,13 +768,13 @@ void GCTAResponseIrf::read(const GXmlElement& xml) // If filename is not empty then load effective area if (!m_xml_aeff.empty()) { - if (par->has_attribute("hdu")) { + if (par->has_attribute("extname")) { // Store HDU name - m_xml_aeff_hdu = par->attribute("hdu"); + m_xml_aeff_extname = par->attribute("extname"); // Load effective area with extension attribute - load_aeff(m_xml_aeff, m_xml_aeff_hdu); + load_aeff(m_xml_aeff, m_xml_aeff_extname); } else { @@ -832,13 +832,13 @@ void GCTAResponseIrf::read(const GXmlElement& xml) // If filename is not empty then load point spread function if (!m_xml_psf.empty()) { - if (par->has_attribute("hdu")) { + if (par->has_attribute("extname")) { // Store hdu name - m_xml_psf_hdu = par->attribute("hdu"); + m_xml_psf_extname = par->attribute("extname"); // Load PSF with extension attribute - load_psf(m_xml_psf, m_xml_psf_hdu); + load_psf(m_xml_psf, m_xml_psf_extname); } else { @@ -861,13 +861,13 @@ void GCTAResponseIrf::read(const GXmlElement& xml) // If filename is not empty then load energy dispersion if (!m_xml_edisp.empty()) { - if (par->has_attribute("hdu")) { + if (par->has_attribute("extname")) { // Store hdu name - m_xml_edisp_hdu = par->attribute("hdu"); + m_xml_edisp_extname = par->attribute("extname"); // Load energy dispersion with extension attribute - load_edisp(m_xml_edisp, m_xml_edisp_hdu); + load_edisp(m_xml_edisp, m_xml_edisp_extname); } else { @@ -889,13 +889,13 @@ void GCTAResponseIrf::read(const GXmlElement& xml) // If filename is not empty then load background model if (!m_xml_background.empty()) { - if (par->has_attribute("hdu")) { + if (par->has_attribute("extname")) { // Store hdu name - m_xml_background_hdu = par->attribute("hdu"); + m_xml_background_extname = par->attribute("extname"); // Load background with extension attribute - load_background(m_xml_background, m_xml_background_hdu); + load_background(m_xml_background, m_xml_background_extname); } else { @@ -1004,8 +1004,8 @@ void GCTAResponseIrf::write(GXmlElement& xml) const // Set attributes par->attribute("file", m_xml_aeff); - if (!(m_xml_aeff_hdu.empty())) { - par->attribute("hdu", m_xml_aeff_hdu); + if (!(m_xml_aeff_extname.empty())) { + par->attribute("hdu", m_xml_aeff_extname); } if (thetacut > 0.0) { @@ -1026,8 +1026,8 @@ void GCTAResponseIrf::write(GXmlElement& xml) const if (!(m_xml_psf.empty())) { GXmlElement* par = gammalib::xml_need_par(G_WRITE, xml, "PointSpreadFunction"); par->attribute("file", m_xml_psf); - if (!m_xml_psf_hdu.empty()) { - par->attribute("hdu", m_xml_psf_hdu); + if (!m_xml_psf_extname.empty()) { + par->attribute("hdu", m_xml_psf_extname); } } } @@ -1037,8 +1037,8 @@ void GCTAResponseIrf::write(GXmlElement& xml) const if (!(m_xml_edisp.empty())) { GXmlElement* par = gammalib::xml_need_par(G_WRITE, xml, "EnergyDispersion"); par->attribute("file", m_xml_edisp); - if (!m_xml_edisp_hdu.empty()) { - par->attribute("hdu", m_xml_edisp_hdu); + if (!m_xml_edisp_extname.empty()) { + par->attribute("hdu", m_xml_edisp_extname); } } } @@ -1048,8 +1048,8 @@ void GCTAResponseIrf::write(GXmlElement& xml) const if (!(m_xml_background.empty())) { GXmlElement* par = gammalib::xml_need_par(G_WRITE, xml, "Background"); par->attribute("file", m_xml_background); - if (!m_xml_background_hdu.empty()) { - par->attribute("hdu", m_xml_background_hdu); + if (!m_xml_background_extname.empty()) { + par->attribute("hdu", m_xml_background_extname); } } } @@ -1992,10 +1992,10 @@ void GCTAResponseIrf::init_members(void) m_xml_psf.clear(); m_xml_edisp.clear(); m_xml_background.clear(); - m_xml_aeff_hdu.clear(); - m_xml_psf_hdu.clear(); - m_xml_edisp_hdu.clear(); - m_xml_background_hdu.clear(); + m_xml_aeff_extname.clear(); + m_xml_psf_extname.clear(); + m_xml_edisp_extname.clear(); + m_xml_background_extname.clear(); // Initialise Npred cache m_npred_names.clear(); @@ -2029,10 +2029,10 @@ void GCTAResponseIrf::copy_members(const GCTAResponseIrf& rsp) m_xml_psf = rsp.m_xml_psf; m_xml_edisp = rsp.m_xml_edisp; m_xml_background = rsp.m_xml_background; - m_xml_aeff_hdu = rsp.m_xml_aeff_hdu; - m_xml_psf_hdu = rsp.m_xml_psf_hdu; - m_xml_edisp_hdu = rsp.m_xml_edisp_hdu; - m_xml_background_hdu = rsp.m_xml_background_hdu; + m_xml_aeff_extname = rsp.m_xml_aeff_extname; + m_xml_psf_extname = rsp.m_xml_psf_extname; + m_xml_edisp_extname = rsp.m_xml_edisp_extname; + m_xml_background_extname = rsp.m_xml_background_extname; // Copy cache m_npred_names = rsp.m_npred_names; diff --git a/inst/cta/test/data/irf_1dc.xml b/inst/cta/test/data/irf_1dc.xml index 9f95f1a..a23e1ad 100644 --- a/inst/cta/test/data/irf_1dc.xml +++ b/inst/cta/test/data/irf_1dc.xml @@ -1,9 +1,9 @@ - - - + + + -- libgit2 0.21.4