|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef SELECTION_HELPERS__SELECTION_EXPR_PARSER_H
6 #define SELECTION_HELPERS__SELECTION_EXPR_PARSER_H
8 #include <boost/tokenizer.hpp>
19 namespace DetailSelectionExprParser {
26 const std::string::const_iterator &
end,
27 std::string &tok)
const;
41 Lexer(
const std::string &
s);
87 bool defaultToChar =
false);
JetConstituentVector::iterator iterator
Public interface for the expression parsing facility.
Lexer(Lexer &&)=default
Default move-constructor behaviour.
SelectionExprParser(DetailSelectionExprParser::Lexer lexer, bool defaultToChar=false)
Constructor for the parser which accepts a Lecer.
Lexer which turns a token stream into a stream of unambigous symbols to be used by a parser.
Separator to be used in a boost::tokenizer.
Select isolated Photons, Electrons and Muons.
StatusCode term(std::unique_ptr< ISelectionReadAccessor > &root)
Struct grouping together the type and original string representation of a symbol.
Tokenizer::iterator m_iterator
StatusCode expression(std::unique_ptr< ISelectionReadAccessor > &root)
boost::tokenizer< Separator > Tokenizer
::StatusCode StatusCode
StatusCode definition for legacy code.
void reset()
Optional state reset method, does nothing.
Symbol nextSymbol()
Generate a new symbol from the token sequence.
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
DetailSelectionExprParser::Lexer m_lexer
StatusCode build(std::unique_ptr< ISelectionReadAccessor > &accessor)
Triggers the actual parsing of the expression.
StatusCode factor(std::unique_ptr< ISelectionReadAccessor > &root)
DetailSelectionExprParser::Lexer::Symbol m_symbol
Lexer(const Lexer &)=delete
Disable copying of this class.
Lexer(const std::string &s)
Constructor from a strig.
bool operator()(std::string::const_iterator &next, const std::string::const_iterator &end, std::string &tok) const
Extracts the subsequent token from the input string iterator.