diff --git a/bash/odb/currentSetup.sh b/bash/odb/currentSetup.sh index 813d9739f01f925ebb6881ffeba94474a019ae0a..b65f5d9f908b55d43e0f49b7f814f0be8be1a42c 100644 --- a/bash/odb/currentSetup.sh +++ b/bash/odb/currentSetup.sh @@ -40,7 +40,7 @@ do odbVarSet "/TOF/DAQ/ChannelSettings/FEB${iFEB}/SAMPIC${iSAMPIC}/extTrigGate" 2550 odbVarSet "/TOF/DAQ/ChannelSettings/FEB${iFEB}/SAMPIC${iSAMPIC}/channelIsEnabledList[*]" 1 - odbVarSet "/TOF/DAQ/ChannelSettings/FEB${iFEB}/SAMPIC${iSAMPIC}/channelThresholdList[*]" 0.1 + odbVarSet "/TOF/DAQ/ChannelSettings/FEB${iFEB}/SAMPIC${iSAMPIC}/channelThresholdList[*]" 0.02 odbVarSet "/TOF/DAQ/ChannelSettings/FEB${iFEB}/SAMPIC${iSAMPIC}/channelTriggerModeList[*]" 0 done diff --git a/src/SampicDriver/src/SampicHandler.cpp b/src/SampicDriver/src/SampicHandler.cpp index f8dfdba0e94f0aa64f772f2e0f41079d621ad77a..54ca1d726fffa6d678a8d6dc83c16ed315eda5c9 100644 --- a/src/SampicDriver/src/SampicHandler.cpp +++ b/src/SampicDriver/src/SampicHandler.cpp @@ -455,19 +455,18 @@ void SampicHandler::eventBuilder() { while(errCode != SAMPIC256CH_Success) { -// LogTrace << "Reading event buffer..." << std::endl; errCode = SAMPIC256CH_ReadEventBuffer(&_crateInfoParams_, dummy , _eventBufferPtr_, _mlFramePtr_, &nframes); -// LogDebug << GET_VAR_NAME_VALUE(nframes) << std::endl; if(errCode == SAMPIC256CH_Success) { errCode = SAMPIC256CH_DecodeEvent(&_crateInfoParams_, &_crateParams_, _mlFramePtr_, &_eventBuffer_, nframes, &numberOfHits); } - if((errCode == SAMPIC256CH_AcquisitionError) || (errCode == SAMPIC256CH_ErrInvalidEvent)) { + else if((errCode == SAMPIC256CH_AcquisitionError) || (errCode == SAMPIC256CH_ErrInvalidEvent)) { LogError << "Acquisition error" << std::endl; break; } else{ -// LogInfo << GET_VAR_NAME_VALUE(_eventBuffer_.NbOfHitsInEvent) << std::endl; + LogTrace << "No data... try again." << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(200)); } // Only for Soft Trig in this example // @@ -486,7 +485,7 @@ void SampicHandler::eventBuilder() { } - for(int hit = 0; hit < _eventBuffer_.NbOfHitsInEvent; ++hit) + for(int hit = 0; hit < _eventBuffer_.NbOfHitsInEvent; ++hit) { _outFilestream_ << "Hit.Channel: " << _eventBuffer_.Hit[hit].Channel << " "; _outFilestream_ << "Hit.FeBoardIndex: " << _eventBuffer_.Hit[hit].FeBoardIndex << " "; @@ -509,7 +508,6 @@ void SampicHandler::eventBuilder() { << " / FirstCellTimeStamp: " << _eventBuffer_.Hit[iHit].FirstCellTimeStamp << std::endl; } - } }