ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
AtlasTest
DatabaseTest
AthenaPoolTest
python
EventInfoReadWrite.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.Utils
import
setupLoggingLevels
7
8
def
eventInfoTestCfg
(step=1):
9
flags=initConfigFlags()
10
#Set a number of flags to avoid input-file peeking
11
flags.Input.isMC=
True
12
flags.Input.RunNumbers=[1]
13
flags.LAr.doAlign=
False
14
15
flags.Exec.DebugMessageComponents=[
"TagInfoMgr"
,
16
"EventInfoWriter"
,
17
"IOVDbMetaDataTool"
]
18
19
if
(step>0):
20
flags.Input.Files=[
"myEventInfoPoolFile%i.pool.root"
% (step-1),]
21
22
StreamName=
"EventInfoPoolFile%i"
% step
23
flags.lock()
24
25
26
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
27
acc=MainServicesCfg(flags)
28
29
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
30
acc.merge(PoolReadCfg(flags))
31
32
#Add some LAr and Tile conditions, this is the payload obj for this test
33
from
LArGeoAlgsNV.LArGMConfig
import
LArGMCfg
34
acc.merge(LArGMCfg(flags))
35
36
37
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingCfg, LArCalibIdMappingCfg,LArFebRodMappingCfg
38
acc.merge(LArOnOffIdMappingCfg(flags))
39
acc.merge(LArCalibIdMappingCfg(flags))
40
acc.merge(LArFebRodMappingCfg(flags))
41
42
from
TileConditions.TileEMScaleConfig
import
TileEMScaleCondAlgCfg
43
acc.merge(TileEMScaleCondAlgCfg(flags))
44
45
from
EventInfoMgt.TagInfoMgrConfig
import
TagInfoMgrCfg
46
acc.merge(TagInfoMgrCfg(flags))
47
48
49
writer=CompFactory.EventInfoWriter()
50
if
(step==3):
51
writer.CreateDummyTags =
True
52
if
(step==4):
53
writer.CreateDummyOverrideTags =
True
54
if
(step==5):
55
writer.RemoveDummyTags =
True
56
57
acc.addEventAlgo(writer,sequenceName =
'AthAlgSeq'
)
58
59
# Make RootCollection
60
acc.getService(
"EventSelector"
).CollectionType =
"RootCollection"
61
62
from
OutputStreamAthenaPool.OutputStreamConfig
import
OutputStreamCfg
63
acc.merge(
64
OutputStreamCfg(
65
flags,
66
StreamName,
67
ItemList=[],
68
MetadataItemList=[
"IOVMetaDataContainer#*"
],
69
)
70
)
71
72
# Change output file catalog to avoid races.
73
acc.getService(
"PoolSvc"
).WriteCatalog =
'file:EventInfoTests_catalog.xml'
74
75
#Tag differences are intentional here
76
acc.getService(
"GeoModelSvc"
).IgnoreTagDifference =
True
77
78
setupLoggingLevels(flags,acc)
79
80
return
acc.run().isFailure()
EventInfoReadWrite.eventInfoTestCfg
eventInfoTestCfg(step=1)
Definition
EventInfoReadWrite.py:8
Generated on
for ATLAS Offline Software by
1.17.0