diff --git a/pyext/ctbin.i b/pyext/ctbin.i index 8b7291a..5b7a58b 100644 --- a/pyext/ctbin.i +++ b/pyext/ctbin.i @@ -51,10 +51,6 @@ public: void save(void); const GObservations& obs(void) const; GCTAEventCube cube(void) const; - void get_parameters(void); - void init_cube(void); - void fill_cube(GCTAObservation* obs); - void obs_cube(void); }; diff --git a/pyext/ctbkgcube.i b/pyext/ctbkgcube.i index d93b533..6f9b6ae 100644 --- a/pyext/ctbkgcube.i +++ b/pyext/ctbkgcube.i @@ -50,12 +50,7 @@ public: void execute(void); void run(void); void save(void); - const GObservations& obs(void) const; - void get_parameters(void); - void get_obs(void); - void get_ebounds(void); - void set_from_cntmap(const std::string& filename); - void fill_cube(GCTAObservation* obs); + const GCTAEventCube& cube(void) const; }; /***********************************************************************//** diff --git a/pyext/ctexpcube.i b/pyext/ctexpcube.i index a0df453..43841e6 100644 --- a/pyext/ctexpcube.i +++ b/pyext/ctexpcube.i @@ -52,11 +52,6 @@ public: 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/src/ctexpcube/ctexpcube.cpp b/src/ctexpcube/ctexpcube.cpp index fd234c4..a318e8f 100644 --- a/src/ctexpcube/ctexpcube.cpp +++ b/src/ctexpcube/ctexpcube.cpp @@ -296,7 +296,6 @@ void ctexpcube::run(void) /***********************************************************************//** * @brief Save exposure cube - * ***************************************************************************/ void ctexpcube::save(void) { @@ -317,6 +316,72 @@ void ctexpcube::save(void) } +/*========================================================================== + = = + = Private methods = + = = + ==========================================================================*/ + +/***********************************************************************//** + * @brief Initialise class members + ***************************************************************************/ +void ctexpcube::init_members(void) +{ + // Initialise members + m_outfile.clear(); + m_apply_edisp = false; + + // Initialise protected members + m_read_ahead = false; + m_obs.clear(); + m_expcube.clear(); + m_ebounds.clear(); + + // Set logger properties + log.date(true); + + // Return + return; +} + + +/***********************************************************************//** + * @brief Copy class members + * + * @param[in] app Application. + ***************************************************************************/ +void ctexpcube::copy_members(const ctexpcube& app) +{ + // Copy attributes + m_outfile = app.m_outfile; + m_apply_edisp = app.m_apply_edisp; + + // Copy protected members + m_read_ahead = app.m_read_ahead; + m_obs = app.m_obs; + m_expcube = app.m_expcube; + m_ebounds = app.m_ebounds; + + // Return + return; +} + + +/***********************************************************************//** + * @brief Delete class members + ***************************************************************************/ +void ctexpcube::free_members(void) +{ + // Write separator into logger + if (logTerse()) { + log << std::endl; + } + + // Return + return; +} + + /***********************************************************************//** * @brief Get application parameters * @@ -603,69 +668,3 @@ void ctexpcube::set_from_cntmap(const std::string& filename) // Return return; } - - -/*========================================================================== - = = - = Private methods = - = = - ==========================================================================*/ - -/***********************************************************************//** - * @brief Initialise class members - ***************************************************************************/ -void ctexpcube::init_members(void) -{ - // Initialise members - m_outfile.clear(); - m_apply_edisp = false; - - // Initialise protected members - m_read_ahead = false; - m_obs.clear(); - m_expcube.clear(); - m_ebounds.clear(); - - // Set logger properties - log.date(true); - - // Return - return; -} - - -/***********************************************************************//** - * @brief Copy class members - * - * @param[in] app Application. - ***************************************************************************/ -void ctexpcube::copy_members(const ctexpcube& app) -{ - // Copy attributes - m_outfile = app.m_outfile; - m_apply_edisp = app.m_apply_edisp; - - // Copy protected members - m_read_ahead = app.m_read_ahead; - m_obs = app.m_obs; - m_expcube = app.m_expcube; - m_ebounds = app.m_ebounds; - - // Return - return; -} - - -/***********************************************************************//** - * @brief Delete class members - ***************************************************************************/ -void ctexpcube::free_members(void) -{ - // Write separator into logger - if (logTerse()) { - log << std::endl; - } - - // Return - return; -} diff --git a/src/ctexpcube/ctexpcube.hpp b/src/ctexpcube/ctexpcube.hpp index 7fbc08a..0432f79 100644 --- a/src/ctexpcube/ctexpcube.hpp +++ b/src/ctexpcube/ctexpcube.hpp @@ -61,17 +61,17 @@ public: 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 - void init_members(void); - void copy_members(const ctexpcube& app); - void free_members(void); + void init_members(void); + void copy_members(const ctexpcube& app); + void free_members(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); // User parameters std::string m_outfile; //!< Output exposure cube file