Skip to content

Commit

Permalink
fail if trying to load hist from multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelHu committed Jul 30, 2024
1 parent 6c9701d commit a2f585e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lgdo/lh5/_serializers/read/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def _h5_read_lgdo(
idx=idx,
use_h5idx=use_h5idx,
field_mask=field_mask,
obj_buf=obj_buf,
obj_buf_start=obj_buf_start,
decompress=decompress,
)

Expand Down Expand Up @@ -406,8 +408,14 @@ def _h5_read_histogram(
idx=None,
use_h5idx=False,
field_mask=None,
obj_buf=None,
obj_buf_start=0,
decompress=True,
):
if obj_buf is not None or obj_buf_start != 0:
msg = "reading a histogram into an existing object buffer is not supported"
raise LH5DecodeError(msg, h5g)

struct, n_rows_read = _h5_read_struct(
h5g,
start_row,
Expand Down

0 comments on commit a2f585e

Please sign in to comment.