Skip to content

Commit 04f6c7b

Browse files
authored
[ALICE3] Fix LUT fetching, support empty arrays (#13973)
1 parent 7660cad commit 04f6c7b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,20 @@ struct OnTheFlyTracker {
307307

308308
if (enablePrimarySmearing) {
309309
auto loadLUT = [&](int icfg, int pdg, const std::vector<std::string>& tables) {
310+
LOG(info) << "Loading LUT for pdg " << pdg << " for config " << icfg << " from provided tables with size " << tables.size();
311+
if (tables.empty()) {
312+
LOG(debug) << "No LUT file passed for pdg " << pdg << ", skipping.";
313+
return false;
314+
}
310315
const bool foundNewCfg = static_cast<size_t>(icfg) < tables.size();
311316
std::string lutFile = foundNewCfg ? tables[icfg] : tables.front();
317+
LOG(info) << "Loading LUT for pdg " << pdg << " from file " << lutFile << " for config " << icfg;
312318
// strip from leading/trailing spaces
313319
lutFile.erase(0, lutFile.find_first_not_of(" "));
314320
lutFile.erase(lutFile.find_last_not_of(" ") + 1);
315321
if (lutFile.empty()) {
316-
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.";
322+
LOG(debug) << "Empty LUT file name for pdg " << pdg << ", skipping.";
323+
return false;
317324
}
318325
bool success = mSmearer[icfg]->loadTable(pdg, lutFile.c_str());
319326
if (!success) {

0 commit comments

Comments
 (0)