diff --git a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx index 7f2ef246cae..7608ffb73ff 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx @@ -112,15 +112,15 @@ struct OnTheFlyTracker { struct : ConfigurableGroup { std::string prefix = "lookUpTables"; // JSON group name - Configurable> lutEl{"lutEl", std::vector{"lutCovm.el.dat"}, "LUT for electrons (if emtpy no LUT is taken)"}; - Configurable> lutMu{"lutMu", std::vector{"lutCovm.mu.dat"}, "LUT for muons (if emtpy no LUT is taken)"}; - Configurable> lutPi{"lutPi", std::vector{"lutCovm.pi.dat"}, "LUT for pions (if emtpy no LUT is taken)"}; - Configurable> lutKa{"lutKa", std::vector{"lutCovm.ka.dat"}, "LUT for kaons (if emtpy no LUT is taken)"}; - Configurable> lutPr{"lutPr", std::vector{"lutCovm.pr.dat"}, "LUT for protons (if emtpy no LUT is taken)"}; - Configurable> lutDe{"lutDe", std::vector{""}, "LUT for deuterons (if emtpy no LUT is taken)"}; - Configurable> lutTr{"lutTr", std::vector{""}, "LUT for tritons (if emtpy no LUT is taken)"}; - Configurable> lutHe3{"lutHe3", std::vector{""}, "LUT for Helium-3 (if emtpy no LUT is taken)"}; - Configurable> lutAl{"lutAl", std::vector{""}, "LUT for Alphas (if emtpy no LUT is taken)"}; + Configurable> lutEl{"lutEl", std::vector{"lutCovm.el.dat "}, "LUT for electrons (if emtpy no LUT is taken)"}; + Configurable> lutMu{"lutMu", std::vector{"lutCovm.mu.dat "}, "LUT for muons (if emtpy no LUT is taken)"}; + Configurable> lutPi{"lutPi", std::vector{"lutCovm.pi.dat "}, "LUT for pions (if emtpy no LUT is taken)"}; + Configurable> lutKa{"lutKa", std::vector{"lutCovm.ka.dat "}, "LUT for kaons (if emtpy no LUT is taken)"}; + Configurable> lutPr{"lutPr", std::vector{"lutCovm.pr.dat "}, "LUT for protons (if emtpy no LUT is taken)"}; + Configurable> lutDe{"lutDe", std::vector{" "}, "LUT for deuterons (if emtpy no LUT is taken)"}; + Configurable> lutTr{"lutTr", std::vector{" "}, "LUT for tritons (if emtpy no LUT is taken)"}; + Configurable> lutHe3{"lutHe3", std::vector{" "}, "LUT for Helium-3 (if emtpy no LUT is taken)"}; + Configurable> lutAl{"lutAl", std::vector{" "}, "LUT for Alphas (if emtpy no LUT is taken)"}; } lookUpTables; struct : ConfigurableGroup { @@ -308,9 +308,15 @@ struct OnTheFlyTracker { if (enablePrimarySmearing) { auto loadLUT = [&](int icfg, int pdg, const std::vector& tables) { const bool foundNewCfg = static_cast(icfg) < tables.size(); - const std::string& lutFile = foundNewCfg ? tables[icfg] : tables.front(); + std::string lutFile = foundNewCfg ? tables[icfg] : tables.front(); + // strip from leading/trailing spaces + lutFile.erase(0, lutFile.find_first_not_of(" ")); + lutFile.erase(lutFile.find_last_not_of(" ") + 1); + if (lutFile.empty()) { + LOG(fatal) << "Empty LUT file passed for pdg " << pdg << ", if you don't want to use a LUT remove the entry from the JSON config."; + } bool success = mSmearer[icfg]->loadTable(pdg, lutFile.c_str()); - if (!success && !lutFile.empty()) { + if (!success) { LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lutFile; }