Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Davide Di Croce
athena
Commits
5db7d44f
Verified
Commit
5db7d44f
authored
11 months ago
by
Tadej Novak
Browse files
Options
Downloads
Patches
Plain Diff
CP algs: Make mapUserName a static method of ContainerConfig
parent
1a75b0fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigAccumulator.py
+11
-13
11 additions, 13 deletions
...thms/AnalysisAlgorithmsConfig/python/ConfigAccumulator.py
with
11 additions
and
13 deletions
PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigAccumulator.py
+
11
−
13
View file @
5db7d44f
...
@@ -4,17 +4,6 @@ import AnaAlgorithm.DualUseConfig as DualUseConfig
...
@@ -4,17 +4,6 @@ import AnaAlgorithm.DualUseConfig as DualUseConfig
from
AthenaConfiguration.Enums
import
LHCPeriod
,
FlagEnum
from
AthenaConfiguration.Enums
import
LHCPeriod
,
FlagEnum
import
re
import
re
def
mapUserName
(
name
,
*
,
noSysSuffix
)
:
"""
map an internal name to a name for systematics data handles
Right now this just means appending a _%SYS% to the name.
"""
if
not
noSysSuffix
:
return
name
+
"
_%SYS%
"
else
:
return
name
class
DataType
(
FlagEnum
):
class
DataType
(
FlagEnum
):
"""
holds the various data types as an enum
"""
"""
holds the various data types as an enum
"""
Data
=
'
data
'
Data
=
'
data
'
...
@@ -79,9 +68,18 @@ class ContainerConfig :
...
@@ -79,9 +68,18 @@ class ContainerConfig :
raise
Exception
(
"
should not get here, reading container name before created:
"
+
self
.
name
)
raise
Exception
(
"
should not get here, reading container name before created:
"
+
self
.
name
)
return
self
.
sourceName
return
self
.
sourceName
if
self
.
maxIndex
and
self
.
index
==
self
.
maxIndex
:
if
self
.
maxIndex
and
self
.
index
==
self
.
maxIndex
:
return
mapUserName
(
self
.
name
,
noSysSuffix
=
self
.
noSysSuffix
)
return
self
.
systematicsName
(
self
.
name
,
noSysSuffix
=
self
.
noSysSuffix
)
return
mapUserName
(
self
.
name
+
"
_STEP
"
+
str
(
self
.
index
),
noSysSuffix
=
self
.
noSysSuffix
)
return
self
.
systematicsName
(
f
"
{
self
.
name
}
_STEP
{
self
.
index
}
"
,
noSysSuffix
=
self
.
noSysSuffix
)
@staticmethod
def
systematicsName
(
name
,
*
,
noSysSuffix
)
:
"""
map an internal name to a name for systematics data handles
Right now this just means appending a _%SYS% to the name.
"""
if
not
noSysSuffix
:
return
name
+
"
_%SYS%
"
else
:
return
name
def
nextPass
(
self
)
:
def
nextPass
(
self
)
:
self
.
maxIndex
=
self
.
index
self
.
maxIndex
=
self
.
index
...
...
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