Skip to content

Commit 84ef60e

Browse files
wiechuladavidrohr
authored andcommitted
move to root function, since gcc7 has filesystem in experimental only
1 parent 32766d6 commit 84ef60e

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Detectors/TPC/simulation/run/convertDigitsToRawZS.cxx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@
1717
#include <memory>
1818
#include <vector>
1919
#include <fmt/format.h>
20-
#if __has_include(<filesystem>)
21-
#include <filesystem>
22-
#elif __has_include(<experimental/filesystem>)
23-
#include <experimental/filesystem>
24-
#endif
2520

2621
#include "TFile.h"
2722
#include "TTree.h"
2823
#include "TROOT.h"
24+
#include "TSystem.h"
2925

3026
#include "GPUO2Interface.h"
3127
#include "GPUReconstructionConvert.h"
@@ -46,11 +42,6 @@
4642
#include "CommonUtils/ConfigurableParam.h"
4743

4844
namespace bpo = boost::program_options;
49-
#if __has_include(<filesystem>)
50-
namespace fs = std::filesystem;
51-
#elif __has_include(<experimental/filesystem>)
52-
namespace fs = std::experimental::filesystem;
53-
#endif
5445

5546
using namespace o2::tpc;
5647
using namespace o2::gpu;
@@ -100,9 +91,9 @@ void convertDigitsToZSfinal(std::string_view digitsFile, std::string_view output
10091
outDir += '/';
10192
}
10293

103-
if (!fs::exists(outDir.data())) {
94+
if (gSystem->AccessPathName(outDir.data())) {
10495
if (createParentDir) {
105-
if (!fs::create_directories(outDir.data())) {
96+
if (gSystem->mkdir(outDir.data())) {
10697
LOGP(error, "could not create output directory {}", outDir.data());
10798
exit(1);
10899
}

0 commit comments

Comments
 (0)