From c9908a82655630fa55895ee7583e0c49ec9433e3 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 22 Jul 2014 17:03:05 +0200 Subject: [PATCH] Add cube access methods. --- pyext/ctexpcube.i | 21 +++++++++++---------- pyext/ctpsfcube.i | 21 +++++++++++---------- src/ctexpcube/ctexpcube.hpp | 45 +++++++++++++++++++++++++++++++++++---------- src/ctpsfcube/ctpsfcube.hpp | 45 +++++++++++++++++++++++++++++++++++---------- 4 files changed, 92 insertions(+), 40 deletions(-) diff --git a/pyext/ctexpcube.i b/pyext/ctexpcube.i index f378e8c..a0df453 100644 --- a/pyext/ctexpcube.i +++ b/pyext/ctexpcube.i @@ -46,16 +46,17 @@ public: virtual ~ctexpcube(void); // Methods - void clear(void); - void execute(void); - void run(void); - void save(void); - GObservations& obs(void); - void get_parameters(void); - void get_obs(void); - void set_response(void); - void get_ebounds(void); - void set_from_cntmap(const std::string& filename); + void clear(void); + void execute(void); + void run(void); + void save(void); + const GObservations& obs(void) const; + const GCTAExposure& expcube(void) const; + void get_parameters(void); + void get_obs(void); + void set_response(void); + void get_ebounds(void); + void set_from_cntmap(const std::string& filename); }; diff --git a/pyext/ctpsfcube.i b/pyext/ctpsfcube.i index b7e3ec3..a7a1bcb 100644 --- a/pyext/ctpsfcube.i +++ b/pyext/ctpsfcube.i @@ -46,16 +46,17 @@ public: virtual ~ctpsfcube(void); // Methods - void clear(void); - void execute(void); - void run(void); - void save(void); - GObservations& obs(void) { return m_obs; } - void get_parameters(void); - void get_obs(void); - void set_response(void); - void get_ebounds(void); - void set_from_cntmap(const std::string& filename); + void clear(void); + void execute(void); + void run(void); + void save(void); + const GObservations& obs(void) const; + const GCTAMeanPsf& psfcube(void) const; + void get_parameters(void); + void get_obs(void); + void set_response(void); + void get_ebounds(void); + void set_from_cntmap(const std::string& filename); }; /***********************************************************************//** diff --git a/src/ctexpcube/ctexpcube.hpp b/src/ctexpcube/ctexpcube.hpp index e2bfb5c..7fbc08a 100644 --- a/src/ctexpcube/ctexpcube.hpp +++ b/src/ctexpcube/ctexpcube.hpp @@ -55,16 +55,17 @@ public: ctexpcube& operator=(const ctexpcube& app); // Methods - void clear(void); - void execute(void); - void run(void); - void save(void); - GObservations& obs(void) { return m_obs; } - void get_parameters(void); - void get_obs(void); - void set_response(void); - void get_ebounds(void); - void set_from_cntmap(const std::string& filename); + void clear(void); + void execute(void); + void run(void); + void save(void); + const GObservations& obs(void) const; + const GCTAExposure& expcube(void) const; + void get_parameters(void); + void get_obs(void); + void set_response(void); + void get_ebounds(void); + void set_from_cntmap(const std::string& filename); protected: // Protected methods @@ -83,4 +84,28 @@ protected: GEbounds m_ebounds; //!< Energy boundaries }; + +/***********************************************************************//** + * @brief Return observation container + * + * @return Observation container + ***************************************************************************/ +inline +const GObservations& ctexpcube::obs(void) const +{ + return (m_obs); +} + + +/***********************************************************************//** + * @brief Return exposure cube + * + * @return Exposure cube + ***************************************************************************/ +inline +const GCTAExposure& ctexpcube::expcube(void) const +{ + return (m_expcube); +} + #endif /* CTEXPCUBE_HPP */ diff --git a/src/ctpsfcube/ctpsfcube.hpp b/src/ctpsfcube/ctpsfcube.hpp index c9a8da1..f51a3be 100644 --- a/src/ctpsfcube/ctpsfcube.hpp +++ b/src/ctpsfcube/ctpsfcube.hpp @@ -55,16 +55,17 @@ public: ctpsfcube& operator=(const ctpsfcube& app); // Methods - void clear(void); - void execute(void); - void run(void); - void save(void); - GObservations& obs(void) { return m_obs; } - void get_parameters(void); - void get_obs(void); - void set_response(void); - void get_ebounds(void); - void set_from_cntmap(const std::string& filename); + void clear(void); + void execute(void); + void run(void); + void save(void); + const GObservations& obs(void) const; + const GCTAMeanPsf& psfcube(void) const; + void get_parameters(void); + void get_obs(void); + void set_response(void); + void get_ebounds(void); + void set_from_cntmap(const std::string& filename); protected: // Protected methods @@ -83,4 +84,28 @@ protected: GEbounds m_ebounds; //!< Energy boundaries }; + +/***********************************************************************//** + * @brief Return observation container + * + * @return Observation container + ***************************************************************************/ +inline +const GObservations& ctpsfcube::obs(void) const +{ + return (m_obs); +} + + +/***********************************************************************//** + * @brief Return PSF cube + * + * @return PSF cube + ***************************************************************************/ +inline +const GCTAMeanPsf& ctpsfcube::psfcube(void) const +{ + return (m_psfcube); +} + #endif /* CTPSFCUBE_HPP */ -- libgit2 0.21.4