File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed
Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1616#include < string>
1717#include < vector>
1818#include < memory>
19- #include < regex>
2019
21- namespace o2
22- {
23- namespace framework
20+
21+ namespace o2 ::framework
2422{
2523
2624namespace data_matcher
@@ -65,9 +63,9 @@ struct DataDescriptorQueryBuilder {
6563 // / deprecated?
6664 static DataDescriptorQuery buildFromExtendedKeepConfig (std::string const & config);
6765 static std::unique_ptr<data_matcher::DataDescriptorMatcher> buildNode (std::string const & nodeString);
68- static std::smatch getTokens (std::string const & nodeString);
66+ static std::vector<std::string> getTokens (std::string const & nodeString);
6967};
7068
71- } // namespace framework
72- } // namespace o2
69+ } // namespace o2:: framework
70+
7371#endif // o2_framework_DataDescriptorQueryBuilder_H_INCLUDED
Original file line number Diff line number Diff line change 1717#include < optional>
1818#include < string>
1919#include < vector>
20+ #include < regex>
2021#include < iostream>
2122
2223using namespace o2 ::framework::data_matcher;
@@ -447,7 +448,7 @@ DataDescriptorQuery DataDescriptorQueryBuilder::buildFromExtendedKeepConfig(std:
447448std::unique_ptr<DataDescriptorMatcher> DataDescriptorQueryBuilder::buildNode (std::string const & nodeString)
448449{
449450
450- std::smatch m = getTokens (nodeString);
451+ auto m = getTokens (nodeString);
451452
452453 std::unique_ptr<DataDescriptorMatcher> next;
453454 auto newNode = std::make_unique<DataDescriptorMatcher>(
@@ -461,15 +462,19 @@ std::unique_ptr<DataDescriptorMatcher> DataDescriptorQueryBuilder::buildNode(std
461462 return newNode;
462463}
463464
464- std::smatch DataDescriptorQueryBuilder::getTokens (std::string const & nodeString)
465+ std::vector<std::string> DataDescriptorQueryBuilder::getTokens (std::string const & nodeString)
465466{
466467
467468 static const std::regex specTokenRE (R"re( (\w{1,4})/(\w{1,16})/(\d*))re" );
468- std::smatch m ;
469+ std::smatch match ;
469470
470- std::regex_match (nodeString, m , specTokenRE);
471+ std::regex_match (nodeString, match , specTokenRE);
471472
472- return m;
473+ std::vector<std::string> result;
474+ for (const auto & m : match) {
475+ result.push_back (m.str ());
476+ }
477+ return result;
473478}
474479
475480} // namespace o2::framework
You can’t perform that action at this time.
0 commit comments