mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
cleaning up getHostname
This commit is contained in:
parent
183c306166
commit
24df69d57f
@ -622,32 +622,19 @@ string multiSlsDetector::ssetDetectorsType(string name, int pos) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
string multiSlsDetector::getHostname(int pos) {
|
||||
string s=string("");
|
||||
#ifdef VERBOSE
|
||||
cout << "returning hostname" << pos << endl;
|
||||
#endif
|
||||
if (pos>=0) {
|
||||
if (detectors[pos])
|
||||
return detectors[pos]->getHostname();
|
||||
} else {
|
||||
for (int ip=0; ip<thisMultiDetector->numberOfDetectors; ++ip) {
|
||||
#ifdef VERBOSE
|
||||
cout << "detector " << ip << endl;
|
||||
#endif
|
||||
if (detectors[ip]) {
|
||||
s+=detectors[ip]->getHostname();
|
||||
s+=string("+");
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
cout << s <<endl;
|
||||
cout << "hostname " << s << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return s;
|
||||
|
||||
|
||||
string hostnames;
|
||||
if (pos>=0){
|
||||
if (detectors[pos])
|
||||
return detectors[pos]->getHostname();
|
||||
} else {
|
||||
for (int ip=0; ip<thisMultiDetector->numberOfDetectors; ++ip) {
|
||||
if (detectors[ip])
|
||||
hostnames += detectors[ip]->getHostname() + "+";
|
||||
}
|
||||
}
|
||||
return hostnames;
|
||||
}
|
||||
|
||||
|
||||
@ -1156,10 +1143,9 @@ string multiSlsDetector::checkOnline() {
|
||||
}
|
||||
|
||||
int multiSlsDetector::activate(int const enable){
|
||||
int i;
|
||||
int ret1=-100, ret;
|
||||
|
||||
for (i=0; i<thisMultiDetector->numberOfDetectors; ++i) {
|
||||
for (int i=0; i<thisMultiDetector->numberOfDetectors; ++i) {
|
||||
if (detectors[i]) {
|
||||
ret=detectors[i]->activate(enable);
|
||||
if(detectors[i]->getErrorMask())
|
||||
|
Loading…
x
Reference in New Issue
Block a user