File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2525#include < TSystem.h>
2626
2727#include < chrono>
28- #include < filesystem>
2928#include < fstream>
3029#include < map>
3130#include < string>
@@ -90,11 +89,17 @@ void GeometryContainer::init(o2::framework::InitContext& initContext)
9089 configFile = Form (" %s/%s/snapshot.root" , outPath.c_str (), ccdbPath.c_str ());
9190
9291 int timeout = 600 ; // Wait max 10 minutes
93- while (!std::filesystem::exists (configFile) && --timeout > 0 ) {
92+ while (--timeout > 0 ) {
93+ std::ifstream file (configFile);
94+ if (file.good ()) {
95+ break ;
96+ }
97+
9498 std::this_thread::sleep_for (std::chrono::seconds (1 ));
9599 }
96100
97- if (!std::filesystem::exists (configFile)) {
101+ std::ifstream checkFile (configFile);
102+ if (!checkFile.good ()) {
98103 LOG (fatal) << " Timed out waiting for geometry snapshot: " << configFile;
99104 return ;
100105 }
You can’t perform that action at this time.
0 commit comments