mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 14:27:13 +02:00
modified getDetectorType function name in slsDetector to be able to make a getDetectorType(pos) function for multiSlsDetector
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@176 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -400,6 +400,23 @@ string multiSlsDetector::getHostname(int pos) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string multiSlsDetector::getDetectorsType(int pos) {
|
||||||
|
|
||||||
|
string s=string("");
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "returning type " << pos << endl;
|
||||||
|
#endif
|
||||||
|
if (pos>=0) {
|
||||||
|
if (detectors[pos])
|
||||||
|
return detectors[pos]->getDetectorsType();
|
||||||
|
} else
|
||||||
|
return detectors[0]->getDetectorsType();
|
||||||
|
return s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int multiSlsDetector::getDetectorId(int pos) {
|
int multiSlsDetector::getDetectorId(int pos) {
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
@ -3500,4 +3517,3 @@ int multiSlsDetector::readDataFile(string fname, int *data) {
|
|||||||
return iline;
|
return iline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -264,6 +264,7 @@ class multiSlsDetector : public slsDetectorUtils {
|
|||||||
|
|
||||||
string getHostname(int pos=-1);
|
string getHostname(int pos=-1);
|
||||||
|
|
||||||
|
string getDetectorsType(int pos=-1);
|
||||||
|
|
||||||
|
|
||||||
/** adds a detector by id in position pos
|
/** adds a detector by id in position pos
|
||||||
|
@ -1265,7 +1265,7 @@ int slsDetector::setDetectorType(string const stype){
|
|||||||
return setDetectorType(getDetectorType(stype));
|
return setDetectorType(getDetectorType(stype));
|
||||||
};
|
};
|
||||||
|
|
||||||
string slsDetector::getDetectorType(){
|
string slsDetector::getDetectorsType(int pos){
|
||||||
return getDetectorType(thisDetector->myDetectorType);
|
return getDetectorType(thisDetector->myDetectorType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ typedef struct sharedSlsDetector {
|
|||||||
normally the detector knows what type of detector it is
|
normally the detector knows what type of detector it is
|
||||||
\param type is the string where the detector type will be written ("Mythen", "Pilatus", "XFS", "Gotthard", Agipd")
|
\param type is the string where the detector type will be written ("Mythen", "Pilatus", "XFS", "Gotthard", Agipd")
|
||||||
*/
|
*/
|
||||||
string getDetectorType();
|
string getDetectorsType(int pos=-1);
|
||||||
|
|
||||||
|
|
||||||
// Detector configuration functions
|
// Detector configuration functions
|
||||||
|
@ -325,6 +325,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
|||||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
|
|
||||||
descrToFuncMap[i].m_pFuncName="flags";
|
descrToFuncMap[i].m_pFuncName="flags";
|
||||||
@ -361,6 +362,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
|||||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN;
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
|
||||||
/* digital test and debugging */
|
/* digital test and debugging */
|
||||||
|
|
||||||
descrToFuncMap[i].m_pFuncName="digitest"; // /* find command! */
|
descrToFuncMap[i].m_pFuncName="digitest"; // /* find command! */
|
||||||
|
@ -111,6 +111,13 @@ class slsDetectorUtils : public slsDetectorActions, public slsDetectorBase {
|
|||||||
virtual string setHostname(char* name, int pos=-1)=0;
|
virtual string setHostname(char* name, int pos=-1)=0;
|
||||||
|
|
||||||
|
|
||||||
|
/** returns the detector type
|
||||||
|
\param pos position in the multi detector structure (is -1 returns type of detector with id -1)
|
||||||
|
\returns type
|
||||||
|
*/
|
||||||
|
virtual string getDetectorsType(int pos=-1)=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Gets the detector id (shared memory id) of an slsDetector
|
/** Gets the detector id (shared memory id) of an slsDetector
|
||||||
\param i position in the multiSlsDetector structure
|
\param i position in the multiSlsDetector structure
|
||||||
|
Reference in New Issue
Block a user