Construct ID from string representing the structure.
53 {
54
56
57 std::istringstream in(
sensor);
58 try {
59
60 m_id.parts.layer = getPart(in);
61 m_id.parts.ladder = getPart(in);
62 m_id.parts.sensor = getPart(in);
63
64 if (in.peek() == '#') {
65 in.get();
66 m_id.parts.segment = getPart(in);
67 }
68 } catch (std::runtime_error&) {
69
71 throw std::invalid_argument(
"Could not parse VxdID: '" +
sensor +
"'");
72 }
73
74
75 if (!in.eof()) {
76 std::string rest;
77
78
79 getline(in, rest, '\0');
80 throw std::invalid_argument("Trailing characters after VxdID " + std::string(*this) + ": '" + rest + "'");
81 }
82 }
baseType sensor
Sensor id.