Skip to content

Commit 9a4a89a

Browse files
authored
Log warning for empty layer names in configuration
Added warning log for empty layer names in geometry configuration.
1 parent e41656b commit 9a4a89a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ALICE3/Core/FastTracker.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class GeometryContainer
5353
mFileName = filename;
5454
mConfigurations = GeometryContainer::parseTEnvConfiguration(mFileName, mLayerNames);
5555
LOG(info) << "Loaded geometry configuration from file: " << filename << " with " << mLayerNames.size() << " layers.";
56+
if (mLayerNames.empty()) {
57+
LOG(warning) << "No layers found in geometry configuration file: " << filename;
58+
}
5659
}
5760
std::map<std::string, std::map<std::string, std::string>> getConfigurations() const { return mConfigurations; }
5861
std::map<std::string, std::string> getConfiguration(const std::string& layerName) const;
@@ -84,7 +87,7 @@ class GeometryContainer
8487
std::map<std::string, std::string> getConfiguration(const int id, const std::string& layerName) const { return entries.at(id).getConfiguration(layerName); }
8588

8689
// Get specific values
87-
std::string getValue(const int id, const std::string& layerName, const std::string& key, bool require = true) const { return entries.at(id).getValue(layerName, key, require); };
90+
std::string getValue(const int id, const std::string& layerName, const std::string& key, bool require = true) const { return entries.at(id).getValue(layerName, key, require); }
8891
float getFloatValue(const int id, const std::string& layerName, const std::string& key) const { return entries.at(id).getFloatValue(layerName, key); }
8992

9093
private:

0 commit comments

Comments
 (0)