ATLAS Offline Software
InDetRawDataWriter.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AllConfigFlags import initConfigFlags
4 from AthenaConfiguration.DetectorConfigFlags import enableDetectors
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from AthenaCommon.Constants import DEBUG
7 
8 # Setup flags
9 flags = initConfigFlags()
10 flags.Common.MsgSuppression = False
11 flags.Exec.MaxEvents = 20
12 flags.Input.Files = []
13 flags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01"
14 flags.IOVDb.GlobalTag = "OFLCOND-SDR-BS7T-04-00"
15 enableDetectors(flags, ["Pixel", "SCT", "TRT"])
16 flags.lock()
17 
18 # Main services
19 from AthenaConfiguration.MainServicesConfig import MainEvgenServicesCfg
21 
22 # GeoModel
23 from AtlasGeoModel.GeoModelConfig import GeoModelCfg
24 acc.merge( GeoModelCfg(flags) )
25 
26 # Pool writing
27 acc.addEventAlgo( CompFactory.InDetRawDataFakeWriter(OutputLevel = DEBUG),
28  sequenceName = 'AthAlgSeq' )
29 
30 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
31 acc.merge(
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
48 import sys
49 sc = acc.run(flags.Exec.MaxEvents)
50 sys.exit(sc.isFailure())
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.DetectorConfigFlags.enableDetectors
def enableDetectors(flags, detectors, toggle_geometry=False)
Definition: DetectorConfigFlags.py:392
python.MainServicesConfig.MainEvgenServicesCfg
def MainEvgenServicesCfg(flags, LoopMgr="AthenaEventLoopMgr", withSequences=True)
Definition: MainServicesConfig.py:349
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16