added a new function checkOnline to check individually if det is connected

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@243 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-09-10 09:31:32 +00:00
parent 6902585e24
commit ef8455ced6
4 changed files with 57 additions and 5 deletions

View File

@ -884,6 +884,26 @@ int multiSlsDetector::setOnline(int off) {
};
int multiSlsDetector::checkOnline() {
int ret1=-100,ret;
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
if (detectors[idet]) {
ret=detectors[idet]->checkOnline();
cout<<"ret:"<<ret<<endl;
if (ret1==-100)
ret1=ret;
else if (ret!=ret1)
ret1=-1;
}
}
return ret1;
};
int multiSlsDetector::exists() {
return thisMultiDetector->alreadyExisting;
}
@ -891,8 +911,6 @@ int multiSlsDetector::exists() {
// Initialization functions
@ -1941,15 +1959,15 @@ double multiSlsDetector::getRateCorrectionTau(){
ret1=ret;
else if (ret!=ret1)
ret1=-1;
}
}
}
}
} else {
#ifdef VERBOSE
std::cout<< "Rate correction is disabled " << std::endl;
#endif
ret1=0;
}
return ret1;
return ret1;
};