Commit 530bfccccff67eea66da4356996b93790129e93b
1 parent
5a6fea13
ctskymap now derives from ctool base class.
Showing
5 changed files
with
25 additions
and
37 deletions
pyext/ctskymap.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * ctskymap - CTA sky mapping tool * | |
| 2 | + * ctskymap - Sky mapping tool * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2012-2014 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,22 +20,21 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file ctskymap.i |
| 23 | - * @brief CTA sky mapping tool definition | |
| 23 | + * @brief Sky mapping tool definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| 28 | 28 | #include "ctskymap.hpp" |
| 29 | -#include "GTools.hpp" | |
| 30 | 29 | %} |
| 31 | 30 | |
| 32 | 31 | |
| 33 | 32 | /***********************************************************************//** |
| 34 | 33 | * @class ctskymap |
| 35 | 34 | * |
| 36 | - * @brief CTA sky mapping tool interface defintion | |
| 35 | + * @brief Sky mapping tool | |
| 37 | 36 | ***************************************************************************/ |
| 38 | -class ctskymap : public GApplication { | |
| 37 | +class ctskymap : public ctool { | |
| 39 | 38 | public: |
| 40 | 39 | // Constructors and destructors |
| 41 | 40 | ctskymap(void); |
| ... | ... | @@ -54,7 +53,7 @@ public: |
| 54 | 53 | |
| 55 | 54 | |
| 56 | 55 | /***********************************************************************//** |
| 57 | - * @brief CTA sky mapping tool Python extension | |
| 56 | + * @brief Sky mapping tool Python extension | |
| 58 | 57 | ***************************************************************************/ |
| 59 | 58 | %extend ctskymap { |
| 60 | 59 | ctskymap copy() { | ... | ... |
src/ctselect/ctselect.cpp
| ... | ... | @@ -761,11 +761,6 @@ void ctselect::copy_members(const ctselect& app) |
| 761 | 761 | ***************************************************************************/ |
| 762 | 762 | void ctselect::free_members(void) |
| 763 | 763 | { |
| 764 | - // Write separator into logger | |
| 765 | - if (logTerse()) { | |
| 766 | - log << std::endl; | |
| 767 | - } | |
| 768 | - | |
| 769 | 764 | // Return |
| 770 | 765 | return; |
| 771 | 766 | } | ... | ... |
src/ctskymap/Makefile.am
| 1 | 1 | ## Process this file with automake to produce Makefile.in |
| 2 | 2 | |
| 3 | +# Set include directories | |
| 4 | +INCLUDES = -I$(top_srcdir)/src/support | |
| 5 | + | |
| 3 | 6 | # Program name |
| 4 | 7 | bin_PROGRAMS = ctskymap |
| 5 | 8 | |
| ... | ... | @@ -14,7 +17,7 @@ libctskymap_la_SOURCES = $(sources) |
| 14 | 17 | ctskymap_SOURCES = main.cpp |
| 15 | 18 | ctskymap_LDFLAGS = $(LIB_LINK_OPTION) @LDFLAGS@ |
| 16 | 19 | ctskymap_CPPFLAGS = @CPPFLAGS@ |
| 17 | -ctskymap_LDADD = libctskymap.la | |
| 20 | +ctskymap_LDADD = libctskymap.la $(top_srcdir)/src/support/libsupport.la | |
| 18 | 21 | |
| 19 | 22 | # Parameter files |
| 20 | 23 | pfilesdir = $(prefix)/syspfiles | ... | ... |
src/ctskymap/ctskymap.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * ctskymap - CTA sky mapping tool * | |
| 2 | + * ctskymap - Sky mapping tool * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2011-2014 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file ctskymap.cpp |
| 23 | - * @brief CTA sky mapping tool implementation | |
| 23 | + * @brief Sky mapping tool implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -50,14 +50,11 @@ |
| 50 | 50 | /***********************************************************************//** |
| 51 | 51 | * @brief Void constructor |
| 52 | 52 | ***************************************************************************/ |
| 53 | -ctskymap::ctskymap(void) : GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION) | |
| 53 | +ctskymap::ctskymap(void) : ctool(CTSKYMAP_NAME, CTSKYMAP_VERSION) | |
| 54 | 54 | { |
| 55 | 55 | // Initialise members |
| 56 | 56 | init_members(); |
| 57 | 57 | |
| 58 | - // Write header into logger | |
| 59 | - log_header(); | |
| 60 | - | |
| 61 | 58 | // Return |
| 62 | 59 | return; |
| 63 | 60 | } |
| ... | ... | @@ -72,7 +69,7 @@ ctskymap::ctskymap(void) : GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION) |
| 72 | 69 | * observations container. |
| 73 | 70 | ***************************************************************************/ |
| 74 | 71 | ctskymap::ctskymap(const GObservations& obs) : |
| 75 | - GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION) | |
| 72 | + ctool(CTSKYMAP_NAME, CTSKYMAP_VERSION) | |
| 76 | 73 | { |
| 77 | 74 | // Initialise members |
| 78 | 75 | init_members(); |
| ... | ... | @@ -80,9 +77,6 @@ ctskymap::ctskymap(const GObservations& obs) : |
| 80 | 77 | // Set observations |
| 81 | 78 | m_obs = obs; |
| 82 | 79 | |
| 83 | - // Write header into logger | |
| 84 | - log_header(); | |
| 85 | - | |
| 86 | 80 | // Return |
| 87 | 81 | return; |
| 88 | 82 | } |
| ... | ... | @@ -96,14 +90,11 @@ ctskymap::ctskymap(const GObservations& obs) : |
| 96 | 90 | * @param[in] argv Array of command line arguments. |
| 97 | 91 | ***************************************************************************/ |
| 98 | 92 | ctskymap::ctskymap(int argc, char *argv[]) : |
| 99 | - GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION, argc, argv) | |
| 93 | + ctool(CTSKYMAP_NAME, CTSKYMAP_VERSION, argc, argv) | |
| 100 | 94 | { |
| 101 | 95 | // Initialise members |
| 102 | 96 | init_members(); |
| 103 | 97 | |
| 104 | - // Write header into logger | |
| 105 | - log_header(); | |
| 106 | - | |
| 107 | 98 | // Return |
| 108 | 99 | return; |
| 109 | 100 | } |
| ... | ... | @@ -114,7 +105,7 @@ ctskymap::ctskymap(int argc, char *argv[]) : |
| 114 | 105 | * |
| 115 | 106 | * @param[in] app Application. |
| 116 | 107 | ***************************************************************************/ |
| 117 | -ctskymap::ctskymap(const ctskymap& app) : GApplication(app) | |
| 108 | +ctskymap::ctskymap(const ctskymap& app) : ctool(app) | |
| 118 | 109 | { |
| 119 | 110 | // Initialise members |
| 120 | 111 | init_members(); |
| ... | ... | @@ -151,13 +142,13 @@ ctskymap::~ctskymap(void) |
| 151 | 142 | * |
| 152 | 143 | * @param[in] app Application. |
| 153 | 144 | ***************************************************************************/ |
| 154 | -ctskymap& ctskymap::operator= (const ctskymap& app) | |
| 145 | +ctskymap& ctskymap::operator=(const ctskymap& app) | |
| 155 | 146 | { |
| 156 | 147 | // Execute only if object is not identical |
| 157 | 148 | if (this != &app) { |
| 158 | 149 | |
| 159 | 150 | // Copy base class members |
| 160 | - this->GApplication::operator=(app); | |
| 151 | + this->ctool::operator=(app); | |
| 161 | 152 | |
| 162 | 153 | // Free members |
| 163 | 154 | free_members(); |
| ... | ... | @@ -188,10 +179,12 @@ void ctskymap::clear(void) |
| 188 | 179 | { |
| 189 | 180 | // Free members |
| 190 | 181 | free_members(); |
| 182 | + this->ctool::free_members(); | |
| 191 | 183 | this->GApplication::free_members(); |
| 192 | 184 | |
| 193 | 185 | // Initialise members |
| 194 | 186 | this->GApplication::init_members(); |
| 187 | + this->ctool::init_members(); | |
| 195 | 188 | init_members(); |
| 196 | 189 | |
| 197 | 190 | // Return |
| ... | ... | @@ -602,10 +595,6 @@ void ctskymap::copy_members(const ctskymap& app) |
| 602 | 595 | ***************************************************************************/ |
| 603 | 596 | void ctskymap::free_members(void) |
| 604 | 597 | { |
| 605 | - // Write separator into logger | |
| 606 | - if (logTerse()) | |
| 607 | - log << std::endl; | |
| 608 | - | |
| 609 | 598 | // Return |
| 610 | 599 | return; |
| 611 | 600 | } | ... | ... |
src/ctskymap/ctskymap.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * ctskymap - CTA sky mapping tool * | |
| 2 | + * ctskymap - Sky mapping tool * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2010-2014 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file ctskymap.hpp |
| 23 | - * @brief CTA sky mapping tool definition | |
| 23 | + * @brief Sky mapping tool definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | 31 | #include "GammaLib.hpp" |
| 32 | 32 | #include "GCTALib.hpp" |
| 33 | +#include "ctool.hpp" | |
| 33 | 34 | |
| 34 | 35 | /* __Definitions _________________________________________________________ */ |
| 35 | 36 | #define CTSKYMAP_NAME "ctskymap" |
| ... | ... | @@ -39,11 +40,12 @@ |
| 39 | 40 | /***********************************************************************//** |
| 40 | 41 | * @class ctskymap |
| 41 | 42 | * |
| 42 | - * @brief CTA sky mapping tool interface defintion | |
| 43 | + * @brief Sky mapping tool | |
| 43 | 44 | * |
| 44 | 45 | * This class creates a sky map from a CTA event list. |
| 45 | 46 | ***************************************************************************/ |
| 46 | -class ctskymap : public GApplication { | |
| 47 | +class ctskymap : public ctool { | |
| 48 | + | |
| 47 | 49 | public: |
| 48 | 50 | // Constructors and destructors |
| 49 | 51 | ctskymap(void); | ... | ... |