ATLAS Offline Software
Loading...
Searching...
No Matches
InDetRawDataWriter.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.DetectorConfigFlags import enableDetectors
5from AthenaConfiguration.ComponentFactory import CompFactory
6from AthenaCommon.Constants import DEBUG
7
8# Setup flags
9flags = initConfigFlags()
10flags.Common.MsgSuppression = False
11flags.Exec.MaxEvents = 20
12flags.Input.Files = []
13flags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01"
14flags.IOVDb.GlobalTag = "OFLCOND-SDR-BS7T-04-00"
15enableDetectors(flags, ["Pixel", "SCT", "TRT"])
16flags.lock()
17
18# Main services
19from AthenaConfiguration.MainServicesConfig import MainEvgenServicesCfg
20acc = MainEvgenServicesCfg(flags)
21
22# GeoModel
23from AtlasGeoModel.GeoModelConfig import GeoModelCfg
24acc.merge( GeoModelCfg(flags) )
25
26# Pool writing
27acc.addEventAlgo( CompFactory.InDetRawDataFakeWriter(OutputLevel = DEBUG),
28 sequenceName = 'AthAlgSeq' )
29
30from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
31acc.merge(
32 OutputStreamCfg(
33 flags,
34 "InDetRDO",
35 disableEventTag=True,
36 ItemList=[
37 "PixelRDO_Container#*",
38 "SCT_RDO_Container#*",
39 "TRT_RDO_Container#*",
40 "EventInfo#*",
41 "PixelRDOElemLinkVec#*",
42 ],
43 MetadataItemList=["IOVMetaDataContainer#*"],
44 )
45)
46
47# Run
48import sys
49sc = acc.run(flags.Exec.MaxEvents)
50sys.exit(sc.isFailure())