6 #include "StringParameters.h"
7 #include "marlin/Exceptions.h"
18 typedef std::map< std::string , StringParameters* > StringParametersMap ;
45 Parser(
const std::string& fileName ) ;
52 throw ParseException(
"dynamic command line options only supported for xml steering files" ) ;
69 mutable StringParametersMap _map ;
72 std::string _fileName ;
87 std::vector< std::string >& _tokens ;
92 LCTokenizer( std::vector< std::string >& tokens,
char del ) : _tokens(tokens) , _del(del), _last(del) {
96 void operator()(
const char& c) {
100 if( _last == _del ) {
101 _tokens.push_back(
"") ;
103 _tokens.back() += c ;
113 std::vector<std::string> & result() {
ParseException used for parse errors, e.g.
Definition: Exceptions.h:16
Interface for a parser of a steering file to be used with marlin.
Definition: IParser.h:18
Simple parser class for Marlin.
Definition: Parser.h:36
void setCmdLineParameters(const CommandLineParametersMap &)
set command line parameters
Definition: Parser.h:51
Helper class for Parser.
Definition: Parser.h:85
int readNextValidLine(std::string &str, std::istream &stream)
Helper method that reads the next line from a stream that is not empty or starts with a '#'...
Definition: Parser.cc:132
void parse()
Parse the input file.
Definition: Parser.cc:16
StringParameters * getParameters(const std::string §ionName) const
Return the StringParameters defined for this section of the steering file.
Definition: Parser.cc:113
Simple parameters class for Marlin.
Definition: StringParameters.h:34