This is an example of how to use the Auxiliary::getPath function.
#include <map>
#include <string>
#include <CCfits/CCfits>
namespace Examples {
class CCfits : public Program {
public:
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 = Auxiliary::getPath("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();
}
};
}
}
provide functions to retrieve auxiliary files
Macro to silence unused variables warnings from the compiler.
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
static Logging getLogger(const std::string &name="")
Elements::ExitCode ExitCode
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)