From 7a40b12108b802f6214b46255623625f5a15165b Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Fri, 19 Jul 2013 09:15:41 +0000 Subject: [PATCH] setting buffer for fwrite in slsreceiver git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@636 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 1 - slsDetectorSoftware/slsReceiver/receiver_defs.h | 1 + slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index e92ba0d62..455232260 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2799,7 +2799,6 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise int modmi=imod, modma=imod+1, im=imod; string settingsfname, calfname; string ssettings; - int ichip,ichan,nch; switch (isettings) { case STANDARD: diff --git a/slsDetectorSoftware/slsReceiver/receiver_defs.h b/slsDetectorSoftware/slsReceiver/receiver_defs.h index 30587eb86..6d4d983ca 100755 --- a/slsDetectorSoftware/slsReceiver/receiver_defs.h +++ b/slsDetectorSoftware/slsReceiver/receiver_defs.h @@ -11,6 +11,7 @@ #define CREATE_FILES 1 #define DO_EVERYTHING 2 +#define BUF_SIZE 16000000 //16mb //all max frames defined in sls_detector_defs.h. 20000 gotthard, 100000 for short gotthard, 1000 for moench diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index c0a170ffe..881011484 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -491,6 +491,9 @@ int slsReceiverFunctionList::startWriting(){ break; } + //setting buffer + setvbuf(sfilefd,NULL,_IOFBF,BUF_SIZE); + //printing packet losses and file names //if(prevframenum != 0) if(!framesCaught)