bug fix when open digitizer to set no trace

This commit is contained in:
Calem@RAISOR 2024-09-14 17:41:50 -05:00
parent f68d26de65
commit be62125e77
5 changed files with 13 additions and 6 deletions

2
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.fsu
*.root
*.bin
*.log
core.*
@ -30,6 +31,7 @@ Bin2Root
data
Data
raw_binary
log
*.d
*.pcm

View File

@ -1331,7 +1331,7 @@ void Digitizer::SetBits(Reg address, unsigned int bitValue, unsigned int bitLeng
DebugPrint("%s", "Digitizer");
if( softwareDisable ) return;
if( AcqRun ) return;
///printf("address : 0x%X, value : 0x%X, len : %d, pos : %d, ch : %d \n", address, bitValue, bitLength, bitSmallestPos, ch);
// printf("address : 0x%X, value : 0x%X, len : %d, pos : %d, ch : %d \n", address, bitValue, bitLength, bitSmallestPos, ch);
uint32_t bit ;
uint32_t bitmask = (uint(pow(2, bitLength)-1) << bitSmallestPos);
int tempCh = ch;

View File

@ -207,7 +207,7 @@ class Digitizer{
}
void SetTrace(bool onOff){
SetBits(DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace, onOff, -1);
SetBits(DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace, (short) onOff, -1);
}
};

6
FSUDAQ
View File

@ -2,6 +2,10 @@
timestamp=$(date +%Y%m%d_%H%M%S)
outFile=program_${timestamp}.log
outFile=log/program_${timestamp}.log
mkdir -p "$(dirname "$outFile")"
echo "FSUDAQ, save stdout to $outFile"
stdbuf -oL ./FSUDAQ_Qt6 | tee $outFile

View File

@ -693,9 +693,6 @@ void FSUDAQ::OpenDigitizers(){
digi[i] = new Digitizer(portList[i].first, portList[i].second);
//digi[i]->Reset();
//===== set no trace, even when FSQDAQ segfault at scope, the digitizer will save no trace
digi[i]->SetTrace(false);
if( cbOpenMethod->currentData().toInt() == 2 ) {
digi[i]->ProgramBoard();
}
@ -740,6 +737,10 @@ void FSUDAQ::OpenDigitizers(){
}
digi[i]->ReadAllSettingsFromBoard(true);
//===== set no trace, even when FSQDAQ segfault at scope, the digitizer will save no trace
digi[i]->SetTrace(false);
// if( digi[i]->GetDPPType() == V1730_DPP_PHA_CODE) digi[i]->WriteRegister(DPP::BoardConfiguration, 0xE8915);
readDataThread[i] = new ReadDataThread(digi[i], i);
connect(readDataThread[i], &ReadDataThread::sendMsg, this, &FSUDAQ::LogMsg);