9parser = argparse.ArgumentParser(description=
'Get the inputs for chain extraction')
11parser.add_argument(
'--chain', dest=
'chain', action=
'store', default=
'',
12 help=
'What chain are we extracting')
13parser.add_argument(
'--menu_json', dest=
'input_json', action=
'store', default=
'',
14 help=
'What menu are we extracting the chain from')
16args = parser.parse_args()
19input_json = args.input_json
21the_menu = json.loads(open(input_json).
read())
23print(
"...extracting",chain,
"from menu json",input_json)
25if chain
not in the_menu[
'chains']:
26 raise Exception(
"The requested chain isn't in the provided menu json, please try again.")
28pprint.pprint(the_menu[
'chains'][chain])
30print(
"Steps in the chain:")
32for isq,seq
in enumerate(the_menu[
'chains'][chain][
'sequencers']):
35 print(
'step',isq+1,
'is empty')
38 print(
'step',isq+1,
'is sequence ',seq)
41 for chain
in the_menu[
'chains']:
42 if seq
in the_menu[
'chains'][chain][
'sequencers']:
43 other_chains += [chain]
44 if len(other_chains) > 0:
45 print (
' also used in the following chains:')
46 pprint.pprint(other_chains)
48 print (
' is not used in any other chains.')
50 print (
' contains algorithms/hypos:')
51 pprint.pprint(the_menu[
'sequencers'][seq])
void print(char *figname, TCanvas *c1)
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)