File indexing completed on 2025-01-18 09:11:22
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Geometry/GeometryIdentifier.hpp"
0010
0011 #include <array>
0012 #include <ostream>
0013
0014 std::ostream& Acts::operator<<(std::ostream& os, Acts::GeometryIdentifier id) {
0015
0016 if (id.value() == 0u) {
0017 return (os << "undefined");
0018 }
0019
0020 static const std::array<const char*, 6> names = {
0021 "vol=", "bnd=", "lay=", "apr=", "sen=", "ext=",
0022 };
0023
0024 const std::array<GeometryIdentifier::Value, 6> levels = {
0025 id.volume(), id.boundary(), id.layer(),
0026 id.approach(), id.sensitive(), id.extra()};
0027
0028 bool writeSeparator = false;
0029 for (auto i = 0u; i < levels.size(); ++i) {
0030 if (levels[i] != 0u) {
0031 if (writeSeparator) {
0032 os << '|';
0033 }
0034 os << names[i] << levels[i];
0035 writeSeparator = true;
0036 }
0037 }
0038 return os;
0039 }
0040
0041 Acts::GeometryIdentifier Acts::GeometryIdentifierHook::decorateIdentifier(
0042 Acts::GeometryIdentifier identifier,
0043 const Acts::Surface& ) const {
0044 return identifier;
0045 }