Skip to content
Snippets Groups Projects
Commit 32db13a9 authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Adam Edward Barton
Browse files

Replace boost::filesystem with std::filesystem in Herwig interface

Replace boost::filesystem with std::filesystem in Herwig interface
parent 599f1e40
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
#include "PathResolver/PathResolver.h"
#include "boost/thread/thread.hpp"
#include "boost/filesystem.hpp"
#include <filesystem>
#include "boost/algorithm/string.hpp"
void convert_to_HepMC(const ThePEG::Event & m_event, HepMC::GenEvent & evt, bool nocopies,ThePEG::Energy eunit, ThePEG::Length lunit);
......@@ -261,16 +261,16 @@ StatusCode Herwig7::genFinalize() {
ThePEG::Repository::cleanup();
// possibly tidy up working directory
if (m_cleanup_herwig_scratch && (boost::filesystem::is_directory("Herwig-scratch") || boost::filesystem::is_directory("Herwig-cache"))){
if (m_cleanup_herwig_scratch && (std::filesystem::is_directory("Herwig-scratch") || std::filesystem::is_directory("Herwig-cache"))){
ATH_MSG_INFO("removing Herwig-scratch/Herwig-cache folder from "+boost::filesystem::current_path().string());
ATH_MSG_INFO("removing Herwig-scratch/Herwig-cache folder from "+std::filesystem::current_path().string());
// sleep for some time to allow all access to terminate
boost::this_thread::sleep(boost::posix_time::seconds(5)); /// \todo Think of other way to wait for all access to terminate
// in case the folder can't be deleted continue with warning
try {
(boost::filesystem::remove_all("Herwig-scratch") || boost::filesystem::remove_all("Herwig-cache"));
(std::filesystem::remove_all("Herwig-scratch") || std::filesystem::remove_all("Herwig-cache"));
}
catch (const std::exception& e) {
ATH_MSG_WARNING("Failed to delete the folder 'Herwig-scratch': "+std::string(e.what()));
......
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