Skip to content

Commit 39e24c8

Browse files
committed
DPL: fix reading of metadata
Previously, reading metadata from alien:// did not work when using an @input_list.txt file containting the filename, rather than specifying alien directly on the command line.
1 parent fa02b66 commit 39e24c8

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

Framework/AnalysisSupport/src/Plugin.cxx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ struct DiscoverMetadataInAOD : o2::framework::ConfigDiscoveryPlugin {
7575
if (filename.empty()) {
7676
return {};
7777
}
78-
if (filename.rfind("alien://", 0) == 0) {
79-
LOGP(debug, "AliEn file requested. Enabling support.");
80-
TGrid::Connect("alien://");
81-
}
82-
LOGP(info, "Loading metadata from file {} in PID {}", filename, getpid());
8378
std::vector<ConfigParamSpec> results;
8479
TFile* currentFile = nullptr;
8580
if (filename.at(0) == '@') {
@@ -91,10 +86,12 @@ struct DiscoverMetadataInAOD : o2::framework::ConfigDiscoveryPlugin {
9186
}
9287
std::getline(file, filename);
9388
file.close();
94-
currentFile = TFile::Open(filename.c_str());
95-
} else {
96-
currentFile = TFile::Open(filename.c_str());
9789
}
90+
if (filename.rfind("alien://", 0) == 0) {
91+
TGrid::Connect("alien://");
92+
}
93+
LOGP(info, "Loading metadata from file {} in PID {}", filename, getpid());
94+
currentFile = TFile::Open(filename.c_str());
9895
if (!currentFile) {
9996
LOGP(fatal, "Couldn't open file \"{}\"!", filename);
10097
}

0 commit comments

Comments
 (0)