mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 15:57:13 +02:00
max frames per file, getting config filename
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@368 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -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;
|
||||
|
@ -251,6 +251,7 @@ int slsReceiverFunctionList::startListening(){
|
||||
if(fifo->isFull())
|
||||
cout<<"**********************FIFO FULLLLLLLL************************"<<endl;
|
||||
else{
|
||||
cout<<"read index:"<<(int)(*(int*)buffer)<<endl;
|
||||
dataReadFrame = new dataStruct;
|
||||
dataReadFrame->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)<<endl;
|
||||
fwrite(dataWriteFrame->buffer, 1, dataWriteFrame->rc, sfilefd);
|
||||
framesInFile++;
|
||||
delete dataWriteFrame->buffer;
|
||||
|
@ -156,6 +156,9 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
static const int MAX_FRAMES_PER_FILE = 20000;
|
||||
|
||||
/** Complete File name */
|
||||
char savefilename[MAX_STR_LENGTH];
|
||||
|
||||
|
@ -607,7 +607,7 @@ int slsReceiverFuncs::read_frame(){
|
||||
index2= (int)(*((int*)((char*)(raw+onebuffersize))));
|
||||
memcpy(origVal,raw,BUFFER_SIZE);
|
||||
raw=NULL;
|
||||
//cout<<"index:"<<index<<"\tindex2:"<<index2<<endl;
|
||||
//cout<<"funcs\tindex:"<<index<<"\tindex2:"<<index2<<endl;
|
||||
|
||||
|
||||
//1 odd, 1 even
|
||||
|
Reference in New Issue
Block a user