Skip to content

Commit

Permalink
add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
MialLewis committed Dec 19, 2023
1 parent 63b3026 commit 7c79f19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EVSVesuvio/vesuvio_analysis/ICHelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,27 @@ def setOutputDirsForSample(IC, sampleName):

def wsHistoryMatchesInputs(runs, mode, ipfile, localPath):
if not (localPath.is_file()):
print("FILE NOT FOUND")
return False

print("FILE FOUND")
local_ws = Load(Filename=str(localPath))
ws_history = local_ws.getHistory()
metadata = ws_history.getAlgorithmHistory(0)

saved_runs = metadata.getPropertyValue("Filename")
print(f"{saved_runs} v {runs}")
if saved_runs != runs:
print(f"Filename in saved workspace did not match: {saved_runs} and {runs}")
return False

saved_mode = metadata.getPropertyValue("Mode")
print(f"{saved_mode} v {mode}")
if saved_mode != mode:
print(f"Mode in saved workspace did not match: {saved_mode} and {mode}")
return False

saved_ipfile_name = Path(metadata.getPropertyValue("InstrumentParFile")).name
print(f"{saved_ipfile_name} v {ipfile.name}")
if saved_ipfile_name != ipfile.name:
print(
f"IP files in saved workspace did not match: {saved_ipfile_name} and {ipfile.name}"
Expand Down

0 comments on commit 7c79f19

Please sign in to comment.