Skip to content

Commit 6fef78d

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - Circumvent the inline generator configuration (#15308)
Co-authored-by: Victor <victor@cern.ch>
1 parent 2a639a3 commit 6fef78d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

PWGCF/TableProducer/dptDptFilter.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,12 @@ struct DptDptFilter {
658658
getTaskOptionValue(initContext, "generator-task", "configFile", tmpstr, false);
659659
TString fullPath = tmpstr;
660660
auto tokens = fullPath.Tokenize("/");
661-
otfGenerator = TString(tokens->At(tokens->GetEntries() - 1)->GetName()).ReplaceAll(".ini", "");
661+
if (tokens->GetEntries() > 0) {
662+
otfGenerator = TString(tokens->At(tokens->GetEntries() - 1)->GetName()).ReplaceAll(".ini", "");
663+
} else {
664+
/* let's take it from the time being from the data type string */
665+
otfGenerator = TString(cfgDataType).ReplaceAll("OnTheFlyMC_", "");
666+
}
662667
delete tokens;
663668
LOGF(info, "The generator configuration file: %s", otfGenerator.c_str());
664669
}

PWGCF/TableProducer/dptDptFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ inline DataType getDataType(std::string const& datastr)
944944
return kMC;
945945
} else if (datastr == "FastMC") {
946946
return kFastMC;
947-
} else if (datastr == "OnTheFlyMC") {
947+
} else if (datastr.starts_with("OnTheFlyMC")) {
948948
return kOnTheFly;
949949
} else {
950950
LOGF(fatal, "DptDptCorrelations::getDataType(). Wrong type of dat: %d", datastr.c_str());

0 commit comments

Comments
 (0)