ctools
2.1.0.dev
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
* ctbutterfly - TS map calculation tool *
3
* ----------------------------------------------------------------------- *
4
* copyright (C) 2014-2016 by Michael Mayer *
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 ctbutterfly/main.cpp
23
* @brief CTA butterfly computation tool
24
* @author Michael Mayer
25
*/
26
27
/* __ Includes ___________________________________________________________ */
28
#ifdef HAVE_CONFIG_H
29
#include <config.h>
30
#endif
31
#include "
support.hpp
"
32
#include "
ctbutterfly.hpp
"
33
34
35
/***********************************************************************/
/**
36
* @brief Main entry point of application
37
*
38
* @param[in] argc Number of command line arguments.
39
* @param[in] argv Command line arguments.
40
*
41
* This is the main entry point of the ctbutterfly application. It allocates
42
* a ctbutterfly object and executes the application. Any exceptions that
43
* occur will be catched and corresponding error messages written in the
44
* application logger and into the standard output.
45
***************************************************************************/
46
int
main
(
int
argc,
char
*argv[])
47
{
48
// Initialise return code
49
int
rc = 1;
50
51
// Initialise pointer on application
52
ctbutterfly
* application = NULL;
53
54
// Execute application
55
try
{
56
57
// Create instance of application
58
application =
new
ctbutterfly
(argc, argv);
59
60
// Execute ctool
61
rc =
execute_ctool
(application);
62
63
}
64
65
catch
(std::exception &e) {
66
67
// Report exception
68
report_ctool_failure
(
"ctbutterfly"
, e.what());
69
70
}
71
72
// Delete application
73
delete
application;
74
75
// Return
76
return
rc;
77
}
ctbutterfly
Butterfly calculation tool.
Definition
ctbutterfly.hpp:55
main
int main(int argc, char *argv[])
Main entry point of application.
Definition
main.cpp:46
ctbutterfly.hpp
Butterfly calculation tool interface definition.
report_ctool_failure
void report_ctool_failure(const std::string &name, const std::string &message)
Report ctool failure.
Definition
support.cpp:106
execute_ctool
int execute_ctool(ctool *tool)
Execute ctool.
Definition
support.cpp:58
support.hpp
Support function definitions.
src
ctbutterfly
main.cpp
Generated on Tue Jan 14 2025 17:09:51 for ctools by
1.11.0