Skip to content

Commit

Permalink
Refresh project
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Moritz Maurer committed Oct 19, 2024
1 parent c074f01 commit 6c8ef32
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 914 deletions.
5 changes: 0 additions & 5 deletions dev/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ project(lightning-app)

add_executable(app src/main.cpp)
target_link_libraries(app
PRIVATE
data_processing
constants
yaml-cpp
${Boost_LIBRARIES}
)
57 changes: 0 additions & 57 deletions dev/app/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,60 +1,3 @@
#include <constants/constants.h>
#include <data_processing/config.h>
#include <yaml-cpp/yaml.h>

#include <boost/program_options.hpp>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>

namespace po = boost::program_options;
namespace dpc = flash::data_processing::config;
namespace tp = flash::types;

po::variables_map loadCommandLineArguments(int argc, char* argv[]) {

po::options_description desc("Allowed options");
desc.add_options()("help,h", "produce help message")(
"config-file,i", po::value<std::string>()->default_value("config.yaml"), "set path to a config.yaml");

po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);

if (vm.count("help")) {
std::cout << desc << std::endl;
std::exception();
}

return vm;
}

dpc::Config setupConfigParameters(po::variables_map commandLineArguments) {

auto configFile = commandLineArguments["config-file"].as<std::string>();
std::cout << "Load configuration from " << configFile << std::endl;
try {
auto configNode = YAML::LoadFile(configFile);
auto params = dpc::Config(configNode);
params.validate();
return params;

} catch (YAML::BadFile BF) {
std::cerr << "Flash is terminating: "
<< "Could not open " << configFile << std::endl;
} catch (dpc::InvalidKeyException IKE) {
std::cerr << "Flash is terminating: " << IKE.what() << std::endl;
} catch (dpc::MissingKeyException MKE) {
std::cerr << "Flash is terminating: " << MKE.what() << std::endl;
} catch (dpc::InvalidConfigurationException ICE) {
std::cerr << "Flash is terminating: " << ICE.what() << std::endl;
}
}

int main(int argc, char* argv[]) {
auto commandLineArguments = loadCommandLineArguments(argc, argv);
auto configParameters = setupConfigParameters(commandLineArguments);


return 0;
}
8 changes: 0 additions & 8 deletions dev/libs/CMakeLists.txt

This file was deleted.

8 changes: 0 additions & 8 deletions dev/libs/constants/CMakeLists.txt

This file was deleted.

10 changes: 0 additions & 10 deletions dev/libs/constants/include/constants/constants.h

This file was deleted.

14 changes: 0 additions & 14 deletions dev/libs/constants/include/constants/precision.h

This file was deleted.

18 changes: 0 additions & 18 deletions dev/libs/data_processing/CMakeLists.txt

This file was deleted.

201 changes: 0 additions & 201 deletions dev/libs/data_processing/include/data_processing/config.h

This file was deleted.

29 changes: 0 additions & 29 deletions dev/libs/data_processing/include/data_processing/read_hdf5.h

This file was deleted.

Loading

0 comments on commit 6c8ef32

Please sign in to comment.