Elements  6.0.1
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GnuAstroExample.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 
30 using std::map;
31 using std::string;
32 
33 namespace Elements {
34 namespace Examples {
35 
36 class GnuAstroExample : public Program {
37 
38 public:
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 
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
Macro to silence unused variables warnings from the compiler.
Everything is OK.
Abstract class for all Elements programs.
Definition: Program.h:52
STL class.
STL class.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63