Skip to content

Commit

Permalink
initial commit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzNeuberger committed Oct 24, 2023
1 parent 663d352 commit 92f1cfa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/pygama/flow/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,16 +605,22 @@ def build_entry_list(

# Perform cuts specified for child or parent level, in that order
for level in [child, parent]:
if self.cuts is None or level not in self.cuts.keys():
continue
cut = self.cuts[level]
# Extract the cut condition if given, otherwise set to ""
cut = ""
if self.cuts is not None:
if level in self.cuts.keys():
cut = self.cuts[level]

col_tiers = self.get_tiers_for_col(cut_cols[level], merge_files=False)

# Tables in first tier of event should be the same for all tiers in one level
tables = self.filedb.df.loc[file, f"{self.tiers[level][0]}_tables"]
if self.table_list is not None:
if level in self.table_list.keys():
tables = self.table_list[level]
else:
continue

# Cut any rows of TCM not relating to requested tables
if level == parent:
f_entries.query(f"{level}_table in {tables}", inplace=True)
Expand Down

0 comments on commit 92f1cfa

Please sign in to comment.