ATLAS Offline Software
EventInfoWrite.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 
4 from AthenaConfiguration.AllConfigFlags import initConfigFlags
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from AthenaConfiguration.TestDefaults import defaultGeometryTags
7 from AthenaConfiguration.Utils import setupLoggingLevels
8 from Campaigns.Utils import Campaign
9 import sys
10 
11 #Set a number of flags to avoid input-file peeking
13 flags.Input.isMC=True
14 flags.Input.RunNumbers=[1]
15 flags.Input.TimeStamps=[0]
16 flags.IOVDb.GlobalTag = 'OFLCOND-SDR-BS14T-IBL-06'
17 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN2
18 flags.LAr.doAlign=False
19 flags.Input.MCCampaign=Campaign.Unknown
20 flags.Input.Files=[]
21 flags.Input.TypedCollections=[]
22 
23 flags.Exec.DebugMessageComponents=["TagInfoMgr",
24  "EventSelector",
25  "EventInfoWriter",
26  "IOVDbMetaDataTool"]
27 
28 flags.lock()
29 StreamName="EventInfoPoolFile1"
30 
31 from AthenaConfiguration.MainServicesConfig import MainEvgenServicesCfg
33 
34 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
35 acc.merge(EventInfoCnvAlgCfg(flags, disableBeamSpot=True), sequenceName="AthAlgSeq")
36 
37 #Add some LAr and Tile conditions, this is the payload obj for this test
38 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
39 acc.merge(LArGMCfg(flags))
40 
41 
42 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArCalibIdMappingCfg,LArFebRodMappingCfg
43 acc.merge(LArOnOffIdMappingCfg(flags))
44 acc.merge(LArCalibIdMappingCfg(flags))
45 acc.merge(LArFebRodMappingCfg(flags))
46 
47 from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
48 acc.merge(TileEMScaleCondAlgCfg(flags))
49 
50 EventSelector=acc.getService("EventSelector")
51 EventSelector.RunNumber = 1
52 EventSelector.EventsPerRun = 0x100000010
53 EventSelector.FirstEvent = 0x100000000
54 EventSelector.EventsPerLB = 1
55 EventSelector.FirstLB = 1
56 EventSelector.InitialTimeStamp = 0
57 EventSelector.TimeStampInterval = 5
58 
59 
60 from EventInfoMgt.TagInfoMgrConfig import TagInfoMgrCfg
61 acc.merge(TagInfoMgrCfg(flags))
62 
63 acc.addEventAlgo(CompFactory.EventInfoWriter(),sequenceName = 'AthAlgSeq')
64 
65 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
66 acc.merge(
68  flags,
69  StreamName,
70  ItemList=[],
71  MetadataItemList=["IOVMetaDataContainer#*"],
72  )
73 )
74 
75 # Change output file catalog to avoid races.
76 acc.getService("PoolSvc").WriteCatalog = 'file:EventInfoTests_catalog.xml'
77 
78 setupLoggingLevels(flags,acc)
79 
80 sys.exit(acc.run(25).isFailure())
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=None, MetadataItemList=None, disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=None, HelperTools=None)
Definition: OutputStreamConfig.py:13
LArCablingConfig.LArFebRodMappingCfg
def LArFebRodMappingCfg(configFlags)
Definition: LArCablingConfig.py:80
python.TagInfoMgrConfig.TagInfoMgrCfg
def TagInfoMgrCfg(flags, tagValuePairs={})
Definition: TagInfoMgrConfig.py:6
python.MainServicesConfig.MainEvgenServicesCfg
def MainEvgenServicesCfg(flags, LoopMgr="AthenaEventLoopMgr", withSequences=True)
Definition: MainServicesConfig.py:415
python.Utils.setupLoggingLevels
def setupLoggingLevels(flags, ca)
Definition: Control/AthenaConfiguration/python/Utils.py:50
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.TileEMScaleConfig.TileEMScaleCondAlgCfg
def TileEMScaleCondAlgCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:10
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
LArCablingConfig.LArCalibIdMappingCfg
def LArCalibIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:83