Skip to content

Commit afff25e

Browse files
Cleanup in the DataDescriptorQueryBuilder
1 parent ae3ee6e commit afff25e

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

Framework/Core/include/Framework/DataDescriptorQueryBuilder.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,15 @@ struct DataDescriptorQueryBuilder {
5454
/// config := spec;spec;...
5555
///
5656
/// Example for config: x:TPC/CLUSTER/0;y:ITS/TRACKS/1
57+
///
58+
/// FIXME: grammar has been extended, add documentation
5759
static std::vector<InputSpec> parse(const char* s = "");
5860

59-
/// Creates an inputspec from a configuration @a config string with the
60-
/// following grammar.
61-
///
62-
/// string := [a-zA-Z0-9_]*
63-
/// origin := string
64-
/// description := string
65-
/// subspec := [0-9]*
66-
/// spec := origin/description/subspec
67-
/// config := spec;spec;...
68-
///
69-
/// Example for config: TPC/CLUSTER/0;ITS/TRACKS/1
61+
/// Internal method to build matcher list from a string of verified specs,
62+
/// the fixed and verified input format allows simple scanning, no state based
63+
/// parsing nor error handling implemented
7064
static DataDescriptorQuery buildFromKeepConfig(std::string const& config);
65+
/// deprecated?
7166
static DataDescriptorQuery buildFromExtendedKeepConfig(std::string const& config);
7267
static std::unique_ptr<data_matcher::DataDescriptorMatcher> buildNode(std::string const& nodeString);
7368
static std::smatch getTokens(std::string const& nodeString);

Framework/Core/src/DataDescriptorQueryBuilder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ std::vector<InputSpec> DataDescriptorQueryBuilder::parse(char const* config)
217217
nodes.push_back(DescriptionValueMatcher{*currentDescription});
218218
} else if (*next == '?' && assignLastStringMatch("description", 16, currentDescription, IN_BEGIN_ATTRIBUTES)) {
219219
nodes.push_back(DescriptionValueMatcher{*currentDescription});
220-
} else if (*next == '\0' && assignLastStringMatch("description", 16, currentDescription, IN_BEGIN_ATTRIBUTES)) {
220+
} else if (*next == '\0' && assignLastStringMatch("description", 16, currentDescription, IN_END_MATCHER)) {
221221
nodes.push_back(DescriptionValueMatcher{*currentDescription});
222222
} else {
223223
error("description needs to be between 1 and 16 char long");

0 commit comments

Comments
 (0)