Commit bb1a20318433a7d0268234d38d6181a74443e7e9

Authored by Michael Mayer
1 parent e67369a1

Use ctobservation base class for all ctools that hold an observation container

pyext/ctbkgcube.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Background cube generation tool
36 36 ***************************************************************************/
37   -class ctbkgcube : public ctool {
  37 +class ctbkgcube : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctbkgcube(void);
... ...
pyext/ctbutterfly.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Butterfly calculation tool
36 36 ***************************************************************************/
37   -class ctbutterfly : public ctool {
  37 +class ctbutterfly : public ctlikelihood {
38 38 public:
39 39 // Constructors and destructors
40 40 ctbutterfly(void);
... ... @@ -47,7 +47,7 @@ public:
47 47 void clear(void);
48 48 void run(void);
49 49 void save(void);
50   - const GObservations& obs(void) const;
  50 +
51 51 };
52 52  
53 53  
... ...
pyext/ctcubemask.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Cube filter tool
36 36 ***************************************************************************/
37   -class ctcubemask : public ctool {
  37 +class ctcubemask : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctcubemask(void);
... ... @@ -48,7 +48,6 @@ public:
48 48 void run(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51   - const GObservations& obs(void) const;
52 51 };
53 52  
54 53  
... ...
pyext/ctedispcube.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Energy dispersion cube generation tool
36 36 ***************************************************************************/
37   -class ctedispcube : public ctool {
  37 +class ctedispcube : public ctobservation {
38 38  
39 39 public:
40 40 // Constructors and destructors
... ...
pyext/ctexpcube.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Exposure cube generation tool
36 36 ***************************************************************************/
37   -class ctexpcube : public ctool {
  37 +class ctexpcube : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctexpcube(void);
... ...
pyext/ctmodel.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Model cube generation tool
36 36 ***************************************************************************/
37   -class ctmodel : public ctool {
  37 +class ctmodel : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctmodel(void);
... ... @@ -48,7 +48,6 @@ public:
48 48 void run(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51   - const GObservations& obs(void) const;
52 51 const GCTAEventCube& cube(void) const;
53 52 void cube(const GCTAEventCube& cube);
54 53 void models(const GModels& models);
... ...
pyext/ctobssim.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Observation simulator tool
36 36 ***************************************************************************/
37   -class ctobssim : public ctool {
  37 +class ctobssim : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctobssim(void);
... ... @@ -47,7 +47,6 @@ public:
47 47 void clear(void);
48 48 void run(void);
49 49 void save(void);
50   - const GObservations& obs(void) const;
51 50 const double& max_rate(void) const;
52 51 void max_rate(const double& max_rate);
53 52 };
... ...
pyext/ctpsfcube.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief PSF cube generation tool
36 36 ***************************************************************************/
37   -class ctpsfcube : public ctool {
  37 +class ctpsfcube : public ctobservation {
38 38  
39 39 public:
40 40 // Constructors and destructors
... ...
pyext/ctselect.i
... ... @@ -34,7 +34,7 @@
34 34 *
35 35 * @brief Data selection tool
36 36 ***************************************************************************/
37   -class ctselect : public ctool {
  37 +class ctselect : public ctobservation {
38 38 public:
39 39 // Constructors and destructors
40 40 ctselect(void);
... ... @@ -47,7 +47,6 @@ public:
47 47 void clear(void);
48 48 void run(void);
49 49 void save(void);
50   - const GObservations& obs(void) const;
51 50 };
52 51  
53 52  
... ...
src/ctbin/ctbin.cpp
... ... @@ -192,8 +192,8 @@ void ctbin::clear(void)
192 192 {
193 193 // Free members
194 194 free_members();
195   - this->ctool::free_members();
196 195 this->ctobservation::free_members();
  196 + this->ctool::free_members();
197 197  
198 198 // Clear base class (needed to conserve tool name and version)
199 199 this->GApplication::clear();
... ...
src/ctbkgcube/ctbkgcube.cpp
... ... @@ -50,7 +50,7 @@
50 50 /***********************************************************************//**
51 51 * @brief Void constructor
52 52 ***************************************************************************/
53   -ctbkgcube::ctbkgcube(void) : ctool(CTBKGCUBE_NAME, CTBKGCUBE_VERSION)
  53 +ctbkgcube::ctbkgcube(void) : ctobservation(CTBKGCUBE_NAME, CTBKGCUBE_VERSION)
54 54 {
55 55 // Initialise members
56 56 init_members();
... ... @@ -69,14 +69,11 @@ ctbkgcube::ctbkgcube(void) : ctool(CTBKGCUBE_NAME, CTBKGCUBE_VERSION)
69 69 * observations container.
70 70 ***************************************************************************/
71 71 ctbkgcube::ctbkgcube(const GObservations& obs) :
72   - ctool(CTBKGCUBE_NAME, CTBKGCUBE_VERSION)
  72 + ctobservation(CTBKGCUBE_NAME, CTBKGCUBE_VERSION, obs)
73 73 {
74 74 // Initialise members
75 75 init_members();
76 76  
77   - // Set observations
78   - m_obs = obs;
79   -
80 77 // Return
81 78 return;
82 79 }
... ... @@ -90,7 +87,7 @@ ctbkgcube::ctbkgcube(const GObservations& obs) :
90 87 * @param[in] argv Array of command line arguments.
91 88 ***************************************************************************/
92 89 ctbkgcube::ctbkgcube(int argc, char *argv[]) :
93   - ctool(CTBKGCUBE_NAME, CTBKGCUBE_VERSION, argc, argv)
  90 + ctobservation(CTBKGCUBE_NAME, CTBKGCUBE_VERSION, argc, argv)
94 91 {
95 92 // Initialise members
96 93 init_members();
... ... @@ -105,7 +102,7 @@ ctbkgcube::ctbkgcube(int argc, char *argv[]) :
105 102 *
106 103 * @param[in] app Application.
107 104 ***************************************************************************/
108   -ctbkgcube::ctbkgcube(const ctbkgcube& app) : ctool(app)
  105 +ctbkgcube::ctbkgcube(const ctbkgcube& app) : ctobservation(app)
109 106 {
110 107 // Initialise members
111 108 init_members();
... ... @@ -149,7 +146,7 @@ ctbkgcube& ctbkgcube::operator=(const ctbkgcube& app)
149 146 if (this != &app) {
150 147  
151 148 // Copy base class members
152   - this->ctool::operator=(app);
  149 + this->ctobservation::operator=(app);
153 150  
154 151 // Free members
155 152 free_members();
... ... @@ -182,6 +179,7 @@ void ctbkgcube::clear(void)
182 179 {
183 180 // Free members
184 181 free_members();
  182 + this->ctobservation::free_members();
185 183 this->ctool::free_members();
186 184  
187 185 // Clear base class (needed to conserve tool name and version)
... ... @@ -189,6 +187,7 @@ void ctbkgcube::clear(void)
189 187  
190 188 // Initialise members
191 189 this->ctool::init_members();
  190 + this->ctobservation::init_members();
192 191 init_members();
193 192  
194 193 // Write header into logger
... ... @@ -407,7 +406,6 @@ void ctbkgcube::init_members(void)
407 406 m_chatter = static_cast<GChatter>(2);
408 407  
409 408 // Initialise protected members
410   - m_obs.clear();
411 409 m_background.clear();
412 410 m_bkgmdl.clear();
413 411 m_outmdl.clear();
... ... @@ -432,7 +430,6 @@ void ctbkgcube::copy_members(const ctbkgcube&amp; app)
432 430 m_chatter = app.m_chatter;
433 431  
434 432 // Copy protected members
435   - m_obs = app.m_obs;
436 433 m_background = app.m_background;
437 434 m_bkgmdl = app.m_bkgmdl;
438 435 m_outmdl = app.m_outmdl;
... ...
src/ctbkgcube/ctbkgcube.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTBKGCUBE_NAME "ctbkgcube"
... ... @@ -42,7 +42,7 @@
42 42 *
43 43 * @brief Background cube generation tool
44 44 ***************************************************************************/
45   -class ctbkgcube : public ctool {
  45 +class ctbkgcube : public ctobservation {
46 46  
47 47 public:
48 48 // Constructors and destructors
... ... @@ -79,7 +79,6 @@ protected:
79 79 GChatter m_chatter; //!< Chattiness
80 80  
81 81 // Protected members
82   - GObservations m_obs; //!< Observation container
83 82 GCTACubeBackground m_background; //!< Background cube
84 83 GModels m_bkgmdl; //!< CTA background models
85 84 GModels m_outmdl; //!< Output models
... ...
src/ctbutterfly/ctbutterfly.cpp
... ... @@ -52,7 +52,7 @@
52 52 /***********************************************************************//**
53 53 * @brief Void constructor
54 54 ***************************************************************************/
55   -ctbutterfly::ctbutterfly(void) : ctool(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION)
  55 +ctbutterfly::ctbutterfly(void) : ctlikelihood(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION)
56 56 {
57 57 // Initialise members
58 58 init_members();
... ... @@ -71,14 +71,11 @@ ctbutterfly::ctbutterfly(void) : ctool(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION)
71 71 * observations container.
72 72 ***************************************************************************/
73 73 ctbutterfly::ctbutterfly(const GObservations& obs) :
74   - ctool(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION)
  74 + ctlikelihood(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION, obs)
75 75 {
76 76 // Initialise members
77 77 init_members();
78 78  
79   - // Set observations
80   - m_obs = obs;
81   -
82 79 // Return
83 80 return;
84 81 }
... ... @@ -92,7 +89,7 @@ ctbutterfly::ctbutterfly(const GObservations&amp; obs) :
92 89 * @param[in] argv Array of command line arguments.
93 90 ***************************************************************************/
94 91 ctbutterfly::ctbutterfly(int argc, char *argv[]) :
95   - ctool(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION, argc, argv)
  92 + ctlikelihood(CTBUTTERFLY_NAME, CTBUTTERFLY_VERSION, argc, argv)
96 93 {
97 94 // Initialise members
98 95 init_members();
... ... @@ -107,7 +104,7 @@ ctbutterfly::ctbutterfly(int argc, char *argv[]) :
107 104 *
108 105 * @param[in] app Application.
109 106 ***************************************************************************/
110   -ctbutterfly::ctbutterfly(const ctbutterfly& app) : ctool(app)
  107 +ctbutterfly::ctbutterfly(const ctbutterfly& app) : ctlikelihood(app)
111 108 {
112 109 // Initialise members
113 110 init_members();
... ... @@ -151,7 +148,7 @@ ctbutterfly&amp; ctbutterfly::operator=(const ctbutterfly&amp; app)
151 148 if (this != &app) {
152 149  
153 150 // Copy base class members
154   - this->ctool::operator=(app);
  151 + this->ctlikelihood::operator=(app);
155 152  
156 153 // Free members
157 154 free_members();
... ... @@ -184,6 +181,8 @@ void ctbutterfly::clear(void)
184 181 {
185 182 // Free members
186 183 free_members();
  184 + this->ctlikelihood::free_members();
  185 + this->ctobservation::free_members();
187 186 this->ctool::free_members();
188 187  
189 188 // Clear base class (needed to conserve tool name and version)
... ... @@ -191,6 +190,8 @@ void ctbutterfly::clear(void)
191 190  
192 191 // Initialise members
193 192 this->ctool::init_members();
  193 + this->ctobservation::init_members();
  194 + this->ctlikelihood::init_members();
194 195 init_members();
195 196  
196 197 // Write header into logger
... ... @@ -512,8 +513,6 @@ void ctbutterfly::init_members(void)
512 513 m_outfile.clear();
513 514  
514 515 // Initialise protected members
515   - m_opt.clear();
516   - m_obs.clear();
517 516 m_covariance.clear();
518 517 m_energies.clear();
519 518 m_intensities.clear();
... ... @@ -547,8 +546,6 @@ void ctbutterfly::copy_members(const ctbutterfly&amp; app)
547 546 m_outfile = app.m_outfile;
548 547  
549 548 // Copy protected members
550   - m_obs = app.m_obs;
551   - m_opt = app.m_opt;
552 549 m_covariance = app.m_covariance;
553 550 m_energies = app.m_energies;
554 551 m_intensities = app.m_intensities;
... ...
src/ctbutterfly/ctbutterfly.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctlikelihood.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTBUTTERFLY_NAME "ctbutterfly"
... ... @@ -53,7 +53,7 @@
53 53 * range. The output is saved as an ascii files containing the confidence
54 54 * band boundaries
55 55 ***************************************************************************/
56   -class ctbutterfly : public ctool {
  56 +class ctbutterfly : public ctlikelihood {
57 57  
58 58 public:
59 59 // Constructors and destructors
... ... @@ -70,7 +70,6 @@ public:
70 70 void clear(void);
71 71 void run(void);
72 72 void save(void);
73   - const GObservations& obs(void) const;
74 73  
75 74 protected:
76 75 // Protected methods
... ... @@ -99,8 +98,6 @@ protected:
99 98 GChatter m_chatter; //!< Chattiness
100 99  
101 100 // Protected members
102   - GOptimizerLM m_opt; //!< Optimizer
103   - GObservations m_obs; //!< Observation container
104 101 GMatrixSparse m_covariance; //!< Covariance matrix
105 102 std::vector<double> m_energies; //!< Energy values
106 103 std::vector<double> m_intensities; //!< Power law intensity
... ... @@ -109,15 +106,4 @@ protected:
109 106 };
110 107  
111 108  
112   -/***********************************************************************//**
113   - * @brief Return observation container
114   - *
115   - * @return Reference to observation container
116   - ***************************************************************************/
117   -inline
118   -const GObservations& ctbutterfly::obs(void) const
119   -{
120   - return m_obs;
121   -}
122   -
123 109 #endif /* CTBUTTERFLY_HPP */
... ...
src/ctcubemask/ctcubemask.cpp
... ... @@ -51,7 +51,7 @@
51 51 /***********************************************************************//**
52 52 * @brief Void constructor
53 53 ***************************************************************************/
54   -ctcubemask::ctcubemask(void) : ctool(CTCUBEMASK_NAME, CTCUBEMASK_VERSION)
  54 +ctcubemask::ctcubemask(void) : ctobservation(CTCUBEMASK_NAME, CTCUBEMASK_VERSION)
55 55 {
56 56 // Initialise members
57 57 init_members();
... ... @@ -70,14 +70,11 @@ ctcubemask::ctcubemask(void) : ctool(CTCUBEMASK_NAME, CTCUBEMASK_VERSION)
70 70 * an observation container.
71 71 ***************************************************************************/
72 72 ctcubemask::ctcubemask(const GObservations& obs) :
73   - ctool(CTCUBEMASK_NAME, CTCUBEMASK_VERSION)
  73 + ctobservation(CTCUBEMASK_NAME, CTCUBEMASK_VERSION, obs)
74 74 {
75 75 // Initialise members
76 76 init_members();
77 77  
78   - // Set observations
79   - m_obs = obs;
80   -
81 78 // Return
82 79 return;
83 80 }
... ... @@ -92,7 +89,7 @@ ctcubemask::ctcubemask(const GObservations&amp; obs) :
92 89 * @param[in] argv Array of command line arguments.
93 90 ***************************************************************************/
94 91 ctcubemask::ctcubemask(int argc, char *argv[]) :
95   - ctool(CTCUBEMASK_NAME, CTCUBEMASK_VERSION, argc, argv)
  92 + ctobservation(CTCUBEMASK_NAME, CTCUBEMASK_VERSION, argc, argv)
96 93 {
97 94 // Initialise members
98 95 init_members();
... ... @@ -107,7 +104,7 @@ ctcubemask::ctcubemask(int argc, char *argv[]) :
107 104 *
108 105 * @param[in] app Application.
109 106 ***************************************************************************/
110   -ctcubemask::ctcubemask(const ctcubemask& app) : ctool(app)
  107 +ctcubemask::ctcubemask(const ctcubemask& app) : ctobservation(app)
111 108 {
112 109 // Initialise members
113 110 init_members();
... ... @@ -151,7 +148,7 @@ ctcubemask&amp; ctcubemask::operator=(const ctcubemask&amp; app)
151 148 if (this != &app) {
152 149  
153 150 // Copy base class members
154   - this->ctool::operator=(app);
  151 + this->ctobservation::operator=(app);
155 152  
156 153 // Free members
157 154 free_members();
... ... @@ -184,6 +181,7 @@ void ctcubemask::clear(void)
184 181 {
185 182 // Free members
186 183 free_members();
  184 + this->ctobservation::free_members();
187 185 this->ctool::free_members();
188 186  
189 187 // Clear base class (needed to conserve tool name and version)
... ... @@ -191,6 +189,7 @@ void ctcubemask::clear(void)
191 189  
192 190 // Initialise members
193 191 this->ctool::init_members();
  192 + this->ctobservation::init_members();
194 193 init_members();
195 194  
196 195 // Write header into logger
... ... @@ -383,7 +382,6 @@ void ctcubemask::init_members(void)
383 382 m_publish = false;
384 383  
385 384 // Initialise protected members
386   - m_obs.clear();
387 385 m_infiles.clear();
388 386 m_select_energy = true;
389 387 m_select_roi = true;
... ... @@ -411,7 +409,6 @@ void ctcubemask::copy_members(const ctcubemask&amp; app)
411 409 m_publish = app.m_publish;
412 410  
413 411 // Copy protected members
414   - m_obs = app.m_obs;
415 412 m_infiles = app.m_infiles;
416 413 m_select_energy = app.m_select_energy;
417 414 m_select_roi = app.m_select_roi;
... ...
src/ctcubemask/ctcubemask.hpp
... ... @@ -32,7 +32,7 @@
32 32 #include <string>
33 33 #include "GammaLib.hpp"
34 34 #include "GCTALib.hpp"
35   -#include "ctool.hpp"
  35 +#include "ctobservation.hpp"
36 36  
37 37 /* __Definitions _________________________________________________________ */
38 38 #define CTCUBEMASK_NAME "ctcubemask"
... ... @@ -44,7 +44,7 @@
44 44 *
45 45 * @brief Cube filter tool
46 46 ***************************************************************************/
47   -class ctcubemask : public ctool {
  47 +class ctcubemask : public ctobservation {
48 48  
49 49 public:
50 50 // Constructors and destructors
... ... @@ -62,7 +62,6 @@ public:
62 62 void run(void);
63 63 void save(void);
64 64 void publish(const std::string& name = "");
65   - const GObservations& obs(void) const;
66 65  
67 66 protected:
68 67 // Protected methods
... ... @@ -87,22 +86,10 @@ protected:
87 86 bool m_publish; //!< Publish counts cube?
88 87  
89 88 // Protected members
90   - GObservations m_obs; //!< Observations container
91 89 std::vector<std::string> m_infiles; //!< Input event filenames
92 90 bool m_select_energy; //!< Perform energy selection
93 91 bool m_select_roi; //!< Perform ROI selection
94 92 };
95 93  
96 94  
97   -/***********************************************************************//**
98   - * @brief Return observation container
99   - *
100   - * @return Reference to observation container
101   - ***************************************************************************/
102   -inline
103   -const GObservations& ctcubemask::obs(void) const
104   -{
105   - return m_obs;
106   -}
107   -
108 95 #endif /* CTCUBEMASK_HPP */
... ...
src/ctedispcube/ctedispcube.cpp
... ... @@ -52,7 +52,7 @@
52 52 *
53 53 * Constructs an empty energy dispersion tool.
54 54 ***************************************************************************/
55   -ctedispcube::ctedispcube(void) : ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION)
  55 +ctedispcube::ctedispcube(void) : ctobservation(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION)
56 56 {
57 57 // Initialise members
58 58 init_members();
... ... @@ -71,14 +71,11 @@ ctedispcube::ctedispcube(void) : ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION)
71 71 * in an observation container @p obs.
72 72 ***************************************************************************/
73 73 ctedispcube::ctedispcube(const GObservations& obs) :
74   - ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION)
  74 + ctobservation(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION, obs)
75 75 {
76 76 // Initialise members
77 77 init_members();
78 78  
79   - // Set observations
80   - m_obs = obs;
81   -
82 79 // Return
83 80 return;
84 81 }
... ... @@ -95,7 +92,7 @@ ctedispcube::ctedispcube(const GObservations&amp; obs) :
95 92 * on the command line.
96 93 ***************************************************************************/
97 94 ctedispcube::ctedispcube(int argc, char *argv[]) :
98   - ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION, argc, argv)
  95 + ctobservation(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION, argc, argv)
99 96 {
100 97 // Initialise members
101 98 init_members();
... ... @@ -113,7 +110,7 @@ ctedispcube::ctedispcube(int argc, char *argv[]) :
113 110 * Constructs an energy dispersion tool by copying anothere energy
114 111 * dispersion tool.
115 112 ***************************************************************************/
116   -ctedispcube::ctedispcube(const ctedispcube& app) : ctool(app)
  113 +ctedispcube::ctedispcube(const ctedispcube& app) : ctobservation(app)
117 114 {
118 115 // Initialise members
119 116 init_members();
... ... @@ -161,7 +158,7 @@ ctedispcube&amp; ctedispcube::operator=(const ctedispcube&amp; app)
161 158 if (this != &app) {
162 159  
163 160 // Copy base class members
164   - this->ctool::operator=(app);
  161 + this->ctobservation::operator=(app);
165 162  
166 163 // Free members
167 164 free_members();
... ... @@ -194,6 +191,7 @@ void ctedispcube::clear(void)
194 191 {
195 192 // Free members
196 193 free_members();
  194 + this->ctobservation::free_members();
197 195 this->ctool::free_members();
198 196  
199 197 // Clear base class (needed to conserve tool name and version)
... ... @@ -201,6 +199,7 @@ void ctedispcube::clear(void)
201 199  
202 200 // Initialise members
203 201 this->ctool::init_members();
  202 + this->ctobservation::init_members();
204 203 init_members();
205 204  
206 205 // Write header into logger
... ... @@ -299,7 +298,6 @@ void ctedispcube::init_members(void)
299 298 m_chatter = static_cast<GChatter>(2);
300 299  
301 300 // Initialise protected members
302   - m_obs.clear();
303 301 m_edispcube.clear();
304 302  
305 303 // Return
... ... @@ -320,7 +318,6 @@ void ctedispcube::copy_members(const ctedispcube&amp; app)
320 318 m_chatter = app.m_chatter;
321 319  
322 320 // Copy protected members
323   - m_obs = app.m_obs;
324 321 m_edispcube = app.m_edispcube;
325 322  
326 323 // Return
... ...
src/ctedispcube/ctedispcube.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTEDISPCUBE_NAME "ctedispcube"
... ... @@ -42,7 +42,7 @@
42 42 *
43 43 * @brief Energy dispersion cube generation tool
44 44 ***************************************************************************/
45   -class ctedispcube : public ctool {
  45 +class ctedispcube : public ctobservation {
46 46  
47 47 public:
48 48 // Constructors and destructors
... ... @@ -75,7 +75,6 @@ protected:
75 75 GChatter m_chatter; //!< Chattiness
76 76  
77 77 // Protected members
78   - GObservations m_obs; //!< Observation container
79 78 GCTACubeEdisp m_edispcube; //!< Energy dispersion cube
80 79 };
81 80  
... ...
src/ctexpcube/ctexpcube.cpp
... ... @@ -50,7 +50,7 @@
50 50 /***********************************************************************//**
51 51 * @brief Void constructor
52 52 ***************************************************************************/
53   -ctexpcube::ctexpcube(void) : ctool(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
  53 +ctexpcube::ctexpcube(void) : ctobservation(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
54 54 {
55 55 // Initialise members
56 56 init_members();
... ... @@ -69,14 +69,11 @@ ctexpcube::ctexpcube(void) : ctool(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
69 69 * observations container.
70 70 ***************************************************************************/
71 71 ctexpcube::ctexpcube(const GObservations& obs) :
72   - ctool(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
  72 + ctobservation(CTEXPCUBE_NAME, CTEXPCUBE_VERSION, obs)
73 73 {
74 74 // Initialise members
75 75 init_members();
76 76  
77   - // Set observations
78   - m_obs = obs;
79   -
80 77 // Return
81 78 return;
82 79 }
... ... @@ -90,7 +87,7 @@ ctexpcube::ctexpcube(const GObservations&amp; obs) :
90 87 * @param[in] argv Array of command line arguments.
91 88 ***************************************************************************/
92 89 ctexpcube::ctexpcube(int argc, char *argv[]) :
93   - ctool(CTEXPCUBE_NAME, CTEXPCUBE_VERSION, argc, argv)
  90 + ctobservation(CTEXPCUBE_NAME, CTEXPCUBE_VERSION, argc, argv)
94 91 {
95 92 // Initialise members
96 93 init_members();
... ... @@ -105,7 +102,7 @@ ctexpcube::ctexpcube(int argc, char *argv[]) :
105 102 *
106 103 * @param[in] app Application.
107 104 ***************************************************************************/
108   -ctexpcube::ctexpcube(const ctexpcube& app) : ctool(app)
  105 +ctexpcube::ctexpcube(const ctexpcube& app) : ctobservation(app)
109 106 {
110 107 // Initialise members
111 108 init_members();
... ... @@ -149,7 +146,7 @@ ctexpcube&amp; ctexpcube::operator=(const ctexpcube&amp; app)
149 146 if (this != &app) {
150 147  
151 148 // Copy base class members
152   - this->ctool::operator=(app);
  149 + this->ctobservation::operator=(app);
153 150  
154 151 // Free members
155 152 free_members();
... ... @@ -182,6 +179,7 @@ void ctexpcube::clear(void)
182 179 {
183 180 // Free members
184 181 free_members();
  182 + this->ctobservation::free_members();
185 183 this->ctool::free_members();
186 184  
187 185 // Clear base class (needed to conserve tool name and version)
... ... @@ -189,6 +187,7 @@ void ctexpcube::clear(void)
189 187  
190 188 // Initialise members
191 189 this->ctool::init_members();
  190 + this->ctobservation::init_members();
192 191 init_members();
193 192  
194 193 // Write header into logger
... ... @@ -322,7 +321,6 @@ void ctexpcube::init_members(void)
322 321 m_chatter = static_cast<GChatter>(2);
323 322  
324 323 // Initialise protected members
325   - m_obs.clear();
326 324 m_expcube.clear();
327 325  
328 326 // Return
... ... @@ -344,7 +342,6 @@ void ctexpcube::copy_members(const ctexpcube&amp; app)
344 342 m_chatter = app.m_chatter;
345 343  
346 344 // Copy protected members
347   - m_obs = app.m_obs;
348 345 m_expcube = app.m_expcube;
349 346  
350 347 // Return
... ...
src/ctexpcube/ctexpcube.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTEXPCUBE_NAME "ctexpcube"
... ... @@ -42,7 +42,7 @@
42 42 *
43 43 * @brief Exposure cube generation tool
44 44 ***************************************************************************/
45   -class ctexpcube : public ctool {
  45 +class ctexpcube : public ctobservation {
46 46  
47 47 public:
48 48 // Constructors and destructors
... ... @@ -77,7 +77,6 @@ protected:
77 77 GChatter m_chatter; //!< Chattiness
78 78  
79 79 // Protected members
80   - GObservations m_obs; //!< Observation container
81 80 GCTACubeExposure m_expcube; //!< Exposure cube
82 81 };
83 82  
... ...
src/ctmodel/ctmodel.cpp
... ... @@ -53,7 +53,7 @@ const GEnergy g_energy_margin(1.0e-12, &quot;TeV&quot;);
53 53 /***********************************************************************//**
54 54 * @brief Void constructor
55 55 ***************************************************************************/
56   -ctmodel::ctmodel(void) : ctool(CTMODEL_NAME, CTMODEL_VERSION)
  56 +ctmodel::ctmodel(void) : ctobservation(CTMODEL_NAME, CTMODEL_VERSION)
57 57 {
58 58 // Initialise members
59 59 init_members();
... ... @@ -71,14 +71,12 @@ ctmodel::ctmodel(void) : ctool(CTMODEL_NAME, CTMODEL_VERSION)
71 71 * This method creates an instance of the class by copying an existing
72 72 * observations container.
73 73 ***************************************************************************/
74   -ctmodel::ctmodel(const GObservations& obs) : ctool(CTMODEL_NAME, CTMODEL_VERSION)
  74 +ctmodel::ctmodel(const GObservations& obs) :
  75 + ctobservation(CTMODEL_NAME, CTMODEL_VERSION, obs)
75 76 {
76 77 // Initialise members
77 78 init_members();
78 79  
79   - // Set observations
80   - m_obs = obs;
81   -
82 80 // Return
83 81 return;
84 82 }
... ... @@ -92,7 +90,7 @@ ctmodel::ctmodel(const GObservations&amp; obs) : ctool(CTMODEL_NAME, CTMODEL_VERSION
92 90 * @param[in] argv Array of command line arguments.
93 91 ***************************************************************************/
94 92 ctmodel::ctmodel(int argc, char *argv[]) :
95   - ctool(CTMODEL_NAME, CTMODEL_VERSION, argc, argv)
  93 + ctobservation(CTMODEL_NAME, CTMODEL_VERSION, argc, argv)
96 94 {
97 95 // Initialise members
98 96 init_members();
... ... @@ -107,7 +105,7 @@ ctmodel::ctmodel(int argc, char *argv[]) :
107 105 *
108 106 * @param[in] app Application.
109 107 ***************************************************************************/
110   -ctmodel::ctmodel(const ctmodel& app) : ctool(app)
  108 +ctmodel::ctmodel(const ctmodel& app) : ctobservation(app)
111 109 {
112 110 // Initialise members
113 111 init_members();
... ... @@ -151,7 +149,7 @@ ctmodel&amp; ctmodel::operator=(const ctmodel&amp; app)
151 149 if (this != &app) {
152 150  
153 151 // Copy base class members
154   - this->ctool::operator=(app);
  152 + this->ctobservation::operator=(app);
155 153  
156 154 // Free members
157 155 free_members();
... ... @@ -184,6 +182,7 @@ void ctmodel::clear(void)
184 182 {
185 183 // Free members
186 184 free_members();
  185 + this->ctobservation::free_members();
187 186 this->ctool::free_members();
188 187  
189 188 // Clear base class (needed to conserve tool name and version)
... ... @@ -191,6 +190,7 @@ void ctmodel::clear(void)
191 190  
192 191 // Initialise members
193 192 this->ctool::init_members();
  193 + this->ctobservation::init_members();
194 194 init_members();
195 195  
196 196 // Write header into logger
... ... @@ -391,7 +391,6 @@ void ctmodel::init_members(void)
391 391 m_chatter = static_cast<GChatter>(2);
392 392  
393 393 // Initialise protected members
394   - m_obs.clear();
395 394 m_cube.clear();
396 395 m_gti.clear();
397 396 m_has_cube = false;
... ... @@ -417,7 +416,6 @@ void ctmodel::copy_members(const ctmodel&amp; app)
417 416 m_chatter = app.m_chatter;
418 417  
419 418 // Copy protected members
420   - m_obs = app.m_obs;
421 419 m_cube = app.m_cube;
422 420 m_gti = app.m_gti;
423 421 m_has_cube = app.m_has_cube;
... ...
src/ctmodel/ctmodel.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTMODEL_NAME "ctmodel"
... ... @@ -51,7 +51,7 @@
51 51 * in form of FITS files (model maps) and an updated observation definition
52 52 * XML file.
53 53 ***************************************************************************/
54   -class ctmodel : public ctool {
  54 +class ctmodel : public ctobservation {
55 55  
56 56 public:
57 57 // Constructors and destructors
... ... @@ -69,7 +69,6 @@ public:
69 69 void run(void);
70 70 void save(void);
71 71 void publish(const std::string& name = "");
72   - const GObservations& obs(void) const;
73 72 const GCTAEventCube& cube(void) const;
74 73 void cube(const GCTAEventCube& cube);
75 74 void models(const GModels& models);
... ... @@ -91,7 +90,6 @@ protected:
91 90 GChatter m_chatter; //!< Chattiness
92 91  
93 92 // Protected members
94   - GObservations m_obs; //!< Observation container
95 93 GCTAEventCube m_cube; //!< Model cube
96 94 GGti m_gti; //!< Model cube GTIs
97 95 bool m_has_cube; //!< Signal if cube has been set or loaded
... ... @@ -101,18 +99,6 @@ protected:
101 99  
102 100  
103 101 /***********************************************************************//**
104   - * @brief Return observation container
105   - *
106   - * @return Reference to observation container.
107   - ***************************************************************************/
108   -inline
109   -const GObservations& ctmodel::obs(void) const
110   -{
111   - return m_obs;
112   -}
113   -
114   -
115   -/***********************************************************************//**
116 102 * @brief Return model cube
117 103 *
118 104 * @return Reference to model cube.
... ...
src/ctobssim/ctobssim.cpp
... ... @@ -63,7 +63,7 @@ const double g_roi_margin = 0.5; //!&lt; Simulation radius margin (degrees)
63 63 *
64 64 * Constructs an empty ctobssim tool.
65 65 ***************************************************************************/
66   -ctobssim::ctobssim(void) : ctool(CTOBSSIM_NAME, CTOBSSIM_VERSION)
  66 +ctobssim::ctobssim(void) : ctobservation(CTOBSSIM_NAME, CTOBSSIM_VERSION)
67 67 {
68 68 // Initialise members
69 69 init_members();
... ... @@ -81,14 +81,11 @@ ctobssim::ctobssim(void) : ctool(CTOBSSIM_NAME, CTOBSSIM_VERSION)
81 81 * Constructs ctobssim tool from an observation container.
82 82 ***************************************************************************/
83 83 ctobssim::ctobssim(const GObservations& obs) :
84   - ctool(CTOBSSIM_NAME, CTOBSSIM_VERSION)
  84 + ctobservation(CTOBSSIM_NAME, CTOBSSIM_VERSION, obs)
85 85 {
86 86 // Initialise members
87 87 init_members();
88 88  
89   - // Set observations
90   - m_obs = obs;
91   -
92 89 // Return
93 90 return;
94 91 }
... ... @@ -104,7 +101,7 @@ ctobssim::ctobssim(const GObservations&amp; obs) :
104 101 * setting.
105 102 ***************************************************************************/
106 103 ctobssim::ctobssim(int argc, char *argv[]) :
107   - ctool(CTOBSSIM_NAME, CTOBSSIM_VERSION, argc, argv)
  104 + ctobservation(CTOBSSIM_NAME, CTOBSSIM_VERSION, argc, argv)
108 105 {
109 106 // Initialise members
110 107 init_members();
... ... @@ -121,7 +118,7 @@ ctobssim::ctobssim(int argc, char *argv[]) :
121 118 *
122 119 * Constructs ctobssim tool from another ctobssim instance.
123 120 ***************************************************************************/
124   -ctobssim::ctobssim(const ctobssim& app) : ctool(app)
  121 +ctobssim::ctobssim(const ctobssim& app) : ctobservation(app)
125 122 {
126 123 // Initialise members
127 124 init_members();
... ... @@ -169,7 +166,7 @@ ctobssim&amp; ctobssim::operator=(const ctobssim&amp; app)
169 166 if (this != &app) {
170 167  
171 168 // Copy base class members
172   - this->ctool::operator=(app);
  169 + this->ctobservation::operator=(app);
173 170  
174 171 // Free members
175 172 free_members();
... ... @@ -202,6 +199,7 @@ void ctobssim::clear(void)
202 199 {
203 200 // Free members
204 201 free_members();
  202 + this->ctobservation::free_members();
205 203 this->ctool::free_members();
206 204  
207 205 // Clear base class (needed to conserve tool name and version)
... ... @@ -209,6 +207,7 @@ void ctobssim::clear(void)
209 207  
210 208 // Initialise members
211 209 this->ctool::init_members();
  210 + this->ctobservation::init_members();
212 211 init_members();
213 212  
214 213 // Write header into logger
... ... @@ -484,7 +483,6 @@ void ctobssim::init_members(void)
484 483  
485 484 // Initialise protected members
486 485 m_rans.clear();
487   - m_obs.clear();
488 486 m_save_and_dispose = false;
489 487  
490 488 // Set fixed parameters
... ... @@ -516,7 +514,6 @@ void ctobssim::copy_members(const ctobssim&amp; app)
516 514 // Copy protected members
517 515 m_max_photons = app.m_max_photons;
518 516 m_rans = app.m_rans;
519   - m_obs = app.m_obs;
520 517 m_save_and_dispose = app.m_save_and_dispose;
521 518 m_event_id = app.m_event_id;
522 519  
... ...
src/ctobssim/ctobssim.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTOBSSIM_NAME "ctobssim"
... ... @@ -48,7 +48,7 @@
48 48 * processed and the save method is called, events FITS files will be written
49 49 * for each observation.
50 50 ***************************************************************************/
51   -class ctobssim : public ctool {
  51 +class ctobssim : public ctobservation {
52 52  
53 53 public:
54 54 // Constructors and destructors
... ... @@ -65,7 +65,6 @@ public:
65 65 void clear(void);
66 66 void run(void);
67 67 void save(void);
68   - const GObservations& obs(void) const;
69 68 const double& max_rate(void) const;
70 69 void max_rate(const double& max_rate);
71 70  
... ... @@ -141,7 +140,6 @@ protected:
141 140 bool m_apply_edisp; //!< Apply energy dispersion?
142 141  
143 142 // Protected members
144   - mutable GObservations m_obs; //!< Observation container
145 143 mutable bool m_save_and_dispose; //!< Save and dispose immediately
146 144 int m_max_photons; //!< Maximum number of photons/slice
147 145 double m_max_rate; //!< Maximum photon rate
... ... @@ -151,18 +149,6 @@ protected:
151 149  
152 150  
153 151 /***********************************************************************//**
154   - * @brief Return observation container
155   - *
156   - * @return Reference to observation container
157   - ***************************************************************************/
158   -inline
159   -const GObservations& ctobssim::obs(void) const
160   -{
161   - return (m_obs);
162   -}
163   -
164   -
165   -/***********************************************************************//**
166 152 * @brief Return maximum photon rate
167 153 *
168 154 * @return Reference to maximum photon rate.
... ...
src/ctpsfcube/ctpsfcube.cpp
... ... @@ -49,7 +49,7 @@
49 49 /***********************************************************************//**
50 50 * @brief Void constructor
51 51 ***************************************************************************/
52   -ctpsfcube::ctpsfcube(void) : ctool(CTPSFCUBE_NAME, CTPSFCUBE_VERSION)
  52 +ctpsfcube::ctpsfcube(void) : ctobservation(CTPSFCUBE_NAME, CTPSFCUBE_VERSION)
53 53 {
54 54 // Initialise members
55 55 init_members();
... ... @@ -68,14 +68,11 @@ ctpsfcube::ctpsfcube(void) : ctool(CTPSFCUBE_NAME, CTPSFCUBE_VERSION)
68 68 * observations container.
69 69 ***************************************************************************/
70 70 ctpsfcube::ctpsfcube(const GObservations& obs) :
71   - ctool(CTPSFCUBE_NAME, CTPSFCUBE_VERSION)
  71 + ctobservation(CTPSFCUBE_NAME, CTPSFCUBE_VERSION, obs)
72 72 {
73 73 // Initialise members
74 74 init_members();
75 75  
76   - // Set observations
77   - m_obs = obs;
78   -
79 76 // Return
80 77 return;
81 78 }
... ... @@ -89,7 +86,7 @@ ctpsfcube::ctpsfcube(const GObservations&amp; obs) :
89 86 * @param[in] argv Array of command line arguments.
90 87 ***************************************************************************/
91 88 ctpsfcube::ctpsfcube(int argc, char *argv[]) :
92   - ctool(CTPSFCUBE_NAME, CTPSFCUBE_VERSION, argc, argv)
  89 + ctobservation(CTPSFCUBE_NAME, CTPSFCUBE_VERSION, argc, argv)
93 90 {
94 91 // Initialise members
95 92 init_members();
... ... @@ -104,7 +101,7 @@ ctpsfcube::ctpsfcube(int argc, char *argv[]) :
104 101 *
105 102 * @param[in] app Application.
106 103 ***************************************************************************/
107   -ctpsfcube::ctpsfcube(const ctpsfcube& app) : ctool(app)
  104 +ctpsfcube::ctpsfcube(const ctpsfcube& app) : ctobservation(app)
108 105 {
109 106 // Initialise members
110 107 init_members();
... ... @@ -148,7 +145,7 @@ ctpsfcube&amp; ctpsfcube::operator=(const ctpsfcube&amp; app)
148 145 if (this != &app) {
149 146  
150 147 // Copy base class members
151   - this->ctool::operator=(app);
  148 + this->ctobservation::operator=(app);
152 149  
153 150 // Free members
154 151 free_members();
... ... @@ -181,6 +178,7 @@ void ctpsfcube::clear(void)
181 178 {
182 179 // Free members
183 180 free_members();
  181 + this->ctobservation::free_members();
184 182 this->ctool::free_members();
185 183  
186 184 // Clear base class (needed to conserve tool name and version)
... ... @@ -188,6 +186,7 @@ void ctpsfcube::clear(void)
188 186  
189 187 // Initialise members
190 188 this->ctool::init_members();
  189 + this->ctobservation::init_members();
191 190 init_members();
192 191  
193 192 // Write header into logger
... ... @@ -283,7 +282,6 @@ void ctpsfcube::init_members(void)
283 282 m_chatter = static_cast<GChatter>(2);
284 283  
285 284 // Initialise protected members
286   - m_obs.clear();
287 285 m_psfcube.clear();
288 286  
289 287 // Return
... ... @@ -304,7 +302,6 @@ void ctpsfcube::copy_members(const ctpsfcube&amp; app)
304 302 m_chatter = app.m_chatter;
305 303  
306 304 // Copy protected members
307   - m_obs = app.m_obs;
308 305 m_psfcube = app.m_psfcube;
309 306  
310 307 // Return
... ...
src/ctpsfcube/ctpsfcube.hpp
... ... @@ -30,7 +30,7 @@
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include "GammaLib.hpp"
32 32 #include "GCTALib.hpp"
33   -#include "ctool.hpp"
  33 +#include "ctobservation.hpp"
34 34  
35 35 /* __Definitions _________________________________________________________ */
36 36 #define CTPSFCUBE_NAME "ctpsfcube"
... ... @@ -42,7 +42,7 @@
42 42 *
43 43 * @brief PSF cube generation tool
44 44 ***************************************************************************/
45   -class ctpsfcube : public ctool {
  45 +class ctpsfcube : public ctobservation {
46 46  
47 47 public:
48 48 // Constructors and destructors
... ... @@ -75,7 +75,6 @@ protected:
75 75 GChatter m_chatter; //!< Chattiness
76 76  
77 77 // Protected members
78   - GObservations m_obs; //!< Observation container
79 78 GCTACubePsf m_psfcube; //!< PSF cube
80 79 };
81 80  
... ...
src/ctselect/ctselect.cpp
... ... @@ -53,7 +53,7 @@
53 53 /***********************************************************************//**
54 54 * @brief Void constructor
55 55 ***************************************************************************/
56   -ctselect::ctselect(void) : ctool(CTSELECT_NAME, CTSELECT_VERSION)
  56 +ctselect::ctselect(void) : ctobservation(CTSELECT_NAME, CTSELECT_VERSION)
57 57 {
58 58 // Initialise members
59 59 init_members();
... ... @@ -72,14 +72,11 @@ ctselect::ctselect(void) : ctool(CTSELECT_NAME, CTSELECT_VERSION)
72 72 * provided in an observation container.
73 73 ***************************************************************************/
74 74 ctselect::ctselect(const GObservations& obs) :
75   - ctool(CTSELECT_NAME, CTSELECT_VERSION)
  75 + ctobservation(CTSELECT_NAME, CTSELECT_VERSION, obs)
76 76 {
77 77 // Initialise members
78 78 init_members();
79 79  
80   - // Set observations
81   - m_obs = obs;
82   -
83 80 // Return
84 81 return;
85 82 }
... ... @@ -94,7 +91,7 @@ ctselect::ctselect(const GObservations&amp; obs) :
94 91 * @param[in] argv Array of command line arguments.
95 92 ***************************************************************************/
96 93 ctselect::ctselect(int argc, char *argv[]) :
97   - ctool(CTSELECT_NAME, CTSELECT_VERSION, argc, argv)
  94 + ctobservation(CTSELECT_NAME, CTSELECT_VERSION, argc, argv)
98 95 {
99 96 // Initialise members
100 97 init_members();
... ... @@ -109,7 +106,7 @@ ctselect::ctselect(int argc, char *argv[]) :
109 106 *
110 107 * @param[in] app Application.
111 108 ***************************************************************************/
112   -ctselect::ctselect(const ctselect& app) : ctool(app)
  109 +ctselect::ctselect(const ctselect& app) : ctobservation(app)
113 110 {
114 111 // Initialise members
115 112 init_members();
... ... @@ -153,7 +150,7 @@ ctselect&amp; ctselect::operator=(const ctselect&amp; app)
153 150 if (this != &app) {
154 151  
155 152 // Copy base class members
156   - this->ctool::operator=(app);
  153 + this->ctobservation::operator=(app);
157 154  
158 155 // Free members
159 156 free_members();
... ... @@ -186,6 +183,7 @@ void ctselect::clear(void)
186 183 {
187 184 // Free members
188 185 free_members();
  186 + this->ctobservation::free_members();
189 187 this->ctool::free_members();
190 188  
191 189 // Clear base class (needed to conserve tool name and version)
... ... @@ -193,6 +191,7 @@ void ctselect::clear(void)
193 191  
194 192 // Initialise members
195 193 this->ctool::init_members();
  194 + this->ctobservation::init_members();
196 195 init_members();
197 196  
198 197 // Write header into logger
... ... @@ -418,7 +417,6 @@ void ctselect::init_members(void)
418 417 m_chatter = static_cast<GChatter>(2);
419 418  
420 419 // Initialise protected members
421   - m_obs.clear();
422 420 m_infiles.clear();
423 421 m_evtname.clear();
424 422 m_gtiname.clear();
... ... @@ -454,7 +452,6 @@ void ctselect::copy_members(const ctselect&amp; app)
454 452 m_chatter = app.m_chatter;
455 453  
456 454 // Copy protected members
457   - m_obs = app.m_obs;
458 455 m_infiles = app.m_infiles;
459 456 m_evtname = app.m_evtname;
460 457 m_gtiname = app.m_gtiname;
... ...
src/ctselect/ctselect.hpp
... ... @@ -32,7 +32,7 @@
32 32 #include <string>
33 33 #include "GammaLib.hpp"
34 34 #include "GCTALib.hpp"
35   -#include "ctool.hpp"
  35 +#include "ctobservation.hpp"
36 36  
37 37 /* __Definitions _________________________________________________________ */
38 38 #define CTSELECT_NAME "ctselect"
... ... @@ -44,7 +44,7 @@
44 44 *
45 45 * @brief Data selection tool
46 46 ***************************************************************************/
47   -class ctselect : public ctool {
  47 +class ctselect : public ctobservation {
48 48  
49 49 public:
50 50 // Constructors and destructors
... ... @@ -61,7 +61,6 @@ public:
61 61 void clear(void);
62 62 void run(void);
63 63 void save(void);
64   - const GObservations& obs(void) const;
65 64  
66 65 protected:
67 66 // Protected methods
... ... @@ -102,7 +101,6 @@ protected:
102 101 GChatter m_chatter; //!< Chattiness
103 102  
104 103 // Protected members
105   - GObservations m_obs; //!< Observations container
106 104 std::vector<std::string> m_infiles; //!< Input event filenames
107 105 std::vector<std::string> m_evtname; //!< Event extension names
108 106 std::vector<std::string> m_gtiname; //!< GTI extension names
... ... @@ -114,15 +112,4 @@ protected:
114 112 };
115 113  
116 114  
117   -/***********************************************************************//**
118   - * @brief Return observation container
119   - *
120   - * @return Reference to observation container
121   - ***************************************************************************/
122   -inline
123   -const GObservations& ctselect::obs(void) const
124   -{
125   - return m_obs;
126   -}
127   -
128 115 #endif /* CTSELECT_HPP */
... ...