Skip to content

Commit

Permalink
Merge pull request #44908 from vlimant/autonano_ordering
Browse files Browse the repository at this point in the history
preserving autoNano ordering [14.0.X]
  • Loading branch information
cmsbuild authored May 13, 2024
2 parents 04f86e1 + b158dcc commit 19a436a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PhysicsTools/NanoAOD/python/autoNANO.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ def expandNanoMapping(seqList, mapping, key):
# NOTE: mising key of key=None is interpreted differently than empty string:
# - An empty string recalls the default for the given key
# - None is interpreted as "ignore this"
insertAt=seqList.index(specifiedCommand)
seqList.remove(specifiedCommand)
if key in mappedTo and mappedTo[key] is not None:
seqList.extend(mappedTo[key].split('+'))
allToInsert=mappedTo[key].split('+')
for offset,toInsert in enumerate(allToInsert):
seqList.insert(insertAt+offset,toInsert)
break;
if level==maxLevel:
raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
Expand Down

0 comments on commit 19a436a

Please sign in to comment.