diff --git a/PWGCF/TableProducer/dptDptFilter.cxx b/PWGCF/TableProducer/dptDptFilter.cxx index 440e88292b8..dd703f3b3c3 100644 --- a/PWGCF/TableProducer/dptDptFilter.cxx +++ b/PWGCF/TableProducer/dptDptFilter.cxx @@ -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()); } diff --git a/PWGCF/TableProducer/dptDptFilter.h b/PWGCF/TableProducer/dptDptFilter.h index 63a49a5c7b8..9c51fbbf60a 100644 --- a/PWGCF/TableProducer/dptDptFilter.h +++ b/PWGCF/TableProducer/dptDptFilter.h @@ -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());