3 Functions creating ComponentAccumulator for ByteStream access
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 Returns ComponentAccumulator with all components required to read objects from ByteStream input
13 flags (AthConfigFlags): The configuration flags container
14 type_names (list): Types to register converters for reading from BS, format ["typeA/key1", "typeB/key2"]
16 This wrapper function registers the type_names with either the online (HLT), the offline or the EMon BS services
17 depending on the configuration flags.
20 if flags.Common.isOnline
and not any(flags.Input.Files)
and not (flags.Trigger.doHLT
or flags.Trigger.doLVL1):
22 from ByteStreamEmonSvc.EmonByteStreamConfig
import EmonByteStreamCfg
23 servicesCfgFunction = EmonByteStreamCfg
24 elif flags.Trigger.Online.isPartition:
26 from TrigByteStreamCnvSvc.TrigByteStreamConfig
import TrigByteStreamCfg
27 servicesCfgFunction = TrigByteStreamCfg
30 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
31 servicesCfgFunction = ByteStreamReadCfg
34 acc.merge(servicesCfgFunction(flags, type_names=type_names))
40 Returns ComponentAccumulator with all components required to write objects to ByteStream output
43 flags (AthConfigFlags): The configuration flags container
44 type_names (list): Objects to register converters for reading from BS, format ["typeA/key1", "typeB/key2"]
45 extra_inputs (list): Objects which need to be produced before the output stream algorithm runs
46 (scheduler dependencies), format [('typeC', 'key3'), ('typeD', 'key4')]
50 if flags.Trigger.Online.isPartition:
51 raise RuntimeError(
'Cannot write arbitrary objects to ByteStream in online HLT configuration')
53 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamWriteCfg
55 acc.getPrimary().ExtraInputs = extra_inputs
56 acc.getService(
'ByteStreamEventStorageOutputSvc').StreamType =
'unknown'
57 acc.getService(
'ByteStreamEventStorageOutputSvc').StreamName =
'SingleStream'