Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
152
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
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
atlas
athena
Merge requests
!46146
Fix missing import in ELG_prun
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix missing import in ELG_prun
tadej/athena:elg
into
21.2
Overview
6
Commits
1
Pipelines
2
Changes
1
Merged
Tadej Novak
requested to merge
tadej/athena:elg
into
21.2
3 years ago
Overview
6
Commits
1
Pipelines
2
Changes
1
Expand
Fixes missing
ROOT
import after
!41064 (merged)
.
/cc
@krumnack
👍
0
👎
0
Merge request reports
Compare
21.2
21.2 (base)
and
latest version
latest version
8b968aaf
1 commit,
3 years ago
1 file
+
6
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py
+
6
−
5
Options
# Copyright (C) 2002-201
9
CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-20
2
1 CERN for the benefit of the ATLAS collaboration
from
__future__
import
print_function
@@ -50,8 +50,9 @@ def ELG_prun(sample) :
'
useRootCore
'
,
'
useAthenaPackages
'
]
from
ROOT
import
SH
for
opt
in
opts
:
arg
=
sample
.
meta
().
castDouble
(
'
nc_
'
+
opt
,
-
1
,
ROOT
.
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
arg
=
sample
.
meta
().
castDouble
(
'
nc_
'
+
opt
,
-
1
,
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
if
abs
(
arg
+
1
)
>
1e-6
:
cmd
+=
[
"
--
"
+
opt
+
"
=
"
+
str
(
int
(
round
(
arg
)))]
else
:
@@ -60,7 +61,7 @@ def ELG_prun(sample) :
cmd
+=
[
"
--
"
+
opt
+
"
=
"
+
arg
]
for
switch
in
switches
:
arg
=
sample
.
meta
().
castDouble
(
'
nc_
'
+
switch
,
0
,
ROOT
.
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
arg
=
sample
.
meta
().
castDouble
(
'
nc_
'
+
switch
,
0
,
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
if
arg
!=
0
:
cmd
+=
[
"
--
"
+
switch
]
else
:
@@ -80,7 +81,7 @@ def ELG_prun(sample) :
for
opt
in
internalOpts
:
cmd
+=
[
"
--
"
+
opt
+
"
=
"
+
sample
.
meta
().
castString
(
'
nc_
'
+
opt
)]
if
sample
.
meta
().
castDouble
(
'
nc_mergeOutput
'
,
1
,
ROOT
.
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
==
0
or
sample
.
meta
().
castString
(
'
nc_mergeOutput
'
).
upper
()
==
'
FALSE
'
:
if
sample
.
meta
().
castDouble
(
'
nc_mergeOutput
'
,
1
,
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
==
0
or
sample
.
meta
().
castString
(
'
nc_mergeOutput
'
).
upper
()
==
'
FALSE
'
:
#don't set merge script
pass
else
:
@@ -89,7 +90,7 @@ def ELG_prun(sample) :
if
len
(
sample
.
meta
().
castString
(
'
nc_EventLoop_SubmitFlags
'
))
:
cmd
+=
shlex
.
split
(
sample
.
meta
().
castString
(
'
nc_EventLoop_SubmitFlags
'
))
if
sample
.
meta
().
castDouble
(
'
nc_showCmd
'
,
0
,
ROOT
.
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
!=
0
:
if
sample
.
meta
().
castDouble
(
'
nc_showCmd
'
,
0
,
SH
.
MetaObject
.
CAST_NOCAST_DEFAULT
)
!=
0
:
print
(
cmd
)
if
not
os
.
path
.
isfile
(
'
jobcontents.tgz
'
)
:
Loading