mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
some debugging at the beamline (fnames)
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@549 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
21b511fe29
commit
b660c0aebf
@ -4248,7 +4248,7 @@ string multiSlsDetector::setFileName(string s) {
|
||||
|
||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
|
||||
if (detectors[idet]) {
|
||||
if(getNumberOfDetectors()>1)
|
||||
if((getNumberOfDetectors()>1) && (setReceiverOnline()==ONLINE_FLAG))
|
||||
setDetectorIndex(idet);
|
||||
ret1=detectors[idet]->setFileName(s);
|
||||
if(detectors[idet]->getErrorMask())
|
||||
@ -4258,7 +4258,8 @@ string multiSlsDetector::setFileName(string s) {
|
||||
else if (ret!=ret1)
|
||||
ret="";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -4566,6 +4567,7 @@ int multiSlsDetector::enableWriteToFile(int enable){
|
||||
int multiSlsDetector::setFrameIndex(int index){
|
||||
int ret=-100, ret1;
|
||||
|
||||
fileIO::setFrameIndex(index);
|
||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
|
||||
if (detectors[idet]) {
|
||||
ret1=detectors[idet]->setFrameIndex(index);
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/csh -f
|
||||
#set l = `ipcs -m | grep "$USER"| cut -c12-19`
|
||||
set l = `ipcs -m | cut -c12-19`
|
||||
set l = `ipcs -m | cut -c0-10`
|
||||
foreach s ( $l )
|
||||
echo $s
|
||||
ipcrm shm $s
|
||||
ipcrm -M $s
|
||||
end
|
||||
#if ($#l != 0 )
|
||||
echo $#l shared memory\(s\) for $user removed
|
||||
|
@ -209,6 +209,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
i++;
|
||||
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="currentfname"; //OK
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName;
|
||||
i++;
|
||||
|
||||
/* Acquisition actions */
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="positions"; //
|
||||
@ -1402,11 +1406,14 @@ string slsDetectorCommand::helpOutDir(int narg, char *args[], int action){
|
||||
string slsDetectorCommand::cmdFileName(int narg, char *args[], int action){
|
||||
if (action==HELP_ACTION)
|
||||
return helpFileName(narg, args, action);
|
||||
|
||||
else if (action==PUT_ACTION)
|
||||
if (cmd=="fname") {
|
||||
if (action==PUT_ACTION)
|
||||
myDet->setFileName(string(args[1]));
|
||||
|
||||
return string(myDet->getFileName());
|
||||
} else
|
||||
return string(myDet->getCurrentFileName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,6 +44,15 @@ slsDetectorUtils::slsDetectorUtils() {
|
||||
void slsDetectorUtils::acquire(int delflag){
|
||||
|
||||
bool receiver = (setReceiverOnline()==ONLINE_FLAG);
|
||||
if(!receiver)
|
||||
setDetectorIndex(-1);
|
||||
int nc=setTimer(CYCLES_NUMBER,-1);
|
||||
int nf=setTimer(FRAME_NUMBER,-1);
|
||||
if (nc==0) nc=1;
|
||||
if (nf==0) nf=1;
|
||||
|
||||
int multiframe = nc*nf;
|
||||
cout << "multiframe:"<< multiframe<<endl;
|
||||
|
||||
// setTotalProgress();
|
||||
//moved these 2 here for measurement change
|
||||
@ -233,12 +242,12 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
|
||||
setCurrentFrameIndex(0);
|
||||
//if ((timerValue[FRAME_NUMBER]*timerValue[CYCLES_NUMBER])>1) {
|
||||
if ((setTimer(FRAME_NUMBER,-1)*setTimer(CYCLES_NUMBER,-1))>1){
|
||||
if (multiframe>1){
|
||||
setFrameIndex(0);
|
||||
} else {
|
||||
setFrameIndex(-1);
|
||||
}
|
||||
|
||||
cout <<"frame index:"<<getFrameIndex()<<endl;
|
||||
if(receiver){
|
||||
//send receiver file name
|
||||
pthread_mutex_lock(&mp);
|
||||
@ -432,8 +441,10 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
|
||||
// waiting for the data processing thread to finish!
|
||||
if (*threadedProcessing) {
|
||||
cout << "wait for data processing thread" << endl;
|
||||
setJoinThread(1);
|
||||
pthread_join(dataProcessingThread, &status);
|
||||
cout << "data processing thread joined" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -451,10 +462,11 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
|
||||
if (eclog)
|
||||
delete eclog;
|
||||
|
||||
cout << "acquisition finished callback " << endl;
|
||||
if (acquisition_finished)
|
||||
acquisition_finished(getCurrentProgress(),getDetectorStatus(),acqFinished_p);
|
||||
|
||||
|
||||
cout << "acquisition finished callback done " << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -271,6 +271,7 @@ yes */
|
||||
virtual int getDataBytes ( )=0;
|
||||
friend class slsDetector;
|
||||
|
||||
string getCurrentFileName(){return currentFileName;};
|
||||
protected:
|
||||
|
||||
|
||||
@ -282,7 +283,6 @@ yes */
|
||||
|
||||
void incrementDetectorIndex() { (detIndex)++; };
|
||||
|
||||
string getCurrentFileName(){return currentFileName;};
|
||||
|
||||
string getCurrentReceiverFilePrefix(){return currentReceiverFilePrefix;};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user