Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
GnuAstro.cpp
Go to the documentation of this file.
1
21#include <map> // for map
22#include <string> // for string
23
24#include <gnuastro/cosmology.h>
25#include <gnuastro/fits.h> // header file to test
26
27#include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
28#include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
29
30using std::map;
31using std::string;
32
33namespace Elements {
34namespace Examples {
35
36class GnuAstro : public Program {
37
38public:
40
41 auto log = Logging::getLogger("GnuAstroExample");
42
43 string test_upper_string{"THATSTRING"};
44 log.info() << "This is the test upper string: " << test_upper_string;
45
46 double z{2.5};
47 double H0{67.66};
48
49 auto age = gal_cosmology_age(z, H0, 0.0, 0.0, 0.0);
50
51 log.info() << "Age of the Universe @ z = " << z << " : " << age << " GA";
52
53 return ExitCode::OK;
54 }
55};
56
57} // namespace Examples
58} // namespace Elements
59
Macro to silence unused variables warnings from the compiler.
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
Definition: GnuAstro.cpp:39
Simple example of an Elements program.
Definition: Program.cpp:79
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
#define ELEMENTS_UNUSED
Definition: Unused.h:39
@ OK
Everything is OK.