ATLAS Offline Software
Loading...
Searching...
No Matches
testITkEncodeNewConf.py
Go to the documentation of this file.
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3#
4
5if __name__ == "__main__":
6 from AthenaConfiguration.AllConfigFlags import initConfigFlags
7 from AthenaConfiguration.TestDefaults import defaultTestFiles
8 flags = initConfigFlags()
9 flags.Input.isMC = True
10 flags.Input.Files = defaultTestFiles.RDO_RUN4
11 flags.Detector.GeometryITkStrip = True
12
13 flags.ITk.Geometry.AllLocal = False
14
15 # for debugging
16 #from AthenaCommon.Constants import DEBUG
17 #flags.Exec.OutputLevel=DEBUG
18
19 flags.fillFromArgs()
20 flags.lock()
21
22 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
23 acc = MainServicesCfg(flags)
24
25 # For POOL file reading
26 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
27 acc.merge(PoolReadCfg(flags))
28
29 # For ByteStream file writing
30 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamWriteCfg
31 writingAcc = ByteStreamWriteCfg(flags, [ "SCT_RDO_Container#ITkStripRDOs" ] )
32 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamType = "EventStorage"
33 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamName = "StreamBSFileOutput"
34 acc.merge(writingAcc)
35
36 from ITkStripsByteStreamCnv.ITkStripByteStreamCnvConfig import ITkStripRawContByteStreamToolProviderToolCfg
37 acc.merge(ITkStripRawContByteStreamToolProviderToolCfg(flags))
38
39 # For EventInfo necessary for ByteStream file writing
40 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
41 acc.merge(EventInfoCnvAlgCfg(flags,
42 inputKey="McEventInfo",
43 outputKey="EventInfo"))
44
45 acc.run(maxEvents=1)