ATLAS Offline Software
jobOptions.CompareGeomDBSources.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 # This job options compares geometry data from two sources
4 #
5 # In order run this script you need to define two sessions named Session0 and Session1
6 # in dblookup.xml and authentication.xml files, and point your runtime to these files
7 # using CORAL_DBLOOKUP_PATH and CORAL_AUTH_PATH respectively
8 #
9 # The SourceCompAlg will compare data corresponding to one global geometry tag specified
10 # via the SourceCompAlg.GlobalTag property. In case no value is set to this property,
11 # the algorithm will compare all ATLAS locked supported tags.
12 #
13 # Comparison results will be stored into GeometryDBTagDiff.log file in the run directory.
14 # If no differences are found, then the log file will be empty
15 #
16 
17 from AthenaCommon import Logging
18 
19 # Create an event selector:
20 import AthenaCommon.AtlasUnixGeneratorJob
21 
22 # Generate one dummy event
23 from AthenaCommon.AppMgr import AppMgr as appMgr
24 appMgr.EvtMax = 1
25 
26 # Set the SupportedGeometry flag
27 from PyUtils.Helpers import release_metadata
28 rel_metadata = release_metadata()
29 relversion = rel_metadata['release'].split('.')
30 if len(relversion) < 3:
31  relversion = rel_metadata['base release'].split('.')
32 
33 # Configure the comparator algorithm
34 from RDBAccessSvc.RDBAccessSvcConf import SourceCompAlg
35 SourceCompAlg = SourceCompAlg()
36 Logging.log.info("CompareGeomDBSource.py obtained major release version %s", relversion[0])
37 SourceCompAlg.SupportedGeometry = relversion[0]
38 
39 # Add the comparator to the AlgSequence
40 from AthenaCommon.AlgSequence import AlgSequence
41 topSequence = AlgSequence()
42 topSequence += SourceCompAlg
43 
44 
45 
jobOptions.SourceCompAlg
SourceCompAlg
Definition: jobOptions.CompareGeomDBSources.py:35
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.Helpers.release_metadata
def release_metadata()
Definition: Tools/PyUtils/python/Helpers.py:143
Trk::split
@ split
Definition: LayerMaterialProperties.h:38