Elements  5.10
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ElementsExamples/src/program/CCfitsExample.cpp

This is an example of how to use the getAuxiliaryPath function.

#include <map> // for map
#include <string> // for string
#include <boost/program_options.hpp> // for program options from configuration file of command line arguments
#include <CCfits/CCfits> // header file to test
#include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
#include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
using std::map;
using boost::program_options::variable_value;
namespace Elements {
namespace Examples {
class CCfitsExample: public Program {
public:
ExitCode mainMethod(ELEMENTS_UNUSED map<string, variable_value>& args) override {
auto log = Logging::getLogger("CCfitsExample");
string test_upper_string {"THATSTRING"};
log.info() << "This is the test upper string: " << test_upper_string;
string test_lower_string = CCfits::FITSUtil::lowerCase(test_upper_string);
log.info() << "This is the test lower string: " << test_lower_string;
log.info() << "done with test program! ";
auto fits_file_path = getAuxiliaryPath("ElementsExamples/phz_cat.fits");
log.info() << "Opening the file " << fits_file_path.string();
CCfits::FITS fits_file(fits_file_path.string());
CCfits::ExtHDU& extension = fits_file.extension(1);
log.info() << "Extension comments: " << extension.getComments();
return ExitCode::OK;
}
};
} // namespace Examples
} // namespace Elements