edited the getRateCorrectionTau for multislsdet to return -1 if different for any of the detectors

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@242 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2012-09-10 08:36:22 +00:00
parent 6e4be40f37
commit 6902585e24
2 changed files with 15 additions and 6 deletions

View File

@ -1927,21 +1927,30 @@ int multiSlsDetector::getRateCorrection(double &t){
double multiSlsDetector::getRateCorrectionTau(){
int ret1=-100,ret;
if (thisMultiDetector->correctionMask&(1<<RATE_CORRECTION)) {
#ifdef VERBOSE
std::cout<< "Rate correction is enabled with dead time "<< thisMultiDetector->tDead << std::endl;
#endif
//which t should we return if they are all different?
return 1;
} else
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
if (detectors[idet]) {
ret=detectors[idet]->getRateCorrectionTau();
if (ret1==-100)
ret1=ret;
else if (ret!=ret1)
ret1=-1;
}
}
} else {
#ifdef VERBOSE
std::cout<< "Rate correction is disabled " << std::endl;
#endif
return 0;
ret1=0;
}
return ret1;
};