62def scenario_htdipz(scenario, chainPartInd):
63 """calculate the parameters needed to generate a hypo helper config AlgTool
64 starting from a the hypoScenario which appears in the chainname for
65 a DIPZ MLPL + HT condition. """
66
67 assert scenario.startswith('HTZ'),\
68 'routing error, module %s: bad scenario %s' % (__name__, scenario)
69
70 m = rgx_pattern.match(scenario)
71
72 assert m is not None, \
73 'scenario_htdipz.py - regex part %s does not match scenario %s' % (
74 pattern_full, scenario)
75
76 groupdict = m.groupdict()
77
78
79
80 repcondargs = []
81 filterparams = []
82 filterparam_inds = []
83
84
85
86
87 condargs_kin = get_kin_args_from_matchdict(groupdict)
88 chooseN = float(get_mult_args_from_matchdict(groupdict)[0][1]['min'])
89 condargsHTZ = get_htdipz_from_matchdict(groupdict, chooseN)
90
91
92 repcondargs.append(RepeatedConditionParams(tree_id=2,
93 tree_pid=1,
94 multiplicity=1,
95 chainPartInd=chainPartInd,
96 condargs=condargsHTZ))
97 filterparam_inds.append(-1)
98
99
100 repcondargs.append(RepeatedConditionParams(tree_id=1,
101 tree_pid=0,
102 multiplicity=int(chooseN),
103 chainPartInd=chainPartInd,
104 condargs=condargs_kin))
105 filterparam_inds.append(-1)
106
107
108
109 treevec = make_treevec(repcondargs)
110 assert treevec == [0, 0, 1]
111
112 assert len(repcondargs) == len(filterparam_inds)
113
114
115 helper_params = HelperConfigToolParams(treevec=treevec,
116 repcondargs=repcondargs,
117 filterparams=filterparams,
118 filterparam_inds=filterparam_inds)
119 return [helper_params]
120