sending position id and num detectors in x and y dir

This commit is contained in:
Dhanya Maliakal
2017-02-21 15:13:27 +01:00
parent 549e346ad4
commit 19460a03f5
5 changed files with 94 additions and 3 deletions

View File

@ -776,7 +776,21 @@ int multiSlsDetector::addSlsDetector(detectorType t, int pos) {
void multiSlsDetector::getNumberOfDetectors(int& nx, int& ny) {
nx = 0; ny = 0;
int offsetx = -1, offsety = -1;
for (int i = 0; i < thisMultiDetector->numberOfDetectors; ++i) {
if (thisMultiDetector->offsetX[i] > offsetx) {
nx++;
offsetx = thisMultiDetector->offsetX[i];
}
if (thisMultiDetector->offsetY[i] > offsety) {
ny++;
offsety = thisMultiDetector->offsetY[i];
}
}
}