diff --git a/ClassData.h b/ClassData.h index 49a3ce6..69c1253 100644 --- a/ClassData.h +++ b/ClassData.h @@ -101,7 +101,7 @@ inline Data::Data(){ ch2ns = 2.0; boardSN = 0; DPPType = V1730_DPP_PHA_CODE; - IsNotRollOverFakeAgg = true; + IsNotRollOverFakeAgg = false; buffer = NULL; for ( int i = 0; i < MaxNChannels; i++) TotNumEvents[i] = 0; ClearData(); @@ -136,7 +136,7 @@ inline void Data::ClearTriggerRate(){ inline void Data::ClearData(){ nByte = 0; AllocatedSize = 0; - IsNotRollOverFakeAgg = true; + IsNotRollOverFakeAgg = false; for( int i = 0 ; i < MaxNChannels; i++){ NumEvents[i] = 0; firstTimestamp[0] = -1; @@ -196,7 +196,7 @@ inline void Data::SaveBuffer(const char * fileName){ inline void Data::PrintStat() const{ - if( IsNotRollOverFakeAgg ) { + if( !IsNotRollOverFakeAgg ) { printf(" this is roll-over fake event or no events.\n"); return; } @@ -267,9 +267,11 @@ inline void Data::DecodeBuffer(bool fastDecode, int verbose){ nw = nw + 1; word = ReadBuffer(nw, verbose); unsigned int BoardID = ((word >> 27) & 0x1F); + unsigned short pattern = ((word >> 8 ) & 0x7FFF ); bool BoardFailFlag = ((word >> 26) & 0x1 ); unsigned int ChannelMask = ( word & 0xFF ) ; - if( verbose >= 1 ) printf("Board ID(type) : %d, FailFlag = %d, ChannelMask = 0x%X\n", BoardID, BoardFailFlag, ChannelMask); + if( verbose >= 1 ) printf("Board ID(type) : %d, FailFlag = %d, Patten = %u, ChannelMask = 0x%X\n", + BoardID, BoardFailFlag, pattern, ChannelMask); if( BoardID > 0 ) { switch(BoardID){ @@ -278,9 +280,13 @@ inline void Data::DecodeBuffer(bool fastDecode, int verbose){ } } - nw = nw + 2; - unsigned int AggCounter = ReadBuffer(nw, verbose); - if( verbose >= 2 ) printf("Agg Counter : %u \n", AggCounter); + nw = nw + 1; + unsigned int bdAggCounter = ReadBuffer(nw, verbose); + if( verbose >= 1 ) printf("Board Agg Counter : %u \n", bdAggCounter & 0x7FFFFF); + + nw = nw + 1; + unsigned int bdAggTimeTag = ReadBuffer(nw, verbose); + if( verbose >= 2 ) printf("Agg Counter : %u \n", bdAggTimeTag); for( int chMask = 0; chMask < MaxNChannels/2 ; chMask ++ ){ if( ((ChannelMask >> chMask) & 0x1 ) == 0 ) continue; @@ -304,7 +310,7 @@ inline void Data::DecodeBuffer(bool fastDecode, int verbose){ ///Calculate trigger rate and first and last Timestamp for(int ch = 0; ch < MaxNChannels; ch++){ - if( NumEventsDecoded[ch] > 0 ) IsNotRollOverFakeAgg = false; + if( NumEventsDecoded[ch] > 0 ) IsNotRollOverFakeAgg = true; unsigned long long dTime = Timestamp[ch][NumEvents[ch]-1] - Timestamp[ch][NumEvents[ch] - NumEventsDecoded[ch]]; double sec = dTime * ch2ns / 1e9; TriggerRate[ch] = NumEventsDecoded[ch]/sec; diff --git a/EventBuilder.cpp b/EventBuilder.cpp index 640d08e..065a982 100644 --- a/EventBuilder.cpp +++ b/EventBuilder.cpp @@ -220,7 +220,7 @@ int main(int argc, char **argv) { if( debug) printf("---------- event built : %llu \n", evID); - if( countBdAgg > 74) break; + //if( countBdAgg > 74) break; }while(!feof(haha) && ftell(haha) < inFileSize); @@ -250,6 +250,7 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is unsigned long long firstTimeStamp = -1; unsigned long long lastTimeStamp = 0; unsigned long long smallestLastTimeStamp = -1; + unsigned int maxNumEvent = 0; for( int chI = 0; chI < MaxNChannels ; chI ++){ if( data->NumEvents[chI] == 0 ) continue; @@ -260,15 +261,18 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is if( data->Timestamp[chI][ev] > lastTimeStamp ) { lastTimeStamp = data->Timestamp[chI][ev]; } + if( ev + 1 > maxNumEvent ) maxNumEvent = ev + 1; if( data->Timestamp[chI][ev] < smallestLastTimeStamp ){ smallestLastTimeStamp = data->Timestamp[chI][ev]; } } + if( maxNumEvent == 0 ) return; + if( verbose) printf("================ time range : %llu - %llu, smallest Last %llu\n", firstTimeStamp, lastTimeStamp, smallestLastTimeStamp ); unsigned short lastEv[MaxNChannels] = {0}; /// store the last event number for each ch - unsigned short exhaustedCh = 0; /// to stop - bool breakFlag = false; + unsigned short exhaustedCh = 0; /// when exhaustedCh == MaxNChannels ==> stop + bool singleChannelExhaustedFlag = false; /// when a single ch has data but exhaused ==> stop do { @@ -283,7 +287,7 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is ch1st = chI; } } - if( !isLastData && ((smallestLastTimeStamp - time1st) < NTimeWinForBuffer * timeWin) ) break; + if( !isLastData && ((smallestLastTimeStamp - time1st) < NTimeWinForBuffer * timeWin) && maxNumEvent < MaxNData * 0.6 ) break; if( ch1st > MaxNChannels ) break; multi ++; @@ -307,6 +311,7 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is /// build the rest of the event exhaustedCh = 0; + singleChannelExhaustedFlag = false; for( int chI = ch1st; chI < ch1st + MaxNChannels; chI ++){ unsigned short chX = chI % MaxNChannels; if( data->NumEvents[chX] == 0 ) { @@ -315,6 +320,7 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is } if( data->NumEvents[chX] <= lastEv[chX] ) { exhaustedCh ++; + singleChannelExhaustedFlag = true; continue; } if( timeWin == 0 ) continue; @@ -359,16 +365,7 @@ void EventBuilder(Data * data, const unsigned int timeWin, bool traceOn, bool is evID++; multi = 0; - /// Check Last event break; - breakFlag = false; - for( int chI = 0; chI < MaxNChannels ; chI++){ - if( lastEv[chI] == 0 ) continue; - if( lastEv[chI] >= data->NumEvents[chI] ) { - breakFlag = true; - break; - } - } - }while( !breakFlag || (exhaustedCh < MaxNChannels) ); + }while( !singleChannelExhaustedFlag || (exhaustedCh < MaxNChannels) ); ///========== clear built data /// move the last data to the top, diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index 78a5f1d..c3b8238 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -19,30 +19,6 @@ #include "FSUDAQ.h" -enum MenuIdentifiers{ - - M_DIGITIZER_OPEN, - M_FILE_OPEN, - M_EXIT, - M_LOAD_SETTINGS, - M_TRIGGER_SUMMARY, - M_CH_SETTING_PHA, - M_CH_SETTING_PSD, - M_REGISTER_SETTING, - M_BOARD_SETTINGS, - M_PROGRAM_SETTINGS, - M_FINDPEAKS -}; - -enum ModeIdentifiers{ - - Mode_EnergyHist, - Mode_CountHist, - Mode_Oscilloscope, - Mode_DataRun - -}; - long get_time(){ long time_ms; struct timeval t1; @@ -52,6 +28,20 @@ long get_time(){ return time_ms; } +Double_t traceFunc(Double_t *x, Double_t *par){ + ///par[0] = baseline + ///par[1] = start time + ///par[2] = rise time + ///par[3] = Amp + ///par[4] = decay time + Double_t result = par[0]; + if(x[0] > par[1]){ + Double_t y = x[0]-par[1]; + result += par[3] *(1 - TMath::Exp( - y / par[2])) * TMath::Exp(-y / par[4]); + } + return result; +} + ///============= Global variable TH1F * hEnergy[MaxNBoards][MaxNChannels] = {NULL}; TH1F * hChannel[MaxNBoards] = {NULL}; @@ -77,6 +67,29 @@ TGNumberEntry * MainWindow::runIDEntry = NULL; BoardSetting * MainWindow::boardSetting = NULL; +enum MenuIdentifiers{ + + M_DIGITIZER_OPEN, + M_FILE_OPEN, + M_EXIT, + M_LOAD_SETTINGS, + M_TRIGGER_SUMMARY, + M_CH_SETTING_PHA, + M_CH_SETTING_PSD, + M_REGISTER_SETTING, + M_BOARD_SETTINGS, + M_PROGRAM_SETTINGS, + M_FINDPEAKS +}; + +enum ModeIdentifiers{ + + Mode_EnergyHist, + Mode_CountHist, + Mode_Oscilloscope, + Mode_DataRun + +}; MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) { @@ -236,7 +249,7 @@ MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) { LogMsg((char*)"The LogMsg is not complete for all actions. [update later]"); LogMsg((char*)"Please \"Open Digitizers\" to start."); - //HandleMenu(M_DIGITIZER_OPEN); + HandleMenu(M_DIGITIZER_OPEN); //HandleMenu(M_BOARD_SETTINGS); //HandleMenu(M_CH_SETTING_PHA); //HandleMenu(M_CH_SETTING_PSD); @@ -261,6 +274,7 @@ MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) { } MainWindow::~MainWindow() { + delete fMenuBar; delete fMenuFile; delete fMenuDigitizers; @@ -697,21 +711,6 @@ void MainWindow::PlotSingleTrace(){ } - -Double_t traceFunc(Double_t *x, Double_t *par){ - ///par[0] = baseline - ///par[1] = start time - ///par[2] = rise time - ///par[3] = Amp - ///par[4] = decay time - Double_t result = par[0]; - if(x[0] > par[1]){ - Double_t y = x[0]-par[1]; - result += par[3] *(1 - TMath::Exp( - y / par[2])) * TMath::Exp(-y / par[4]); - } - return result; -} - void MainWindow::FitTrace(){ printf("=== %s not impletement.\n", __func__); @@ -822,35 +821,36 @@ void * MainWindow::RunThread(void * ptr){ if( cbMode->GetSelected() != Mode_DataRun){ fEcanvas->GetCanvas()->cd(); - - ///Fill trace - if( cbMode->GetSelected() == Mode_Oscilloscope && hasTrace){ - - unsigned short nData = data->NumEvents[ch]; - traceLength = (data->Waveform1[ch][nData-1]).size(); - if( traceLength > 0 ){ - for( int i = 0; i < traceLength; i++) { - gAnaTrace1->SetPoint(i, i*ch2ns*(1+isDualTrace), (data->Waveform1[ch][nData-1])[i]); - if( isDualTrace) gAnaTrace2->SetPoint(i, i*ch2ns*(1+isDualTrace), (data->Waveform2[ch][nData-1])[i]); - } - - if( traceLength <= gAnaTrace1->GetN() ){ - for( int i = gAnaTrace1->GetN() -1 ; i >= traceLength ; i--){ - gAnaTrace1->RemovePoint(i); - if( isDualTrace) gAnaTrace2->RemovePoint(i); - } - } - gAnaTrace1->Draw("AL"); - ///this causes warning - gAnaTrace1->GetYaxis()->SetRangeUser(0, 0x3FFF); - gAnaTrace2->Draw("same L"); - } - } CurrentTime = get_time(); ElapsedTime = CurrentTime - PreviousTime; /// milliseconds if( ElapsedTime > 500 ){ + + /// use the last trace + if( cbMode->GetSelected() == Mode_Oscilloscope && hasTrace){ + + unsigned short nData = data->NumEvents[ch]; + traceLength = (data->Waveform1[ch][nData-1]).size(); + if( traceLength > 0 ){ + for( int i = 0; i < traceLength; i++) { + gAnaTrace1->SetPoint(i, i*ch2ns*(1+isDualTrace), (data->Waveform1[ch][nData-1])[i]); + if( isDualTrace) gAnaTrace2->SetPoint(i, i*ch2ns*(1+isDualTrace), (data->Waveform2[ch][nData-1])[i]); + } + + if( traceLength <= gAnaTrace1->GetN() ){ + for( int i = gAnaTrace1->GetN() -1 ; i >= traceLength ; i--){ + gAnaTrace1->RemovePoint(i); + if( isDualTrace) gAnaTrace2->RemovePoint(i); + } + } + gAnaTrace1->Draw("AL"); + ///this causes warning + gAnaTrace1->GetYaxis()->SetRangeUser(0, 0x3FFF); + gAnaTrace2->Draw("same L"); + } + } + ///Fill Channel Count for( int i = 0 ; i < digi[boardID]->GetNChannel(); i++){ @@ -884,17 +884,9 @@ int main(int argc, char **argv) { TApplication theApp("App",&argc,argv); new MainWindow(gClient->GetRoot(),800,800); - theApp.Run(); + theApp.Run(); - delete gAnaTrace1; - delete gAnaTrace2; - delete gDigiTrace1; - delete gDigiTrace2; - - for( int i = 0; i < MaxNBoards; i++){ - delete hChannel[i]; - for( int j = 0; j < MaxNChannels; j++) delete hEnergy[i][j]; - } + printf("------ see you next time :) ------ \n"); return 0; } diff --git a/boardSetting.cpp b/boardSetting.cpp index 31efc9e..280a416 100644 --- a/boardSetting.cpp +++ b/boardSetting.cpp @@ -774,11 +774,20 @@ BoardSetting::~BoardSetting(){ isOpened = false; printf("close BoardSetting window\n"); + + /// this is essential to delete any TGNumberEntry, when the focu on it and close the windows --> crash. + delete numAggBLT; + delete numRunStartStopDelay; + delete numMajorCoinWin; + delete numBufferOccpGain; + //delete numExtendVetoDelay; + for( int i = 0; i < 8; i++) delete TRGValMajorLevel[i]; + delete TRGOUTMajorLevel; + delete GlbMajorLevel; delete boardIDEntry; - for(int i = 0; i < NUM_BOARD_INFO; i++) delete entry[i]; - fMain->Cleanup(); + fMain->Cleanup(); delete fMain; } diff --git a/boardSetting.h b/boardSetting.h index 64f82b3..7dd7d0a 100644 --- a/boardSetting.h +++ b/boardSetting.h @@ -92,7 +92,7 @@ class BoardSetting{ //TGCheckButton * bTRGValMskLVSDGLB; //TGCheckButton * bTRGValMskLVSDLCL; TGCheckButton * bEnableExtTRG; - TGNumberEntry * numExtendVetoDelay; + //TGNumberEntry * numExtendVetoDelay; /// Trigger Validation Mask TGCheckButton * cbTRGValMskCh[8][8]; diff --git a/channelSettingPHA.cpp b/channelSettingPHA.cpp index c55dd63..c906be2 100644 --- a/channelSettingPHA.cpp +++ b/channelSettingPHA.cpp @@ -209,6 +209,13 @@ ChannelSettingPHA::ChannelSettingPHA(const TGWindow *p, UInt_t w, UInt_t h, int cbTriggerMode->AddEntry("Anti-Coin.", 3); cbTriggerMode->Resize(width, 20); cbTriggerMode->Connect("Changed()", "ChannelSettingPHA", this, "SetDPPAlgorithm1()"); + + /// ShapedTriggerWidth = 0x1084 /// R/W + TGLabel * lbShapeTrigWidth = new TGLabel(vfTrigger1, "Shaped Trigger Width [ns]"); vfTrigger1->AddFrame(lbShapeTrigWidth, layoutHintsR); + numShapedTriggerWidth = new TGNumberEntry(vfTrigger2, 20, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vfTrigger2->AddFrame(numShapedTriggerWidth, layoutHints); + numShapedTriggerWidth->Resize(width, 20); + numShapedTriggerWidth->Connect("Modified()", "ChannelSettingPHA", this, "SetShaperTriggerWidth()"); + } {///================== Trapezoid Settings @@ -475,6 +482,7 @@ ChannelSettingPHA::~ChannelSettingPHA(){ delete numInputRiseTime; delete numRiseTimeValidWin; delete cbTriggerMode; + delete numShapedTriggerWidth; delete numTrapRiseTime; delete numTrapFlatTop; @@ -602,6 +610,7 @@ void ChannelSettingPHA::ChangeCh(){ cbTriggerSmoothing ->Select( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::RCCR2SmoothingFactor, ch), false); numInputRiseTime ->SetNumber( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::InputRiseTime, ch) * 4 * ch2ns, false); numRiseTimeValidWin->SetNumber( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::RiseTimeValidationWindow, ch) * ch2ns, false); + numShapedTriggerWidth->SetNumber( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::ShapedTriggerWidth, ch) * ch2ns, false); numTrapRiseTime->SetNumber( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::TrapezoidRiseTime, ch) * 4 * ch2ns, false); numTrapFlatTop->SetNumber( digi[boardID]->GetSettingFromMemory(Register::DPP::PHA::TrapezoidFlatTop, ch) * 4 * ch2ns, false); @@ -759,16 +768,17 @@ void ChannelSettingPHA::ChangeAStep(TGNumberEntry * numEntry, unsigned short ste } } -void ChannelSettingPHA::SetRecordLength() {printf("=== %s\n", __func__); ChangeAStep(numRecordLength, 8, Register::DPP::RecordLength_G); } -void ChannelSettingPHA::SetPreTrigger() {printf("=== %s\n", __func__); ChangeAStep(numPreTrigger, 4, Register::DPP::PreTrigger);} -void ChannelSettingPHA::SetTriggerHoldOff() {printf("=== %s\n", __func__); ChangeAStep(numTriggerHoldOff, 4, Register::DPP::PHA::TriggerHoldOffWidth);} -void ChannelSettingPHA::SetInputRiseTime() {printf("=== %s\n", __func__); ChangeAStep(numInputRiseTime, 4, Register::DPP::PHA::InputRiseTime);} -void ChannelSettingPHA::SetRiseTimeValidWin(){printf("=== %s\n", __func__); ChangeAStep(numRiseTimeValidWin, 1, Register::DPP::PHA::RiseTimeValidationWindow);} -void ChannelSettingPHA::SetTrapRiseTime() {printf("=== %s\n", __func__); ChangeAStep(numTrapRiseTime, 4, Register::DPP::PHA::TrapezoidRiseTime);} -void ChannelSettingPHA::SetTrapFlatTop() {printf("=== %s\n", __func__); ChangeAStep(numTrapFlatTop, 4, Register::DPP::PHA::TrapezoidFlatTop);} -void ChannelSettingPHA::SetDecay() {printf("=== %s\n", __func__); ChangeAStep(numDecay, 4, Register::DPP::PHA::DecayTime);} -void ChannelSettingPHA::SetPeaking() {printf("=== %s\n", __func__); ChangeAStep(numPeaking, 4, Register::DPP::PHA::PeakingTime);} -void ChannelSettingPHA::SetPeakHoldOff() {printf("=== %s\n", __func__); ChangeAStep(numPeakHoldOff, 4, Register::DPP::PHA::PeakHoldOff);} +void ChannelSettingPHA::SetRecordLength() {printf("=== %s\n", __func__); ChangeAStep(numRecordLength, 8, Register::DPP::RecordLength_G); } +void ChannelSettingPHA::SetPreTrigger() {printf("=== %s\n", __func__); ChangeAStep(numPreTrigger, 4, Register::DPP::PreTrigger);} +void ChannelSettingPHA::SetTriggerHoldOff() {printf("=== %s\n", __func__); ChangeAStep(numTriggerHoldOff, 4, Register::DPP::PHA::TriggerHoldOffWidth);} +void ChannelSettingPHA::SetInputRiseTime() {printf("=== %s\n", __func__); ChangeAStep(numInputRiseTime, 4, Register::DPP::PHA::InputRiseTime);} +void ChannelSettingPHA::SetRiseTimeValidWin() {printf("=== %s\n", __func__); ChangeAStep(numRiseTimeValidWin, 1, Register::DPP::PHA::RiseTimeValidationWindow);} +void ChannelSettingPHA::SetTrapRiseTime() {printf("=== %s\n", __func__); ChangeAStep(numTrapRiseTime, 4, Register::DPP::PHA::TrapezoidRiseTime);} +void ChannelSettingPHA::SetTrapFlatTop() {printf("=== %s\n", __func__); ChangeAStep(numTrapFlatTop, 4, Register::DPP::PHA::TrapezoidFlatTop);} +void ChannelSettingPHA::SetDecay() {printf("=== %s\n", __func__); ChangeAStep(numDecay, 4, Register::DPP::PHA::DecayTime);} +void ChannelSettingPHA::SetPeaking() {printf("=== %s\n", __func__); ChangeAStep(numPeaking, 4, Register::DPP::PHA::PeakingTime);} +void ChannelSettingPHA::SetPeakHoldOff() {printf("=== %s\n", __func__); ChangeAStep(numPeakHoldOff, 4, Register::DPP::PHA::PeakHoldOff);} +void ChannelSettingPHA::SetShaperTriggerWidth() {printf("=== %s\n", __func__); ChangeAStep(numShapedTriggerWidth, 4, Register::DPP::PHA::ShapedTriggerWidth);} void ChannelSettingPHA::SetEventAggregate() { printf("=== %s\n", __func__); diff --git a/channelSettingPHA.h b/channelSettingPHA.h index dd8c636..3b74e89 100644 --- a/channelSettingPHA.h +++ b/channelSettingPHA.h @@ -41,6 +41,7 @@ class ChannelSettingPHA{ TGNumberEntry * numInputRiseTime; TGNumberEntry * numRiseTimeValidWin; TGComboBox * cbTriggerMode; + TGNumberEntry * numShapedTriggerWidth; TGNumberEntry * numTrapRiseTime; TGNumberEntry * numTrapFlatTop; @@ -105,6 +106,7 @@ class ChannelSettingPHA{ void SetTriggerSmoothing(); void SetInputRiseTime(); void SetRiseTimeValidWin(); + void SetShaperTriggerWidth(); void SetTrapRiseTime(); void SetTrapFlatTop(); diff --git a/channelSettingPSD.cpp b/channelSettingPSD.cpp index 4df59cb..383070b 100644 --- a/channelSettingPSD.cpp +++ b/channelSettingPSD.cpp @@ -472,10 +472,62 @@ ChannelSettingPSD::~ChannelSettingPSD(){ isOpened = false; delete boardIDEntry; - + delete chIDEntry; + + delete eTemp ; + delete cbOnOff; - delete cbInputDynamicRange; delete cbPolarity; + delete cbInputDynamicRange; + delete numRecordLength; + delete numPreTrigger; + delete numEventAgg; + + + delete numTriggerThreshold; + delete numTriggerHoldOff; + delete numlbChargeZeroSupThreshold; + delete numTrigLatency; + delete numDCOffset; + delete numThresholdPSDCut; + delete numPURGAPThreshold; + delete cbTriggerMode; + + + delete numCFDDelay; + delete cbCFDFraction; + delete cbCFDInterPt; + delete numShortGateWidth; + delete numLongGateWidth; + delete numGateOffset; + delete numFixBaseline; + delete cbBaseLineAvg; + + delete cbChargeSensitivity; + delete cbChargePedestal; + delete cbTriggerCount; + delete cbDiscrimationMode; + delete cbPileUpGate; + delete cbPileUp; + delete cbTestPulseRate; + delete cbBaselineLongGate; + delete cbDiscardQlongQthr; + delete cbOverRange; + delete cbTrigHysteresis; + delete cbInhibitOppostieParity; + + delete cbLocalShapedTrigger; + delete cbLocalTriggerValid; + delete cbAddLocalTriggerValid; + delete cbVetoSource; + delete cbInputSmoothinFactor; + delete cbTriggerCounterRate; + delete cbMarkSaturatedPulse; + delete cbVetoMode; + delete cbResetTimeStamp; + + delete cbDisableSelfTrigger; + delete cbExtraWordOption; /// fMain must be delete last; fMain->Cleanup(); diff --git a/channelSettingPSD.h b/channelSettingPSD.h index 0723e77..248570b 100644 --- a/channelSettingPSD.h +++ b/channelSettingPSD.h @@ -75,7 +75,7 @@ class ChannelSettingPSD{ TGComboBox * cbDisableSelfTrigger; TGComboBox * cbExtraWordOption; - int NChannel; // hard coded = 16 + int NChannel; /// hard coded = 16 when no digitizer bool isOpened; int presentBoardID; diff --git a/programSetting.cpp b/programSetting.cpp index d84501c..baf3b91 100644 --- a/programSetting.cpp +++ b/programSetting.cpp @@ -64,6 +64,7 @@ ProgramSetting::~ProgramSetting(){ delete txtIP; delete txtDBName; + delete txtDataPath; fMain->Cleanup(); delete fMain; diff --git a/registerSetting.h b/registerSetting.h index 3e2c748..40951b8 100644 --- a/registerSetting.h +++ b/registerSetting.h @@ -21,7 +21,6 @@ class RegisterSetting{ TGMainFrame * fMain; TGNumberEntry * boardIDEntry; - TGTextEntry * txtAddress; TGComboBox * cbName; diff --git a/triggerSummary.cpp b/triggerSummary.cpp index ce1eb37..d2abed5 100644 --- a/triggerSummary.cpp +++ b/triggerSummary.cpp @@ -113,7 +113,6 @@ TriggerSummary::~TriggerSummary(){ delete numUpdateTime; updateFlag = false; - thread->Join(); ///delete thread; /// Don;t delete the thread, otherwise, thread will not run after close and reopen.