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]
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
eigen/3.3.8
boost/1.75.0
......@@ -11,6 +12,7 @@ arrow/2.0.0
cmake
[options]
readline:shared=True
arrow:shared=False
arrow:parquet=True
arrow:fPIC=False
......@@ -23,3 +25,4 @@ arrow:with_grpc=False
arrow:with_utf8proc=False
arrow:with_zstd=False
arrow:with_bz2=False
......@@ -10,6 +10,6 @@
namespace corsika {
BaseOutput::BaseOutput()
: shower_(0){}
: shower_(0) {}
}
} // namespace corsika
......@@ -21,7 +21,7 @@
namespace corsika {
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
YAML::Emitter out;
......@@ -92,7 +92,7 @@ namespace corsika {
auto const path{root_ / name};
// create the directory for this process.
std::filesystem::create_directory(path);
boost::filesystem::create_directory(path);
// get the config for this output
auto config = outputs_.at(name).get().getConfig();
......@@ -106,12 +106,12 @@ namespace corsika {
OutputManager::OutputManager(
std::string const& name,
std::filesystem::path const& dir = std::filesystem::current_path())
boost::filesystem::path const& dir = boost::filesystem::current_path())
: name_(name)
, root_(dir / name) {
// check if this directory already exists
if (std::filesystem::exists(root_)) {
if (boost::filesystem::exists(root_)) {
logger->warn(
"Output directory '{}' already exists! This is currenty not supported.",
root_.string());
......@@ -119,7 +119,7 @@ namespace corsika {
}
// construct the directory for this library
std::filesystem::create_directory(root_);
boost::filesystem::create_directory(root_);
// write the top level config file
writeTopLevelConfig();
......
......@@ -7,8 +7,7 @@
*/
#pragma once
//#include <memory>
#include <filesystem>
#include <boost/filesystem>
#include <yaml-cpp/yaml.h>
......@@ -29,7 +28,7 @@ namespace corsika {
/**
* 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.
......
......@@ -9,7 +9,7 @@
#include <chrono>
#include <string>
#include <filesystem>
#include <boost/filesystem.hpp>
#include <corsika/output/BaseOutput.hpp>
#include <corsika/framework/core/Logging.hpp>
......@@ -32,7 +32,7 @@ namespace corsika {
OutputState state_{OutputState::NoInit}; ///< The current state of this manager.
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.
std::chrono::time_point<std::chrono::system_clock> const start_time{
std::chrono::system_clock::now()}; ///< The time the manager is created.
......@@ -45,7 +45,7 @@ namespace corsika {
/**
* 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.
......@@ -69,7 +69,7 @@ namespace corsika {
* @param name The name of this output collection.
* @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.
......
......@@ -23,7 +23,6 @@
#include <corsika/media/MediumPropertyModel.hpp>
#include <corsika/media/UniformMagneticField.hpp>
#include <corsika/setup/SetupEnvironment.hpp>
#include <corsika/setup/SetupStack.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