ATLAS Offline Software
Loading...
Searching...
No Matches
LogicParser.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCONF_LOGICPARSER_H
6#define TRIGCONF_LOGICPARSER_H
7
9
10#include <memory>
11
12namespace TrigConf {
13
56
57
58 class LogicParser {
59 public:
60 LogicParser();
61
62 std::shared_ptr<TrigConf::Logic> parse(const std::string &);
63
64 private:
65 std::vector<std::string> tokenize(const std::string & expr) const;
66
67 std::unique_ptr<TrigConf::Logic> buildTree(const std::vector<std::string> & tokExpr) const;
68
69 std::unique_ptr<TrigConf::Logic> buildNode(const std::vector<std::string> & tokExpr, size_t front, size_t back) const;
70
71 std::unique_ptr<TrigConf::Logic> findSubExpr(const std::vector<std::string> & tokExpr, size_t & front, size_t back) const;
72
73 };
74
75}
76
77#endif
std::map< std::string, std::string > parse(const std::string &list)
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22