Functions | |
def | rulesParser (parsing_rules, lines, compileRules=True) |
Variables | |
rulesRegexpCompileFunction | |
Applies the (provided) regular expression rules (=rule[1] for rule in parsing_rules) to each line and if it matches the line, puts the mached information to the dictionary as the specified keys (=rule[0]) which is later returned Rule[3] contains whether the field is required to be found. If so and it isn't found the exception would be raised. rules = [ ( (field_name_1_to_match, field_name_2), regular expression, /optionaly: is the field required? if so "req"/ ) ]
Definition at line 9 of file parsingRulesHelper.py.
References genParticles_cff.map, and match().
Referenced by parserPerfsuiteMetadata.parserPerfsuiteMetadata._applyParsingRules(), and FileNamesHelper.read_ConfigurationFromSimulationCandles().
parsingRulesHelper.rulesRegexpCompileFunction |
Definition at line 7 of file parsingRulesHelper.py.