ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctexpcube.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * ctexpcube - Exposure cube generation tool *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2014-2022 by Juergen Knoedlseder *
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 ctexpcube.hpp
23  * @brief Exposure cube generation tool definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef CTEXPCUBE_HPP
28 #define CTEXPCUBE_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include "GammaLib.hpp"
32 #include "GCTALib.hpp"
33 #include "ctobservation.hpp"
34 
35 /* __Definitions _________________________________________________________ */
36 #define CTEXPCUBE_NAME "ctexpcube"
37 
38 
39 /***********************************************************************//**
40  * @class ctexpcube
41  *
42  * @brief Exposure cube generation tool
43  ***************************************************************************/
44 class ctexpcube : public ctobservation {
45 
46 public:
47  // Constructors and destructors
48  ctexpcube(void);
49  explicit ctexpcube(const GObservations& obs);
50  ctexpcube(int argc, char *argv[]);
51  ctexpcube(const ctexpcube& app);
52  virtual ~ctexpcube(void);
53 
54  // Operators
55  ctexpcube& operator=(const ctexpcube& app);
56 
57  // Methods
58  void clear(void);
59  void process(void);
60  void save(void);
61  void publish(const std::string& name = "");
62  const GCTACubeExposure& expcube(void) const;
63 
64 protected:
65  // Protected methods
66  void init_members(void);
67  void copy_members(const ctexpcube& app);
68  void free_members(void);
69  void get_parameters(void);
70  void init_cube(void);
71 
72  // User parameters
73  GFilename m_outcube; //!< Output exposure cube file
74  bool m_addbounds; //!< Add energies at boundaries?
75  bool m_publish; //!< Publish exposure cube?
76  GChatter m_chatter; //!< Chattiness
77 
78  // Protected members
79  GCTACubeExposure m_expcube; //!< Exposure cube
80 };
81 
82 
83 /***********************************************************************//**
84  * @brief Return exposure cube
85  *
86  * @return Exposure cube
87  ***************************************************************************/
88 inline
89 const GCTACubeExposure& ctexpcube::expcube(void) const
90 {
91  return (m_expcube);
92 }
93 
94 #endif /* CTEXPCUBE_HPP */
void free_members(void)
Delete class members.
Definition: ctexpcube.cpp:357
GChatter m_chatter
Chattiness.
Definition: ctexpcube.hpp:76
void init_members(void)
Initialise class members.
Definition: ctexpcube.cpp:317
void process(void)
Generate the exposure cube(s).
Definition: ctexpcube.cpp:208
GCTACubeExposure m_expcube
Exposure cube.
Definition: ctexpcube.hpp:79
const GObservations & obs(void) const
Return observation container.
bool m_addbounds
Add energies at boundaries?
Definition: ctexpcube.hpp:74
bool m_publish
Publish exposure cube?
Definition: ctexpcube.hpp:75
ctexpcube & operator=(const ctexpcube &app)
Assignment operator.
Definition: ctexpcube.cpp:143
void copy_members(const ctexpcube &app)
Copy class members.
Definition: ctexpcube.cpp:338
Observation tool base class interface definition.
Base class for observation tools.
void save(void)
Save exposure cube.
Definition: ctexpcube.cpp:249
ctexpcube(void)
Void constructor.
Definition: ctexpcube.cpp:53
const GCTACubeExposure & expcube(void) const
Return exposure cube.
Definition: ctexpcube.hpp:89
void publish(const std::string &name="")
Publish exposure cube.
Definition: ctexpcube.cpp:286
void init_cube(void)
Initialise exposure cube.
Definition: ctexpcube.cpp:408
void get_parameters(void)
Get application parameters.
Definition: ctexpcube.cpp:370
virtual ~ctexpcube(void)
Destructor.
Definition: ctexpcube.cpp:121
void clear(void)
Clear ctexpcube tool.
Definition: ctexpcube.cpp:178
GFilename m_outcube
Output exposure cube file.
Definition: ctexpcube.hpp:73
Exposure cube generation tool.
Definition: ctexpcube.hpp:44