From 64ab43cb8c4cce6666e889d953b858f43f3702fa Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Fri, 4 Oct 2013 09:53:22 +0000 Subject: [PATCH] included total packets to display git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@682 951219d9-93cf-4727-9268-0efd64621fa3 --- .../slsReceiver/slsReceiverFunctionList.cpp | 10 ++++++---- .../slsReceiver/slsReceiverFunctionList.h | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index 5bd3fc47e..6ebd3c9ef 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -35,6 +35,7 @@ slsReceiverFunctionList::slsReceiverFunctionList(detectorType det): startFrameIndex(0), frameIndex(0), totalFramesCaught(0), + totalPacketsCaught(0), startAcquisitionIndex(0), acquisitionIndex(0), packetsInFile(0), @@ -290,7 +291,7 @@ void slsReceiverFunctionList::resetTotalFramesCaught(){ acqStarted = false; startAcquisitionIndex = 0; totalFramesCaught = 0; - + totalPacketsCaught = 0; } @@ -769,6 +770,7 @@ int slsReceiverFunctionList::startWriting(){ } packetsInFile += i; + totalPacketsCaught += i; //count only if you get full frames if(i == packetsPerFrame){ framesCaught++; @@ -856,9 +858,9 @@ int slsReceiverFunctionList::startWriting(){ receiver_threads_running=0; pthread_mutex_unlock(&status_mutex); - cout << "RealTime Packets Caught:" << dec << packetsInFile << endl; - cout << "RealTime Frames Caught:" << dec << framesCaught << endl; - cout << "Total Frames Caught:"<< dec << totalFramesCaught << endl; + cout << "Total RealTime Packets Caught:" << dec << totalPacketsCaught << endl; + //cout << "RealTime Full Frames Caught:" << dec << framesCaught << endl; + cout << "Total Full Frames Caught:"<< dec << totalFramesCaught << endl; if(sfilefd){ diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h index 3fd586fb0..b3d474987 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h @@ -258,6 +258,9 @@ private: /** Total Frames Caught for an entire acquisition (including all scans) */ int totalFramesCaught; + /** Total packets caught for an entire acquisition (including all scans) */ + int totalPacketsCaught; + /** Frame index at start of an entire acquisition (including all scans) */ uint32_t startAcquisitionIndex;