IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 1e8da207 authored by ralfulrich's avatar ralfulrich
Browse files

std to boost filesystem

parent 043e9534
No related branches found
No related tags found
No related merge requests found
[requires] [requires]
spdlog/1.8.0 readline/8.0 # this is only needed to fix a missing dependency in "bison" which is pulled-in by arrow
spdlog/1.8.5
catch2/2.13.3 catch2/2.13.3
eigen/3.3.8 eigen/3.3.8
boost/1.75.0 boost/1.75.0
...@@ -11,6 +12,7 @@ arrow/2.0.0 ...@@ -11,6 +12,7 @@ arrow/2.0.0
cmake cmake
[options] [options]
readline:shared=True
arrow:shared=False arrow:shared=False
arrow:parquet=True arrow:parquet=True
arrow:fPIC=False arrow:fPIC=False
...@@ -23,3 +25,4 @@ arrow:with_grpc=False ...@@ -23,3 +25,4 @@ arrow:with_grpc=False
arrow:with_utf8proc=False arrow:with_utf8proc=False
arrow:with_zstd=False arrow:with_zstd=False
arrow:with_bz2=False arrow:with_bz2=False
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
namespace corsika { namespace corsika {
BaseOutput::BaseOutput() BaseOutput::BaseOutput()
: shower_(0){} : shower_(0) {}
} } // namespace corsika
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
namespace corsika { namespace corsika {
void OutputManager::writeNode(YAML::Node const& node, void OutputManager::writeNode(YAML::Node const& node,
std::filesystem::path const& path) const { boost::filesystem::path const& path) const {
// construct a YAML emitter for this config file // construct a YAML emitter for this config file
YAML::Emitter out; YAML::Emitter out;
...@@ -92,7 +92,7 @@ namespace corsika { ...@@ -92,7 +92,7 @@ namespace corsika {
auto const path{root_ / name}; auto const path{root_ / name};
// create the directory for this process. // create the directory for this process.
std::filesystem::create_directory(path); boost::filesystem::create_directory(path);
// get the config for this output // get the config for this output
auto config = outputs_.at(name).get().getConfig(); auto config = outputs_.at(name).get().getConfig();
...@@ -106,12 +106,12 @@ namespace corsika { ...@@ -106,12 +106,12 @@ namespace corsika {
OutputManager::OutputManager( OutputManager::OutputManager(
std::string const& name, std::string const& name,
std::filesystem::path const& dir = std::filesystem::current_path()) boost::filesystem::path const& dir = boost::filesystem::current_path())
: name_(name) : name_(name)
, root_(dir / name) { , root_(dir / name) {
// check if this directory already exists // check if this directory already exists
if (std::filesystem::exists(root_)) { if (boost::filesystem::exists(root_)) {
logger->warn( logger->warn(
"Output directory '{}' already exists! This is currenty not supported.", "Output directory '{}' already exists! This is currenty not supported.",
root_.string()); root_.string());
...@@ -119,7 +119,7 @@ namespace corsika { ...@@ -119,7 +119,7 @@ namespace corsika {
} }
// construct the directory for this library // construct the directory for this library
std::filesystem::create_directory(root_); boost::filesystem::create_directory(root_);
// write the top level config file // write the top level config file
writeTopLevelConfig(); writeTopLevelConfig();
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
*/ */
#pragma once #pragma once
//#include <memory> #include <boost/filesystem>
#include <filesystem>
#include <yaml-cpp/yaml.h> #include <yaml-cpp/yaml.h>
...@@ -29,7 +28,7 @@ namespace corsika { ...@@ -29,7 +28,7 @@ namespace corsika {
/** /**
* Called at the start of each run. * Called at the start of each run.
*/ */
virtual void startOfLibrary(std::filesystem::path const& directory) = 0; virtual void startOfLibrary(boost::filesystem::path const& directory) = 0;
/** /**
* Called at the start of each event/shower. * Called at the start of each event/shower.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <chrono> #include <chrono>
#include <string> #include <string>
#include <filesystem> #include <boost/filesystem.hpp>
#include <corsika/output/BaseOutput.hpp> #include <corsika/output/BaseOutput.hpp>
#include <corsika/framework/core/Logging.hpp> #include <corsika/framework/core/Logging.hpp>
...@@ -32,7 +32,7 @@ namespace corsika { ...@@ -32,7 +32,7 @@ namespace corsika {
OutputState state_{OutputState::NoInit}; ///< The current state of this manager. OutputState state_{OutputState::NoInit}; ///< The current state of this manager.
std::string const name_; ///< The name of this simulation file. std::string const name_; ///< The name of this simulation file.
std::filesystem::path const root_; ///< The top-level directory for the output. boost::filesystem::path const root_; ///< The top-level directory for the output.
int count_{0}; ///< The current ID of this shower. int count_{0}; ///< The current ID of this shower.
std::chrono::time_point<std::chrono::system_clock> const start_time{ std::chrono::time_point<std::chrono::system_clock> const start_time{
std::chrono::system_clock::now()}; ///< The time the manager is created. std::chrono::system_clock::now()}; ///< The time the manager is created.
...@@ -45,7 +45,7 @@ namespace corsika { ...@@ -45,7 +45,7 @@ namespace corsika {
/** /**
* Write a YAML-node to a file. * Write a YAML-node to a file.
*/ */
void writeNode(YAML::Node const& node, std::filesystem::path const& path) const; void writeNode(YAML::Node const& node, boost::filesystem::path const& path) const;
/** /**
* Write the top-level config of this simulation. * Write the top-level config of this simulation.
...@@ -69,7 +69,7 @@ namespace corsika { ...@@ -69,7 +69,7 @@ namespace corsika {
* @param name The name of this output collection. * @param name The name of this output collection.
* @param dir The directory where the output directory will be stored. * @param dir The directory where the output directory will be stored.
*/ */
OutputManager(std::string const& name, std::filesystem::path const& dir); OutputManager(std::string const& name, boost::filesystem::path const& dir);
/** /**
* Handle graceful closure of the outputs upon destruction. * Handle graceful closure of the outputs upon destruction.
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <corsika/media/MediumPropertyModel.hpp> #include <corsika/media/MediumPropertyModel.hpp>
#include <corsika/media/UniformMagneticField.hpp> #include <corsika/media/UniformMagneticField.hpp>
#include <corsika/setup/SetupEnvironment.hpp> #include <corsika/setup/SetupEnvironment.hpp>
#include <corsika/setup/SetupStack.hpp> #include <corsika/setup/SetupStack.hpp>
#include <corsika/setup/SetupTrajectory.hpp> #include <corsika/setup/SetupTrajectory.hpp>
......
Subproject commit 820f042b6a055276d465437c74160ef7c199b646 Subproject commit 332e22472595377694e16163c76507f4c722556f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment