trigger rate only clear by ClearTriggerRate() Method.

This commit is contained in:
splitPoleDAQ 2023-12-11 19:02:54 -05:00
parent 0177be09cc
commit 5e82065fc1
3 changed files with 7 additions and 8 deletions

View File

@ -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;
}

View File

@ -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());
}
}
}

View File

@ -474,6 +474,7 @@ void Scope::UpdateScope(){
}else{
leTriggerRate->setStyleSheet("");
leTriggerRate->setText(QString::number(data->TriggerRate[ch]));
data->ClearTriggerRate();
}
int index = data->DataIndex[ch];