diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp index 88d1b7fa5..37b67da66 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver.cpp @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) cout << "no config file name given. Exiting." << endl; return -1; } - fname.assign(argv[iarg]); + fname.assign(argv[iarg+1]); } if(!strcasecmp(argv[iarg],"-shortfname")) shortfname = true; diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp index eacd8de1e..66bc14580 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.cpp @@ -251,6 +251,7 @@ int slsReceiverFunctionList::startListening(){ if(fifo->isFull()) cout<<"**********************FIFO FULLLLLLLL************************"<buffer=buffer; dataReadFrame->rc=rc; @@ -320,8 +321,8 @@ int slsReceiverFunctionList::startWriting(){ while(listening_thread_running){ - //when it reaches 20000,start writing new file - if (framesInFile == 20000) { + //when it reaches MAX_FRAMES_PER_FILE,start writing new file + if (framesInFile == MAX_FRAMES_PER_FILE) { fclose(sfilefd); //create file name @@ -354,6 +355,7 @@ int slsReceiverFunctionList::startWriting(){ framesCaught++; totalFramesCaught++; memcpy(latestData,dataWriteFrame->buffer,BUFFER_SIZE); + //cout<<"list write \t index:"<<(int)(*(int*)latestData)<buffer, 1, dataWriteFrame->rc, sfilefd); framesInFile++; delete dataWriteFrame->buffer; diff --git a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h index 98d461c7c..1f006f69b 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h +++ b/slsDetectorSoftware/slsReceiver/slsReceiverFunctionList.h @@ -156,6 +156,9 @@ public: private: + + static const int MAX_FRAMES_PER_FILE = 20000; + /** Complete File name */ char savefilename[MAX_STR_LENGTH]; diff --git a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp index 79974482f..2e985b0ad 100644 --- a/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp +++ b/slsDetectorSoftware/slsReceiver/slsReceiver_funcs.cpp @@ -607,7 +607,7 @@ int slsReceiverFuncs::read_frame(){ index2= (int)(*((int*)((char*)(raw+onebuffersize)))); memcpy(origVal,raw,BUFFER_SIZE); raw=NULL; - //cout<<"index:"<