Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
e87397dc
Commit
e87397dc
authored
Mar 12, 2021
by
Tomas Dado
Browse files
Python 3 compatibility change
parent
76178445
Changes
1
Hide whitespace changes
Inline
Side-by-side
PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/python/AodMetaDataReader.py
View file @
e87397dc
...
...
@@ -142,7 +142,7 @@ def extractMetaData(path):
def
mergeMetaData
(
md1
,
md2
):
assert
len
(
md1
)
==
len
(
md2
)
md
=
{}
for
folderName
,
folderData1
in
md1
.
iter
items
():
for
folderName
,
folderData1
in
md1
.
items
():
folderData2
=
md2
[
folderName
]
if
folderData1
is
None
or
folderData2
is
None
:
folderData
=
None
...
...
@@ -166,7 +166,7 @@ def augmentMetaData(metaData):
value
=
metaData
[
'/Generation/Parameters'
][
'HepMCWeightNames'
]
mcWeightIndexByName
=
ast
.
literal_eval
(
value
)
mcWeightNames
=
[]
for
name
,
index
in
mcWeightIndexByName
.
iter
items
():
for
name
,
index
in
mcWeightIndexByName
.
items
():
if
index
>=
len
(
mcWeightNames
):
mcWeightNames
+=
(
None
for
_
in
xrange
(
len
(
mcWeightNames
),
index
+
1
)
)
elif
not
mcWeightNames
[
index
]
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment