From 91c7b798e5d38549a35463417762e8b16a343334 Mon Sep 17 00:00:00 2001 From: sunwen Date: Mon, 3 Jul 2023 17:15:15 +0800 Subject: [PATCH] Add judgment of Parser path. --- src/startReconstructions.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/startReconstructions.cpp b/src/startReconstructions.cpp index d5fc740..58798ae 100644 --- a/src/startReconstructions.cpp +++ b/src/startReconstructions.cpp @@ -34,6 +34,17 @@ void Recon::startReconstructions(const std::string& aDataPath, const std::string MatlabWriter writer(aOutputPath); Parser dataParser(aDataPath); Parser refParser(aDataRefPath); + if(!dataParser.getShotList()->isValid()) + { + RECON_INFO("data path is invalid."); + return; + } + + if(!refParser.getShotList()->isValid()) + { + RECON_INFO("empty water path is invalid."); + return; + } //init total used receiver/emitter/motorPos Matrix motorPosTotal, slList, snList, rlList, rnList; if(transParams::runTransmissionReco && reflectParams::runReflectionReco)