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, defaultConditionsTags
8 flags = initConfigFlags()
9 flags.Input.isMC = True
10 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
11 flags.Input.Files = defaultTestFiles.RDO_RUN4
12 flags.Detector.GeometryITkStrip = True
13
14 flags.ITk.Geometry.AllLocal = False
15
16 # for debugging
17 #from AthenaCommon.Constants import DEBUG
18 #flags.Exec.OutputLevel=DEBUG
19
20 flags.fillFromArgs()
21 flags.lock()
22
23 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
24 acc = MainServicesCfg(flags)
25
26 # For POOL file reading
27 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
28 acc.merge(PoolReadCfg(flags))
29
30 # For ByteStream file writing
31 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamWriteCfg
32 writingAcc = ByteStreamWriteCfg(flags, [ "SCT_RDO_Container#ITkStripRDOs" ] )
33 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamType = "EventStorage"
34 writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamName = "StreamBSFileOutput"
35 acc.merge(writingAcc)
36
37 from ITkStripsByteStreamCnv.ITkStripByteStreamCnvConfig import ITkStripRawContByteStreamToolProviderToolCfg
38 acc.merge(ITkStripRawContByteStreamToolProviderToolCfg(flags))
39
40 # For EventInfo necessary for ByteStream file writing
41 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
42 acc.merge(EventInfoCnvAlgCfg(flags,
43 inputKey="McEventInfo",
44 outputKey="EventInfo"))
45
46 acc.run(maxEvents=1)