From 5e82065fc1f9e4fd7f5a17ddb60c6436561df6be Mon Sep 17 00:00:00 2001 From: splitPoleDAQ Date: Mon, 11 Dec 2023 19:02:54 -0500 Subject: [PATCH] trigger rate only clear by ClearTriggerRate() Method. --- ClassData.h | 11 +++-------- FSUDAQ.cpp | 3 +++ Scope.cpp | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ClassData.h b/ClassData.h index 0fe8212..73b49a0 100644 --- a/ClassData.h +++ b/ClassData.h @@ -445,19 +445,14 @@ inline void Data::DecodeBuffer(bool fastDecode, int verbose){ ///^===================Calculate trigger rate and first and last Timestamp for(int ch = 0; ch < MaxNChannels; ch++){ if( ch > numInputCh ) continue; + if( DataIndex[ch] < 0 ) continue; if( NumEventsDecoded[ch] > 0 ) { // printf("%s | ch %d | %d %d \n", __func__, ch, LoopIndex[ch], DataIndex[ch]); IsNotRollOverFakeAgg = true; }else{ - TriggerRate[ch] = 0; - NonPileUpRate[ch] = 0; - continue; - } - - if( DataIndex[ch] < 0 ){ - TriggerRate[ch] = 0; - NonPileUpRate[ch] = 0; + // TriggerRate[ch] = 0; + // NonPileUpRate[ch] = 0; continue; } diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index 925a0ed..3898aa0 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -1008,9 +1008,12 @@ void MainWindow::UpdateScalar(){ leTrigger[iDigi][i]->setText(a); leAccept[iDigi][i]->setText(b); + digi[iDigi]->GetData()->ClearTriggerRate(); + if( influx && a != "inf" ){ influx->AddDataPoint("Rate,Bd="+std::to_string(digi[iDigi]->GetSerialNumber()) + ",Ch=" + QString::number(i).rightJustified(2, '0').toStdString() + " value=" + a.toStdString()); } + } } diff --git a/Scope.cpp b/Scope.cpp index b675510..4ba2bbe 100644 --- a/Scope.cpp +++ b/Scope.cpp @@ -474,6 +474,7 @@ void Scope::UpdateScope(){ }else{ leTriggerRate->setStyleSheet(""); leTriggerRate->setText(QString::number(data->TriggerRate[ch])); + data->ClearTriggerRate(); } int index = data->DataIndex[ch];