Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
CCfits.cpp
Go to the documentation of this file.
1
21#include <map> // for map
22#include <string> // for string
23
24#include <CCfits/CCfits> // header file to test
25
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 CCfits : public Program {
37
38public:
40
41 auto log = Logging::getLogger("CCfits");
42
43 string test_upper_string{"THATSTRING"};
44 log.info() << "This is the test upper string: " << test_upper_string;
45
46 string test_lower_string = ::CCfits::FITSUtil::lowerCase(test_upper_string);
47 log.info() << "This is the test lower string: " << test_lower_string;
48
49 log.info() << "done with test program! ";
50
51 auto fits_file_path = Auxiliary::getPath("ElementsExamples/phz_cat.fits");
52 log.info() << "Opening the file " << fits_file_path.string();
53 ::CCfits::FITS fits_file(fits_file_path.string());
54
55 ::CCfits::ExtHDU& extension = fits_file.extension(1);
56
57 log.info() << "Extension comments: " << extension.getComments();
58
59 return ExitCode::OK;
60 }
61};
62
63} // namespace Examples
64} // namespace Elements
65
provide functions to retrieve auxiliary files
Macro to silence unused variables warnings from the compiler.
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
Definition: CCfits.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.