Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Check that you can now import the `yaml` and `jinja2` modules in python.
Some tools have additional dependencies that are not required for code generation or library use
- `graphviz` is required for `podio-vis`
- `tabulate` is required for `podio-dump`
- `tqdm` is required for `podio-merge-files`

## Preparing the environment

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pyyaml
jinja2
tabulate
graphviz
tqdm
7 changes: 4 additions & 3 deletions tools/podio-merge-files
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

import argparse
import sys
from tqdm import tqdm

parser = argparse.ArgumentParser(
description="Merge any number of podio files into one, can merge TTree and RNTuple files"
)

parser.add_argument("--output-file", help="name of the output file", required=True)
parser.add_argument("-o","--output-file", help="name of the output file", required=True)
parser.add_argument("files", nargs="+", help="which files to merge")
parser.add_argument(
"--metadata",
Expand Down Expand Up @@ -46,9 +47,9 @@ try:
except ValueError:
is_metadata_available = False # pylint: disable=invalid-name

for category in categories:
for category in tqdm(categories):
all_frames = reader.get(category)
for frame in all_frames:
for frame in tqdm(all_frames, desc=f"Merging category '{category}'"):
writer.write_frame(frame, category)

if args.metadata == "none":
Expand Down
Loading