mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
now updating max number of modules when reading the number of modules
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@265 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -2893,9 +2893,16 @@ int multiSlsDetector::getMaxMods() {
|
||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) {
|
||||
if (detectors[idet]) {
|
||||
ret1=detectors[idet]->getMaxMods();
|
||||
#ifdef VERBOSE
|
||||
cout << "detector " << idet << " maxmods " << ret1 << endl;
|
||||
#endif
|
||||
ret+=ret1;
|
||||
}
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
cout << "max mods is " << ret << endl;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -2948,14 +2955,15 @@ int multiSlsDetector::setNumberOfModules(int p, dimension d) {
|
||||
|
||||
int multiSlsDetector::decodeNMod(int i, int &id, int &im) {
|
||||
#ifdef VERBOSE
|
||||
cout << " Module " << i << " belongs to detector " << id ;
|
||||
cout << " Module " << i << " belongs to detector " << id << endl;;
|
||||
cout << getMaxMods();
|
||||
#endif
|
||||
|
||||
if (i<0 || i>=getMaxMods()) {
|
||||
id=-1;
|
||||
im=-1;
|
||||
#ifdef VERBOSE
|
||||
cout << "A---------" << id << " position " << im << endl;
|
||||
cout << " A---------" << id << " position " << im << endl;
|
||||
#endif
|
||||
|
||||
return -1;
|
||||
@ -2968,7 +2976,7 @@ int multiSlsDetector::decodeNMod(int i, int &id, int &im) {
|
||||
id=idet;
|
||||
im=i;
|
||||
#ifdef VERBOSE
|
||||
cout << "B---------" <<id << " position " << im << endl;
|
||||
cout << " B---------" <<id << " position " << im << endl;
|
||||
#endif
|
||||
return im;
|
||||
} else {
|
||||
@ -2979,7 +2987,7 @@ int multiSlsDetector::decodeNMod(int i, int &id, int &im) {
|
||||
id=-1;
|
||||
im=-1;
|
||||
#ifdef VERBOSE
|
||||
cout <<"C---------" << id << " position " << im << endl;
|
||||
cout <<" C---------" << id << " position " << im << endl;
|
||||
#endif
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user