mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
sending position id and num detectors in x and y dir
This commit is contained in:
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user