mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor
This commit is contained in:
@ -149,6 +149,15 @@ public:
|
||||
*/
|
||||
void setupMultiDetector(bool verify = true, bool update = true);
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
|
||||
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> parallelCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
|
||||
|
||||
/**
|
||||
* If specific position, then provide result with that detector at position pos
|
||||
* else concatenate the result of all detectors
|
||||
@ -158,121 +167,7 @@ public:
|
||||
*/
|
||||
std::string concatResultOrPos(std::string (slsDetector::*somefunc)(int), int pos);
|
||||
|
||||
/**
|
||||
* Loop serially through all the detectors in calling a particular method
|
||||
* @param somefunc function pointer
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T>
|
||||
T callDetectorMember(T (slsDetector::*somefunc)());
|
||||
|
||||
/**
|
||||
* Loop serially through all the detectors in calling a particular method
|
||||
* with string as return
|
||||
* @param somefunc function pointer
|
||||
* @returns concatenated string of results ifdifferent, otherwise result in
|
||||
* calling method
|
||||
*/
|
||||
std::string callDetectorMember(std::string(slsDetector::*somefunc)());
|
||||
|
||||
/**
|
||||
* Loop serially through all the detectors in calling a particular method
|
||||
* with string argument and string return
|
||||
* @param somefunc function pointer
|
||||
* @param s0 argument for calling method
|
||||
* @returns concatenated result if values are different, otherwise result in calling method
|
||||
*/
|
||||
std::string callDetectorMember(std::string (slsDetector::*somefunc)(std::string),
|
||||
std::string s0);
|
||||
|
||||
/**
|
||||
* Loop serially through all the detectors in calling a particular method
|
||||
* with an extra argument
|
||||
* @param somefunc function pointer
|
||||
* @param value argument for calling method
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T, typename V>
|
||||
T callDetectorMember(T (slsDetector::*somefunc)(V), V value);
|
||||
|
||||
/**
|
||||
* Loop serially through all the detectors in calling a particular method
|
||||
* with two extra arguments
|
||||
* @param somefunc function pointer
|
||||
* @param par1 argument for calling method
|
||||
* @param par2 second argument for calling method
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T, typename P1, typename P2>
|
||||
T callDetectorMember(T (slsDetector::*somefunc)(P1, P2), P1 par1, P2 par2);
|
||||
|
||||
|
||||
/**
|
||||
* Parallel calls to all the detectors in calling a particular method
|
||||
* @param somefunc function pointer
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T>
|
||||
T parallelCallDetectorMember(T (slsDetector::*somefunc)());
|
||||
|
||||
/**
|
||||
* Parallel calls to all the detectors in calling a particular method
|
||||
* with an extra argument
|
||||
* @param somefunc function pointer
|
||||
* @param value argument for calling method
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T, typename P1>
|
||||
T parallelCallDetectorMember(T (slsDetector::*somefunc)(P1), P1 value);
|
||||
|
||||
/**
|
||||
* Parallel calls to all the detectors in calling a particular method
|
||||
* with two extra arguments
|
||||
* @param somefunc function pointer
|
||||
* @param par1 argument for calling method
|
||||
* @param par2 second argument for calling method
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
template<typename T, typename P1, typename P2>
|
||||
T parallelCallDetectorMember(T (slsDetector::*somefunc)(P1, P2), P1 par1, P2 par2);
|
||||
|
||||
/**
|
||||
* Parallel calls to all the detectors in calling a particular method
|
||||
* with three int arguments
|
||||
* @param somefunc function pointer
|
||||
* @param v0 argument for calling method
|
||||
* @param v1 second argument for calling method
|
||||
* @param v2 third argument for calling method
|
||||
* @returns -1 if values are different, otherwise result in calling method
|
||||
*/
|
||||
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int, int, int),
|
||||
int v0, int v1, int v2);
|
||||
|
||||
/**
|
||||
* Parallel calls to all the detectors in calling a particular method
|
||||
* with string argument and string return
|
||||
* @param somefunc function pointer
|
||||
* @param s0 argument for calling method
|
||||
* @returns concatenated result if values are different, otherwise result in calling method
|
||||
*/
|
||||
std::string parallelCallDetectorMember(std::string (slsDetector::*somefunc)(std::string),
|
||||
std::string s0);
|
||||
/**
|
||||
* Loop serially through all results and
|
||||
* return a value if they are all same, else return -1
|
||||
* @param return_values vector of results
|
||||
* @returns -1 if values are different, otherwise result
|
||||
*/
|
||||
template<typename T>
|
||||
T minusOneIfDifferent(const std::vector<T>&);
|
||||
|
||||
/**
|
||||
* Loop serially through all results and
|
||||
* return a value if they are all same, else concatenate them
|
||||
* @param return_values vector of results
|
||||
* @returns concatenated result if values are different, otherwise result
|
||||
*/
|
||||
std::string concatenateIfDifferent(const std::vector<std::string>& return_values);
|
||||
|
||||
/**
|
||||
* Decodes which detector and the corresponding channel numbers for it
|
||||
|
Reference in New Issue
Block a user