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