ATLAS Offline Software
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 
8 #include "TrigConfData/Logic.h"
9 
10 #include <memory>
11 
12 namespace TrigConf {
13 
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
TrigConf::parse
std::vector< std::string > parse(std::string names)
Definition: TrigConfHLTData/Root/HLTChain.cxx:117
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
Logic.h