added getchanregs function to get the trimbits

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@251 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-09-11 15:15:32 +00:00
parent c6d383f770
commit 3faeca0649
5 changed files with 43 additions and 2 deletions

View File

@ -1043,6 +1043,21 @@ slsDetectorDefs::detectorSettings multiSlsDetector::setSettings(detectorSettings
int multiSlsDetector::getChanRegs(double* retval){
//nChansDet and currentNumChans is because of varying channel size per detector
int n = thisMultiDetector->numberOfChannels,nChansDet,currentNumChans=0;
double retval1[n];
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
if (detectors[idet]) {
nChansDet = detectors[idet]->getChanRegs(retval1);
memcpy(retval + (currentNumChans * sizeof(double)), retval1 , nChansDet*sizeof(double));
currentNumChans += nChansDet;
}
}
return n;
}