Skip to content

Commit 4f90d65

Browse files
committed
UUU
1 parent 3c644f2 commit 4f90d65

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ALICE3/Core/FastTracker.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ std::map<std::string, std::string> GeometryContainer::GeometryEntry::getConfigur
5757
}
5858
}
5959

60-
std::string GeometryContainer::GeometryEntry::getValue(const std::string& layerName, const std::string& key) const
60+
std::string GeometryContainer::GeometryEntry::getValue(const std::string& layerName, const std::string& key, bool require) const
6161
{
6262
auto layer = getConfiguration(layerName);
6363
auto entry = layer.find(key);
6464
if (entry != layer.end()) {
6565
return layer.at(key);
66+
} else if (require) {
67+
return "";
6668
} else {
6769
LOG(fatal) << "Key " << key << " not found in layer " << layerName << " configurations.";
6870
return "";

ALICE3/Core/FastTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class GeometryContainer
9797
}
9898
return layerNames;
9999
}
100-
std::string getValue(const std::string& layerName, const std::string& key) const;
100+
std::string getValue(const std::string& layerName, const std::string& key, bool require = true) const;
101101
float getFloatValue(const std::string& layerName, const std::string& key) const { return std::stof(getValue(layerName, key)); }
102102
int getIntValue(const std::string& layerName, const std::string& key) const { return std::stoi(getValue(layerName, key)); }
103103

0 commit comments

Comments
 (0)