ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
SGComps
python
SGInputLoaderConfig.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
#
4
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
5
from
AthenaConfiguration.ComponentFactory
import
CompFactory
6
7
def
SGInputLoaderCfg
(flags, Load=None, **kwargs):
8
if
Load:
9
processed =
set
()
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
# Append 'StoreGateSvc' by default
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
# eventloopmgr provides the EventInfo for inputless jobs, so add this as an extra output
35
# TODO: Would like to remove legacy EventInfo from Athena entirely in the future, then would remove this here too.
36
alg.ExtraOutputs.add( (
'EventInfo'
,
'StoreGateSvc+McEventInfo'
) )
37
acc.addEventAlgo(alg, primary=
True
)
38
39
return
acc
set
STL class.
SGInputLoaderConfig.SGInputLoaderCfg
SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition
SGInputLoaderConfig.py:7
Generated on
for ATLAS Offline Software by
1.17.0