ATLAS Offline Software
Loading...
Searching...
No Matches
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
17from AthenaCommon import Logging
18
19# Create an event selector:
20import AthenaCommon.AtlasUnixGeneratorJob
21
22# Generate one dummy event
23from AthenaCommon.AppMgr import AppMgr as appMgr
24appMgr.EvtMax = 1
25
26# Set the SupportedGeometry flag
27from PyUtils.Helpers import release_metadata
28rel_metadata = release_metadata()
29relversion = rel_metadata['release'].split('.')
30if len(relversion) < 3:
31 relversion = rel_metadata['base release'].split('.')
32
33# Configure the comparator algorithm
34from RDBAccessSvc.RDBAccessSvcConf import SourceCompAlg
35SourceCompAlg = SourceCompAlg()
36Logging.log.info("CompareGeomDBSource.py obtained major release version %s", relversion[0])
37SourceCompAlg.SupportedGeometry = relversion[0]
38
39# Add the comparator to the AlgSequence
40from AthenaCommon.AlgSequence import AlgSequence
41topSequence = AlgSequence()
42topSequence += SourceCompAlg
43
44
45
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177