Skip to content

Commit ffb21b4

Browse files
committed
Expand path of evtpools
1 parent bd18612 commit ffb21b4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Generators/src/GeneratorFromFile.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <sstream>
2525
#include <filesystem>
2626
#include <TGrid.h>
27+
#include <TSystem.h>
2728

2829
namespace o2
2930
{
@@ -397,7 +398,8 @@ bool GeneratorFromEventPool::Init()
397398
std::random_device rd;
398399
mRandomEngine.seed(rd());
399400
}
400-
mPoolFilesAvailable = setupFileUniverse(mConfig.eventPoolPath);
401+
auto expPath = (std::string)gSystem->ExpandPathName(mConfig.eventPoolPath.c_str());
402+
mPoolFilesAvailable = setupFileUniverse(expPath);
401403

402404
if (mPoolFilesAvailable.size() == 0) {
403405
LOG(error) << "No file found that can be used with EventPool generator";
@@ -440,7 +442,7 @@ bool checkFileName(std::string const& pathStr)
440442
}
441443
fs::path path(finalPathStr);
442444

443-
// Check if the filename is "eventpool.root"
445+
// Check if the filename is "evtpool.root"
444446
return path.filename() == GeneratorFromEventPool::eventpool_filename;
445447
} catch (const fs::filesystem_error& e) {
446448
// Invalid path syntax will throw an exception
@@ -556,7 +558,7 @@ std::vector<std::string> GeneratorFromEventPool::setupFileUniverse(std::string c
556558
// check if the path is a regular file
557559
auto is_actual_file = std::filesystem::is_regular_file(path);
558560
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
560562
if (checkFileName(path)) {
561563
TFile rootfile(path.c_str(), "OPEN");
562564
if (!rootfile.IsZombie()) {

0 commit comments

Comments
 (0)