mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 00:14:37 +01:00
outdir checks if path exists, bug fix receiver: now checks online flag before tryig to set it online for outdir, filename and file index
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@279 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@@ -3566,7 +3566,7 @@ int multiSlsDetector::setReceiverOnline(int off) {
|
||||
detectors[i]->setReceiverOnline(off);
|
||||
}
|
||||
}
|
||||
return thisMultiDetector->onlineFlag;
|
||||
return thisMultiDetector->receiverOnlineFlag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1303,15 +1303,22 @@ string slsDetectorCommand::cmdOutDir(int narg, char *args[], int action){
|
||||
return helpOutDir(narg, args, action);
|
||||
}
|
||||
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline()==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
receiver = true;
|
||||
|
||||
if (action==PUT_ACTION) {
|
||||
if(receiver){
|
||||
if(myDet->setReceiverFileDir(string(args[1]))==string(args[1]))
|
||||
myDet->setFilePath(string(args[1]));
|
||||
}else
|
||||
myDet->setFilePath(string(args[1]));
|
||||
}else{
|
||||
//check if the outdir really exists in localhost
|
||||
struct stat st;
|
||||
if(stat(args[1],&st))
|
||||
return string("path does not exist");
|
||||
else
|
||||
myDet->setFilePath(string(args[1]));
|
||||
}
|
||||
}
|
||||
|
||||
if(receiver)
|
||||
@@ -1341,7 +1348,8 @@ string slsDetectorCommand::cmdFileName(int narg, char *args[], int action){
|
||||
return helpFileName(narg, args, action);
|
||||
}
|
||||
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline()==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
receiver = true;
|
||||
|
||||
if (action==PUT_ACTION) {
|
||||
@@ -1411,7 +1419,8 @@ string slsDetectorCommand::cmdFileIndex(int narg, char *args[], int action){
|
||||
return helpFileName(narg, args, action);
|
||||
}
|
||||
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline()==ONLINE_FLAG)
|
||||
if(myDet->setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG)
|
||||
receiver = true;
|
||||
|
||||
if (action==PUT_ACTION) {
|
||||
|
||||
Reference in New Issue
Block a user