20from extramodules.choicesCompleterList
import ChoicesCompleterList
26 Class for Interface -> centralityTable.cxx Task -> Configurable, Process Functions
29 object (parser_args() object): centralityTable.cxx Interface
32 def __init__(self, parserCentralityTable = argparse.ArgumentParser(add_help =
False)):
33 super(CentralityTable, self).
__init__()
40 This function allows to add arguments for parser_args() function
44 centralityTableSelections = {
45 "Run2V0M":
"Produces centrality percentiles using V0 multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
47 "Produces Run2 centrality percentiles using SPD tracklets multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
49 "Produces Run2 centrality percentiles using SPD clusters multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
50 "Run2CL0":
"Produces Run2 centrality percentiles using CL0 multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
51 "Run2CL1":
"Produces Run2 centrality percentiles using CL1 multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
52 "FV0A":
"Produces centrality percentiles using FV0A multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
53 "FT0M":
"Produces centrality percentiles using FT0 multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
54 "FDDM":
"Produces centrality percentiles using FDD multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
56 "Produces centrality percentiles using number of tracks contributing to the PV. -1: auto, 0: don't, 1: yes. Default: auto (-1)",
58 centralityTableSelectionsList = []
59 for k, v
in centralityTableSelections.items():
60 centralityTableSelectionsList.append(k)
63 groupCentralityTable = self.
parserCentralityTable.add_argument_group(title =
"Data processor options: centrality-table")
64 groupCentralityTable.add_argument(
65 "--est", help =
"Produces centrality percentiles parameters", action =
"store", nargs =
"*", type = str, metavar =
"EST",
66 choices = centralityTableSelectionsList,
67 ).completer = ChoicesCompleterList(centralityTableSelectionsList)
69 for key, value
in centralityTableSelections.items():
70 groupCentralityTable.add_argument(key, help = value, action =
"none")
74 This function allows to save the obtained arguments to the parser_args() function
77 Namespace: returns parse_args()
def __init__(self, parserCentralityTable=argparse.ArgumentParser(add_help=False))