Skip to content

Commit

Permalink
Fix getting all branches for nano
Browse files Browse the repository at this point in the history
  • Loading branch information
artlbv committed Mar 3, 2024
1 parent 57c2308 commit 2c7b6de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions menu_tools/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def get_branches(ntuple_path: str, tree: str, obj: str):
elif "L1PhaseII" in tree:
prefix = "L1PhaseII/"
elif "Events" in tree:
prefix = "Events/"
prefix = ""

## nano
if tree == "Events":
obj_branches = [x.split("_")[-1] for x in all_branches if x.startswith(prefix+obj)]
obj_branches = [x.split("_")[-1] for x in all_branches if x.startswith(obj)]
## no nano
else:
obj_branches = [x.removeprefix(prefix + obj) for x in all_branches if x.startswith(prefix+obj)]
Expand Down

0 comments on commit 2c7b6de

Please sign in to comment.