ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctedispcube.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * ctedispcube - Energy dispersion cube generation tool *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2016-2022 by Maria Haupt *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file ctedispcube.hpp
23  * @brief Energy dispersion cube generation tool definition
24  * @author Chia-Chun Lu
25  */
26 
27 #ifndef CTEDISPCUBE_HPP
28 #define CTEDISPCUBE_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include "GammaLib.hpp"
32 #include "GCTALib.hpp"
33 #include "ctobservation.hpp"
34 
35 /* __Definitions _________________________________________________________ */
36 #define CTEDISPCUBE_NAME "ctedispcube"
37 
38 
39 /***********************************************************************//**
40  * @class ctedispcube
41  *
42  * @brief Energy dispersion cube generation tool
43  ***************************************************************************/
44 class ctedispcube : public ctobservation {
45 
46 public:
47  // Constructors and destructors
48  ctedispcube(void);
49  explicit ctedispcube(const GObservations& obs);
50  ctedispcube(int argc, char *argv[]);
51  ctedispcube(const ctedispcube& app);
52  virtual ~ctedispcube(void);
53 
54  // Operators
55  ctedispcube& operator=(const ctedispcube& app);
56 
57  // Methods
58  void clear(void);
59  void process(void);
60  void save(void);
61  const GCTACubeEdisp& edispcube(void) const;
62 
63 protected:
64  // Protected methods
65  void init_members(void);
66  void copy_members(const ctedispcube& app);
67  void free_members(void);
68  void get_parameters(void);
69  void init_cube(void);
70 
71  // User parameters
72  GFilename m_outcube; //!< Output exposure cube file
73  bool m_addbounds; //!< Add energies at boundaries?
74  GChatter m_chatter; //!< Chattiness
75 
76  // Protected members
77  GCTACubeEdisp m_edispcube; //!< Energy dispersion cube
78 };
79 
80 
81 /***********************************************************************//**
82  * @brief Return energy dispersion cube
83  *
84  * @return Energy dispersion cube
85  ***************************************************************************/
86 inline
87 const GCTACubeEdisp& ctedispcube::edispcube(void) const
88 {
89  return (m_edispcube);
90 }
91 
92 #endif /* CTEDISPCUBE_HPP */
ctedispcube & operator=(const ctedispcube &app)
Assignment operator.
void init_members(void)
Initialise class members.
bool m_addbounds
Add energies at boundaries?
Definition: ctedispcube.hpp:73
void save(void)
Save energy dispersion cube.
GFilename m_outcube
Output exposure cube file.
Definition: ctedispcube.hpp:72
void init_cube(void)
Initialise energy dispersion cube.
Energy dispersion cube generation tool.
Definition: ctedispcube.hpp:44
const GObservations & obs(void) const
Return observation container.
void free_members(void)
Delete class members.
void copy_members(const ctedispcube &app)
Copy class members.
void process(void)
Generate the energy dispersion cube.
const GCTACubeEdisp & edispcube(void) const
Return energy dispersion cube.
Definition: ctedispcube.hpp:87
Observation tool base class interface definition.
Base class for observation tools.
void clear(void)
Clear energy dispersion tool.
GChatter m_chatter
Chattiness.
Definition: ctedispcube.hpp:74
ctedispcube(void)
Void constructor.
Definition: ctedispcube.cpp:55
GCTACubeEdisp m_edispcube
Energy dispersion cube.
Definition: ctedispcube.hpp:77
void get_parameters(void)
Get application parameters.
virtual ~ctedispcube(void)
Destructor.