ATLAS Offline Software
Loading...
Searching...
No Matches
testITkEncodeNewConf.py
Go to the documentation of this file.
2# Copyright (C) 2002-2025 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.lock()
20
21 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
22 acc = MainServicesCfg(flags)
23
24 # For POOL file reading
25 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
26 acc.merge(PoolReadCfg(flags))
27
28 # For ByteStream file writing
29 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamWriteCfg
30 writingAcc = ByteStreamWriteCfg(flags, [ "SCT_RDO_Container#ITkStripRDOs" ] )
31 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamType = "EventStorage"
32 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamName = "StreamBSFileOutput"
33 acc.merge(writingAcc)
34
35 from ITkStripsByteStreamCnv.ITkStripByteStreamCnvConfig import ITkStripRawContByteStreamToolProviderToolCfg
36 acc.merge(ITkStripRawContByteStreamToolProviderToolCfg(flags))
37
38 # For EventInfo necessary for ByteStream file writing
39 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
40 acc.merge(EventInfoCnvAlgCfg(flags,
41 inputKey="McEventInfo",
42 outputKey="EventInfo"))
43
44 acc.run(maxEvents=1)