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];
}
}
}

View File

@ -322,6 +322,12 @@ class multiSlsDetector : public slsDetectorUtils {
\returns number of detectors */
int getNumberOfDetectors() {return thisMultiDetector->numberOfDetectors;};
/** returns the number of detectors in each direction
\param nx number of detectors in x direction
\param ny number of detectors in y direction
*/
void getNumberOfDetectors(int& nx, int& ny);
int getMaxMods();
int getNMods();
int getMaxMod(dimension d);