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