From 82de3763a9c4db9cadf573f5c0470ef39b247552 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Wed, 21 Aug 2024 14:50:55 -0400 Subject: [PATCH] delete the timing thread in Analyzer --- analyzers/Analyser.cpp | 10 ++++++++++ analyzers/NeutronGamma.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/analyzers/Analyser.cpp b/analyzers/Analyser.cpp index 7e3cf6c..417c16f 100644 --- a/analyzers/Analyser.cpp +++ b/analyzers/Analyser.cpp @@ -43,6 +43,16 @@ Analyzer::Analyzer(Digitizer ** digi, unsigned int nDigi, QMainWindow * parent ) } Analyzer::~Analyzer(){ + + if( buildTimerThread ){ + if( !buildTimerThread->isStopped() ){ + buildTimerThread->Stop(); + buildTimerThread->quit(); + buildTimerThread->wait(); + } + delete buildTimerThread; + } + delete influx; delete mb; delete [] dataList; diff --git a/analyzers/NeutronGamma.h b/analyzers/NeutronGamma.h index a7494bb..6b505ed 100644 --- a/analyzers/NeutronGamma.h +++ b/analyzers/NeutronGamma.h @@ -167,7 +167,7 @@ inline void NeutronGamma::SetUpCanvas(){ // } // histLayout->addWidget(hist2D[0][0], 0, 0); - hist2D = new Histogram2D("Neutron-Gamma", "PSD = (l-s)/l", "Short Energy [ch]", nBin, eMin, eMax, nBin, 0, 1); + hist2D = new Histogram2D("Neutron-Gamma", "Long Energy [ch]", "PSD = (l-s)/l", nBin, eMin, eMax, nBin, 0, 1); histLayout->addWidget(hist2D, 0, 0);