|
24 | 24 | #include <sstream> |
25 | 25 | #include <filesystem> |
26 | 26 | #include <TGrid.h> |
| 27 | +#include <TSystem.h> |
27 | 28 |
|
28 | 29 | namespace o2 |
29 | 30 | { |
@@ -397,7 +398,8 @@ bool GeneratorFromEventPool::Init() |
397 | 398 | std::random_device rd; |
398 | 399 | mRandomEngine.seed(rd()); |
399 | 400 | } |
400 | | - mPoolFilesAvailable = setupFileUniverse(mConfig.eventPoolPath); |
| 401 | + auto expPath = (std::string)gSystem->ExpandPathName(mConfig.eventPoolPath.c_str()); |
| 402 | + mPoolFilesAvailable = setupFileUniverse(expPath); |
401 | 403 |
|
402 | 404 | if (mPoolFilesAvailable.size() == 0) { |
403 | 405 | LOG(error) << "No file found that can be used with EventPool generator"; |
@@ -440,7 +442,7 @@ bool checkFileName(std::string const& pathStr) |
440 | 442 | } |
441 | 443 | fs::path path(finalPathStr); |
442 | 444 |
|
443 | | - // Check if the filename is "eventpool.root" |
| 445 | + // Check if the filename is "evtpool.root" |
444 | 446 | return path.filename() == GeneratorFromEventPool::eventpool_filename; |
445 | 447 | } catch (const fs::filesystem_error& e) { |
446 | 448 | // Invalid path syntax will throw an exception |
@@ -556,7 +558,7 @@ std::vector<std::string> GeneratorFromEventPool::setupFileUniverse(std::string c |
556 | 558 | // check if the path is a regular file |
557 | 559 | auto is_actual_file = std::filesystem::is_regular_file(path); |
558 | 560 | if (is_actual_file) { |
559 | | - // The files must match a criteria of being canonical paths ending with eventpool_Kine.root |
| 561 | + // The files must match a criteria of being canonical paths ending with evtpool.root |
560 | 562 | if (checkFileName(path)) { |
561 | 563 | TFile rootfile(path.c_str(), "OPEN"); |
562 | 564 | if (!rootfile.IsZombie()) { |
|
0 commit comments