7from AthenaConfiguration.AllConfigFlags
import initConfigFlags
8from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9from AthenaConfiguration.ComponentFactory
import CompFactory
10from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
11from AthenaConfiguration.TestDefaults
import defaultTestFiles
15from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
18from AthDeviceComps.AthDeviceCompsConfig
import \
19 MemoryResourcesToolCfg, CopiesToolCfg
26 '''Configure the example algorithm for copying event data to a device.
30 result = ComponentAccumulator()
33 alg = CompFactory.AthExDevice.EventDataCopyExampleAlg(**kwargs)
34 alg.MemoryResourcesTool = \
35 result.popToolsAndMerge(MemoryResourcesToolCfg(flags, **kwargs))
36 alg.CopiesTool = result.popToolsAndMerge(CopiesToolCfg(flags, **kwargs))
39 result.addEventAlgo(alg)
45if __name__ ==
'__main__':
48 flags = initConfigFlags()
49 flags.Exec.MaxEvents = 100
50 flags.Input.Files = defaultTestFiles.AOD_RUN3_DATA
55 acc = MainServicesCfg(flags)
58 acc.merge(PoolReadCfg(flags))
64 sys.exit(acc.run().isFailure())
EventDataCopyExampleAlgCfg(flags, **kwargs)