Skip to content
Snippets Groups Projects
Commit 7a45a68f authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'IOVDb.DBConnectionFlag' into 'master'

New Config: Introduce flag to set IOVDbSvc.dbConnection

See merge request atlas/athena!39706
parents c2191a8b e101d791
No related branches found
No related tags found
No related merge requests found
...@@ -156,6 +156,7 @@ def _createCfgFlags(): ...@@ -156,6 +156,7 @@ def _createCfgFlags():
# Run dependent simulation # Run dependent simulation
# map from runNumber to timestamp; migrated from RunDMCFlags.py # map from runNumber to timestamp; migrated from RunDMCFlags.py
acf.addFlag("IOVDb.RunToTimestampDict", lambda prevFlags: getRunToTimestampDict()) acf.addFlag("IOVDb.RunToTimestampDict", lambda prevFlags: getRunToTimestampDict())
acf.addFlag("IOVDb.DBConnection", lambda prevFlags : "sqlite://;schema=mycool.db;dbname=" + prevFlags.IOVDb.DatabaseInstance)
def __bfield(): def __bfield():
......
...@@ -34,12 +34,10 @@ def IOVDbSvcCfg(configFlags): ...@@ -34,12 +34,10 @@ def IOVDbSvcCfg(configFlags):
# Set up IOVDbSvc # Set up IOVDbSvc
iovDbSvc=IOVDbSvc() iovDbSvc=IOVDbSvc()
dbname=configFlags.IOVDb.DatabaseInstance
iovDbSvc.dbConnection=configFlags.IOVDb.DBConnection
localfile="sqlite://;schema=mycool.db;dbname="
iovDbSvc.dbConnection=localfile+dbname
# setup knowledge of dbinstance in IOVDbSvc, for global tag x-check # setup knowledge of dbinstance in IOVDbSvc, for global tag x-check
iovDbSvc.DBInstance=dbname iovDbSvc.DBInstance=configFlags.IOVDb.DatabaseInstance
if 'FRONTIER_SERVER' in os.environ.keys() and os.environ['FRONTIER_SERVER']!="": if 'FRONTIER_SERVER' in os.environ.keys() and os.environ['FRONTIER_SERVER']!="":
iovDbSvc.CacheAlign=3 iovDbSvc.CacheAlign=3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment