ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctpsfcube.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * ctpsfcube - PSF cube generation tool *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2014-2022 by Chia-Chun Lu *
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 ctpsfcube.hpp
23  * @brief PSF cube generation tool definition
24  * @author Chia-Chun Lu
25  */
26 
27 #ifndef CTPSFCUBE_HPP
28 #define CTPSFCUBE_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include "GammaLib.hpp"
32 #include "GCTALib.hpp"
33 #include "ctobservation.hpp"
34 
35 /* __Definitions _________________________________________________________ */
36 #define CTPSFCUBE_NAME "ctpsfcube"
37 
38 
39 /***********************************************************************//**
40  * @class ctpsfcube
41  *
42  * @brief PSF cube generation tool
43  ***************************************************************************/
44 class ctpsfcube : public ctobservation {
45 
46 public:
47  // Constructors and destructors
48  ctpsfcube(void);
49  explicit ctpsfcube(const GObservations& obs);
50  ctpsfcube(int argc, char *argv[]);
51  ctpsfcube(const ctpsfcube& app);
52  virtual ~ctpsfcube(void);
53 
54  // Operators
55  ctpsfcube& operator=(const ctpsfcube& app);
56 
57  // Methods
58  void clear(void);
59  void process(void);
60  void save(void);
61  const GCTACubePsf& psfcube(void) const;
62 
63 protected:
64  // Protected methods
65  void init_members(void);
66  void copy_members(const ctpsfcube& 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 PSF cube file name
73  bool m_addbounds; //!< Add energies at boundaries?
74  GChatter m_chatter; //!< Chattiness
75 
76  // Protected members
77  GCTACubePsf m_psfcube; //!< PSF cube
78 };
79 
80 
81 /***********************************************************************//**
82  * @brief Return PSF cube
83  *
84  * @return PSF cube
85  ***************************************************************************/
86 inline
87 const GCTACubePsf& ctpsfcube::psfcube(void) const
88 {
89  return (m_psfcube);
90 }
91 
92 #endif /* CTPSFCUBE_HPP */
ctpsfcube(void)
Void constructor.
Definition: ctpsfcube.cpp:52
GChatter m_chatter
Chattiness.
Definition: ctpsfcube.hpp:74
const GObservations & obs(void) const
Return observation container.
const GCTACubePsf & psfcube(void) const
Return PSF cube.
Definition: ctpsfcube.hpp:87
void process(void)
Generate the model map(s)
Definition: ctpsfcube.cpp:207
void get_parameters(void)
Get application parameters.
Definition: ctpsfcube.cpp:332
void free_members(void)
Delete class members.
Definition: ctpsfcube.cpp:319
void save(void)
Save PSF cube.
Definition: ctpsfcube.cpp:241
void init_members(void)
Initialise class members.
Definition: ctpsfcube.cpp:281
virtual ~ctpsfcube(void)
Destructor.
Definition: ctpsfcube.cpp:120
Observation tool base class interface definition.
Base class for observation tools.
PSF cube generation tool.
Definition: ctpsfcube.hpp:44
GCTACubePsf m_psfcube
PSF cube.
Definition: ctpsfcube.hpp:77
void clear(void)
Clear ctpsfcube tool.
Definition: ctpsfcube.cpp:177
void copy_members(const ctpsfcube &app)
Copy class members.
Definition: ctpsfcube.cpp:301
void init_cube(void)
Initialise PSF cube.
Definition: ctpsfcube.cpp:372
GFilename m_outcube
Output PSF cube file name.
Definition: ctpsfcube.hpp:72
bool m_addbounds
Add energies at boundaries?
Definition: ctpsfcube.hpp:73
ctpsfcube & operator=(const ctpsfcube &app)
Assignment operator.
Definition: ctpsfcube.cpp:142