Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion PWGCF/TableProducer/dptDptFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,12 @@ struct DptDptFilter {
getTaskOptionValue(initContext, "generator-task", "configFile", tmpstr, false);
TString fullPath = tmpstr;
auto tokens = fullPath.Tokenize("/");
otfGenerator = TString(tokens->At(tokens->GetEntries() - 1)->GetName()).ReplaceAll(".ini", "");
if (tokens->GetEntries() > 0) {
otfGenerator = TString(tokens->At(tokens->GetEntries() - 1)->GetName()).ReplaceAll(".ini", "");
} else {
/* let's take it from the time being from the data type string */
otfGenerator = TString(cfgDataType).ReplaceAll("OnTheFlyMC_", "");
}
delete tokens;
LOGF(info, "The generator configuration file: %s", otfGenerator.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/TableProducer/dptDptFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ inline DataType getDataType(std::string const& datastr)
return kMC;
} else if (datastr == "FastMC") {
return kFastMC;
} else if (datastr == "OnTheFlyMC") {
} else if (datastr.starts_with("OnTheFlyMC")) {
return kOnTheFly;
} else {
LOGF(fatal, "DptDptCorrelations::getDataType(). Wrong type of dat: %d", datastr.c_str());
Expand Down
Loading