From 128f7da0ff96c45f2e0fdda4765fcb8296e1b19d Mon Sep 17 00:00:00 2001 From: "Ryan@WorkStation" Date: Thu, 7 Mar 2024 16:11:08 -0500 Subject: [PATCH] use CAEN method for cal the buffer size --- ClassDigitizer.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/ClassDigitizer.cpp b/ClassDigitizer.cpp index c2e72fb..70248e7 100644 --- a/ClassDigitizer.cpp +++ b/ClassDigitizer.cpp @@ -493,21 +493,8 @@ void Digitizer::StartACQ(){ // ret |= CAEN_DGTZ_SetDPPEventAggregation(handle, 0, 0); // Auto set - unsigned int bufferSize = 0; - if( DPPType == V1730_DPP_PHA_CODE ){ - bufferSize = CalByteForBuffer(); - if( bufferSize > 160 * 1024 * 1024 ){ - printf("============= buffer size bigger than 160 MB (%u)\n", bufferSize ); - //return; - } - }else if( DPPType == V1730_DPP_PSD_CODE) { - bufferSize = CalByteForBufferCAEN(); - }else if( DPPType == V1740_DPP_QDC_CODE) { - bufferSize = CalByteForBufferCAEN(); - }else{ - printf("DPP type not supported. ACQ not start.\n"); - return; - } + unsigned int bufferSize = CalByteForBufferCAEN(); + if( bufferSize > 160 * 1024 * 1024 ) printf("============= buffer size bigger than 160 MB (%u)\n", bufferSize ); data->AllocateMemory(bufferSize);