ATLAS Offline Software
EventInfoWrite.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 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.TypedCollections=[]
21 
22 flags.Exec.DebugMessageComponents=["TagInfoMgr",
23  "EventSelector",
24  "EventInfoWriter",
25  "IOVDbMetaDataTool"]
26 
27 flags.lock()
28 StreamName="EventInfoPoolFile1"
29 
30 from AthenaConfiguration.MainServicesConfig import MainEvgenServicesCfg
32 
33 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
34 acc.merge(EventInfoCnvAlgCfg(flags, disableBeamSpot=True), sequenceName="AthAlgSeq")
35 
36 #Add some LAr and Tile conditions, this is the payload obj for this test
37 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
38 acc.merge(LArGMCfg(flags))
39 
40 
41 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArCalibIdMappingCfg,LArFebRodMappingCfg
42 acc.merge(LArOnOffIdMappingCfg(flags))
43 acc.merge(LArCalibIdMappingCfg(flags))
44 acc.merge(LArFebRodMappingCfg(flags))
45 
46 from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
47 acc.merge(TileEMScaleCondAlgCfg(flags))
48 
49 EventSelector=acc.getService("EventSelector")
50 EventSelector.RunNumber = 1
51 EventSelector.EventsPerRun = 0x100000010
52 EventSelector.FirstEvent = 0x100000000
53 EventSelector.EventsPerLB = 1
54 EventSelector.FirstLB = 1
55 EventSelector.InitialTimeStamp = 0
56 EventSelector.TimeStampInterval = 5
57 
58 
59 from EventInfoMgt.TagInfoMgrConfig import TagInfoMgrCfg
60 acc.merge(TagInfoMgrCfg(flags))
61 
62 acc.addEventAlgo(CompFactory.EventInfoWriter(),sequenceName = 'AthAlgSeq')
63 
64 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
65 acc.merge(
67  flags,
68  StreamName,
69  ItemList=[],
70  MetadataItemList=["IOVMetaDataContainer#*"],
71  )
72 )
73 
74 # Change output file catalog to avoid races.
75 acc.getService("PoolSvc").WriteCatalog = 'file:EventInfoTests_catalog.xml'
76 
77 setupLoggingLevels(flags,acc)
78 
79 sys.exit(acc.run(25).isFailure())
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
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:349
python.Utils.setupLoggingLevels
def setupLoggingLevels(flags, ca)
Definition: Control/AthenaConfiguration/python/Utils.py:46
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