mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
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:
parent
6e4be40f37
commit
6902585e24
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user