From b3ee2000edd402a1ce5bf03f575fcc5722a03758 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Mon, 22 Dec 2025 16:09:32 +0100 Subject: [PATCH] perform Fourier phase checks only if a Fourier block is present and not set to power spectra. --- src/classes/PMsrHandler.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index 963cb1cc3..07ea005ae 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -6735,7 +6735,11 @@ Bool_t PMsrHandler::CheckRRFSettings() */ Bool_t PMsrHandler::CheckRealFFT() { - // check + // if no Fourier block is present, nothing needs to be checked + if (!fFourier.fFourierBlockPresent) + return true; + + // if Fourier is set to power spectra, no phase checks are needed if (fFourier.fPlotTag == FOURIER_PLOT_POWER) return true; @@ -6756,15 +6760,15 @@ Bool_t PMsrHandler::CheckRealFFT() // make sure that FOURIER phases are defined if ((fFourier.fPhase.size() == 0) && (fFourier.fPhaseParamNo.size() == 0)) { - fLastErrorMsg.str(""); - fLastErrorMsg.clear(); - fLastErrorMsg << ">> PMsrHandler::ReadMsrFile: **ERROR** for FOURIER plot != POWER,\n"; - fLastErrorMsg << ">> phases need to be defined in the FOURIER block!\n"; - fLastErrorMsg << ">> Examples:\n"; - fLastErrorMsg << ">> phase parR7 par9 par13 par16\n"; - fLastErrorMsg << ">> where parR7 is the reference phase, and the others the relative phases.\n"; - fLastErrorMsg << ">> I.e. phase of run 2: parR7 + par9, etc.\n"; - fLastErrorMsg << ">> For further details see the docu.\n"; + fLastErrorMsg.str(""); + fLastErrorMsg.clear(); + fLastErrorMsg << ">> PMsrHandler::ReadMsrFile: **ERROR** for FOURIER plot != POWER,\n"; + fLastErrorMsg << ">> phases need to be defined in the FOURIER block!\n"; + fLastErrorMsg << ">> Examples:\n"; + fLastErrorMsg << ">> phase parR7 par9 par13 par16\n"; + fLastErrorMsg << ">> where parR7 is the reference phase, and the others the relative phases.\n"; + fLastErrorMsg << ">> I.e. phase of run 2: parR7 + par9, etc.\n"; + fLastErrorMsg << ">> For further details see the docu.\n"; std::cerr << std::endl << fLastErrorMsg.str(); return false; }