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