Skip to content

Commit

Permalink
remove /scenarios/ and fix uproot.open()
Browse files Browse the repository at this point in the history
  • Loading branch information
kondratyevd committed Jun 28, 2024
1 parent 9138788 commit b1e704a
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 279 deletions.
345 changes: 160 additions & 185 deletions notebooks/2.1_Single-file.ipynb

Large diffs are not rendered by default.

25 changes: 0 additions & 25 deletions scenarios/common.py

This file was deleted.

54 changes: 0 additions & 54 deletions scenarios/generator_2p1.py

This file was deleted.

12 changes: 0 additions & 12 deletions scenarios/utils.py

This file was deleted.

6 changes: 3 additions & 3 deletions src/uproot_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ def worker_func(self, args, **kwargs):
files = args["files"]
columns = args["columns"]
for file in files:
tree = self.open_nanoaod(file)
for column in columns:
col_stats = self.process_column(file, column, **kwargs)
col_stats = self.process_column(tree, column, **kwargs)
col_stats_df = pd.concat([col_stats_df, col_stats])
self.run_worker_operation()
return col_stats_df


def process_column(self, file, column, **kwargs):
tree = self.open_nanoaod(file)
def process_column(self, tree, column, **kwargs):
column_data = tree[column]
col_stats = pd.DataFrame([{
"file": tree.file.file_path,
Expand Down

0 comments on commit b1e704a

Please sign in to comment.