Skip to content

Commit

Permalink
Make path a propertty
Browse files Browse the repository at this point in the history
  • Loading branch information
EinarElen authored and tomeichlersmith committed Nov 3, 2023
1 parent d46acea commit c3fd353
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Validation/src/Validation/_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def __init__(self, filepath, colmod = None, hist_kwargs = dict(), **open_kwargs)
self.__file = uproot.open(filepath, **open_kwargs)
self.__colmod = colmod
self.__df = None
self.path = filepath

if 'histtype' not in hist_kwargs :
hist_kwargs['histtype'] = 'step'
Expand Down Expand Up @@ -105,7 +104,12 @@ def is_events(self) :
Otherwise, we assume that it is a histogram file.
"""
return 'LDMX_Events' in self.__file


@property
def path(self):
"""Retrun the path to the file on disk"""
return self.__file.file_path

def events(self, **kwargs) :
"""Callback for retrieving a full in-memory data frame of the events
Expand Down

0 comments on commit c3fd353

Please sign in to comment.