7def SGInputLoaderCfg(flags, Load=None, **kwargs):
8 if Load:
10 for item in Load:
11 if isinstance(item, tuple):
12 type_name, key = item
13 elif isinstance(item, str):
14 if '/' in item:
15 type_name, key = item.split('/')
16 elif '#' in item:
17 type_name, key = item.split('#')
18 else:
19 raise ValueError("String entry should be a type-key pair split by '/' or '#'")
20 else:
21 raise ValueError('Unsupported type')
22
23
24 if '+' not in key:
25 key = f'StoreGateSvc+{key}'
26
27 processed.add((type_name, key))
28
29 kwargs.setdefault('Load', processed)
30
31 acc = ComponentAccumulator()
32 alg = CompFactory.SGInputLoader(**kwargs)
33 if not flags.Common.isOnline and not any(flags.Input.Files) or flags.Input.Files==['_ATHENA_GENERIC_INPUTFILE_NAME_']:
34
35
36 alg.ExtraOutputs.add( ('EventInfo', 'StoreGateSvc+McEventInfo') )
37 acc.addEventAlgo(alg, primary=True)
38
39 return acc