ATLAS Offline Software
Loading...
Searching...
No Matches
python.DecayParser Namespace Reference

Functions

 py_parse (cmd)
 process_block (cmd)

Variables

str _slot_separator = "+"
str _candidate_sep = "|"
str _decay_arrow = "->"
str _wild_card = "*"
 buf = cmd.split (_decay_arrow)
 parents = process_block (buf[0])
 print ("==> buf:",buf)
 children = process_block (buf[1])

Function Documentation

◆ process_block()

python.DecayParser.process_block ( cmd)

Definition at line 35 of file DecayParser.py.

35def process_block (cmd):
36 if cmd == "":
37 return None
38 candidates = cmd.split (_slot_separator)
39 return [list(set(c.split(_candidate_sep))) for c in candidates]
40
41
STL class.

◆ py_parse()

python.DecayParser.py_parse ( cmd)

Definition at line 15 of file DecayParser.py.

15def py_parse (cmd):
16 # remove all spaces to ease further parsing
17 cmd = re.sub(pattern=" ",
18 repl="",
19 string=cmd)

Variable Documentation

◆ _candidate_sep

str python.DecayParser._candidate_sep = "|"
protected

Definition at line 11 of file DecayParser.py.

◆ _decay_arrow

str python.DecayParser._decay_arrow = "->"
protected

Definition at line 12 of file DecayParser.py.

◆ _slot_separator

str python.DecayParser._slot_separator = "+"
protected

Definition at line 10 of file DecayParser.py.

◆ _wild_card

str python.DecayParser._wild_card = "*"
protected

Definition at line 13 of file DecayParser.py.

◆ buf

python.DecayParser.buf = cmd.split (_decay_arrow)

Definition at line 26 of file DecayParser.py.

◆ children

python.DecayParser.children = process_block (buf[1])

Definition at line 31 of file DecayParser.py.

◆ parents

python.DecayParser.parents = process_block (buf[0])

print ("==> buf:",buf)

Definition at line 30 of file DecayParser.py.