ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaPoolTestWrite.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.AllConfigFlags import initConfigFlags
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthenaCommon.Constants import DEBUG
6
7# Setup flags
8flags = initConfigFlags()
9flags.Common.MsgSuppression = False
10flags.Exec.MaxEvents = 2
11flags.Input.Files = []
12stream = "Stream1"
13flags.lock()
14
15# Main services
16from AthenaConfiguration.MainServicesConfig import MainServicesCfg
17acc = MainServicesCfg(flags)
18
19from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
20acc.merge( McEventSelectorCfg(flags,
21 RunNumber = 1,
22 EventsPerRun = 0x100000010,
23 FirstEvent = 0x100000000,
24 EventsPerLB = 1,
25 FirstLB = 1,
26 InitialTimeStamp = 0,
27 TimeStampInterval = 5) )
28
29# Pool writing
30acc.addEventAlgo( CompFactory.AthenaPoolTestDataWriter(OutputLevel = DEBUG),
31 sequenceName = 'AthAlgSeq' )
32
33from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
34acc.merge( OutputStreamCfg(flags, stream, disableEventTag = True,
35 ItemList = ['EventInfo#*', 'EventStreamInfo#*',
36 'MergedEventInfo#*', 'PileUpEventInfo#*',
37 'IAthenaPoolTestCollection#*',
38 'AthenaPoolTestMatrix#*', 'AthenaPoolTestMap#*',
39 'dummy_A#*', 'dummy_E#*']) )
40
41# Run
42import sys
43sc = acc.run(flags.Exec.MaxEvents)
44sys.exit(sc.isFailure())