Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frank Winklmeier
athena
Commits
a62bb8f3
Commit
a62bb8f3
authored
3 years ago
by
Frank Winklmeier
Browse files
Options
Downloads
Patches
Plain Diff
TrigConfigSvc: fix broken getKeysFromCool method
parent
158dfd8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py
+8
-6
8 additions, 6 deletions
...Configuration/TrigConfigSvc/python/TriggerConfigAccess.py
with
8 additions
and
6 deletions
Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py
+
8
−
6
View file @
a62bb8f3
# Copyright (C) 2002-202
0
CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-202
1
CERN for the benefit of the ATLAS collaboration
from
.TrigConfigSvcCfg
import
getTrigConfigFromFlag
,
getL1MenuFileName
,
getHLTMenuFileName
,
getL1PrescalesSetFileName
,
getHLTPrescalesSetFileName
,
getBunchGroupSetFileName
,
getHLTJobOptionsFileName
,
getHLTMonitoringFileName
from
TrigConfIO.L1TriggerConfigAccess
import
L1MenuAccess
,
L1PrescalesSetAccess
,
BunchGroupSetAccess
from
TrigConfIO.HLTTriggerConfigAccess
import
HLTMenuAccess
,
HLTPrescalesSetAccess
,
HLTJobOptionsAccess
,
HLTMonitoringAccess
from
PyUtils.Decorator
s
import
memoiz
e
from
functool
s
import
lru_cach
e
"""
Access to the trigger configuration in python is provided depending on
...
...
@@ -40,9 +40,11 @@ are then loaded from the DB.
"""
@
memoize
@
lru_cache
(
maxsize
=
None
)
def
getKeysFromCool
(
runNr
,
lbNr
=
0
):
from
TrigConfStorage
import
TriggerCoolUtil
"""
Return dictionary of trigger keys for given run and lumiblock number
"""
from
TrigConfStorage.TriggerCoolUtil
import
TriggerCoolUtil
condb
=
"
CONDBR2
"
if
runNr
>
236108
else
"
COMP200
"
db
=
TriggerCoolUtil
.
GetConnection
(
condb
)
run_range
=
[[
runNr
,
runNr
]]
...
...
@@ -64,7 +66,7 @@ def getKeysFromCool(runNr, lbNr = 0):
dbaliasMapping
=
{
"
TRIGGERDBR2R
"
:
"
TRIGGERDB
"
,
"
TRIGGERDBV2
"
:
"
TRIGGERDB_RUN1
"
}
if
d
[
"
DB
"
]
in
dbaliasMapping
:
d
[
"
DB
"
]
=
dbaliasMapping
[
d
b
[
"
DB
"
]
]
d
[
"
DB
"
]
=
dbaliasMapping
[
d
[
"
DB
"
]
]
return
d
...
...
@@ -220,4 +222,4 @@ def getHLTMonitoringAccess( flags = None ):
raise
NotImplementedError
(
"
Python access to the trigger configuration (HLT menu) from in-file metadata not yet implemented
"
)
else
:
raise
RuntimeError
(
"
Unknown source of trigger configuration: %s
"
%
tc
[
"
SOURCE
"
])
return
cfg
\ No newline at end of file
return
cfg
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment