21from extramodules.choicesCompleterList
import ChoicesCompleterList
22from argcomplete.completers
import ChoicesCompleter
28 Class for Interface -> pidTPCFull.cxx
and pidTOFFull.cxx Task -> Configurable, Process Functions
31 object (parser_args() object): pidTPCFull.cxx
and pidTOFFull.cxx Interface
34 def __init__(self, parserTpcTofPidFull = argparse.ArgumentParser(add_help =
False)):
35 super(TpcTofPidFull, self).
__init__()
40 This function allows to add arguments for parser_args() function
46 "Produce PID information for the Electron mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
48 "Produce PID information for the Muon mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
50 "Produce PID information for the Pion mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
52 "Produce PID information for the Kaon mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
54 "Produce PID information for the Proton mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
56 "Produce PID information for the Deuterons mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
58 "Produce PID information for the Triton mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
60 "Produce PID information for the Helium3 mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
62 "Produce PID information for the Alpha mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
64 pidSelectionsList = []
65 for k, v
in pidSelections.items():
66 pidSelectionsList.append(k)
68 booleanSelections = [
"true",
"false"]
71 groupPID = self.
parserTpcTofPidFull.add_argument_group(title =
"Data processor options: tpc-pid-full, tof-pid-full")
72 groupPID.add_argument(
73 "--pid", help =
"Produce PID information for the <particle> mass hypothesis", action =
"store", nargs =
"*", type = str.lower,
74 metavar =
"PID", choices = pidSelectionsList,
75 ).completer = ChoicesCompleterList(pidSelectionsList)
77 for key, value
in pidSelections.items():
78 groupPID.add_argument(key, help = value, action =
"none")
80 groupTofPid = self.
parserTpcTofPidFull.add_argument_group(title =
"Data processor options: tof-pid, tof-pid-full")
81 groupTofPid.add_argument(
82 "--isWSlice", help =
"Process with track slices", action =
"store", type = str.lower, choices = booleanSelections,
83 ).completer = ChoicesCompleter(booleanSelections)
87 This function allows to save the obtained arguments to the parser_args() function
90 Namespace: returns parse_args()
def __init__(self, parserTpcTofPidFull=argparse.ArgumentParser(add_help=False))