mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
compareRetrun.. to minusOneIf..
This commit is contained in:
parent
5be2979fff
commit
06f84585af
@ -17,6 +17,8 @@ ID: $Id$
|
|||||||
#include "slsDetector.h"
|
#include "slsDetector.h"
|
||||||
#include "usersFunctions.h"
|
#include "usersFunctions.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <rapidjson/document.h> //json header in zmq stream
|
#include <rapidjson/document.h> //json header in zmq stream
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -3305,7 +3307,7 @@ int multiSlsDetector::exitServer()
|
|||||||
return ival;
|
return ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
int multiSlsDetector::compareReturnValues(const std::vector<int>& return_values)
|
int multiSlsDetector::minusOneIfDifferent(const std::vector<int>& return_values)
|
||||||
{
|
{
|
||||||
int ret = -100;
|
int ret = -100;
|
||||||
for (int idet = 0; idet < thisMultiDetector->numberOfDetectors; ++idet) {
|
for (int idet = 0; idet < thisMultiDetector->numberOfDetectors; ++idet) {
|
||||||
@ -3397,7 +3399,7 @@ int multiSlsDetector::parallelCallDetectorMember(int (slsDetector::*somefunc)(in
|
|||||||
}
|
}
|
||||||
threadpool->startExecuting();
|
threadpool->startExecuting();
|
||||||
threadpool->wait_for_tasks_to_complete();
|
threadpool->wait_for_tasks_to_complete();
|
||||||
return compareReturnValues(return_values);
|
return minusOneIfDifferent(return_values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3417,7 +3419,7 @@ int multiSlsDetector::parallelCallDetectorMember(int (slsDetector::*somefunc)(in
|
|||||||
}
|
}
|
||||||
threadpool->startExecuting();
|
threadpool->startExecuting();
|
||||||
threadpool->wait_for_tasks_to_complete();
|
threadpool->wait_for_tasks_to_complete();
|
||||||
return compareReturnValues(return_values);
|
return minusOneIfDifferent(return_values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3437,7 +3439,7 @@ int multiSlsDetector::parallelCallDetectorMember(int (slsDetector::*somefunc)())
|
|||||||
}
|
}
|
||||||
threadpool->startExecuting();
|
threadpool->startExecuting();
|
||||||
threadpool->wait_for_tasks_to_complete();
|
threadpool->wait_for_tasks_to_complete();
|
||||||
return compareReturnValues(return_values);
|
return minusOneIfDifferent(return_values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1050,7 +1050,7 @@ class multiSlsDetector : public slsDetectorUtils {
|
|||||||
int parallelCallDetectorMember(int (slsDetector::*somefunc)());
|
int parallelCallDetectorMember(int (slsDetector::*somefunc)());
|
||||||
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int), int value); //Should probably be templated
|
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int), int value); //Should probably be templated
|
||||||
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int, int, int), int v0, int v1, int v2); //Should probably be templated
|
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int, int, int), int v0, int v1, int v2); //Should probably be templated
|
||||||
int compareReturnValues(const std::vector<int>&);
|
int minusOneIfDifferent(const std::vector<int>&);
|
||||||
|
|
||||||
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
std::string getSettingsDir();
|
std::string getSettingsDir();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user