mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
base fix for parallelism made more efficient
This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: 5d45181f177b552819bd60947c6cf4f0abae7681
|
Repsitory UUID: 3c1eb747d1930d6d38030a5a607f72d3b58a7a21
|
||||||
Revision: 1543
|
Revision: 1544
|
||||||
Branch: 3.0
|
Branch: 3.0
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 1548
|
Last Changed Rev: 1549
|
||||||
Last Changed Date: 2017-08-28 12:02:38.000000002 +0200 ./multiSlsDetector/multiSlsDetector.cpp
|
Last Changed Date: 2017-09-14 17:05:04.000000002 +0200 ./threadFiles/ThreadPool.o
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUIDLIB "5d45181f177b552819bd60947c6cf4f0abae7681"
|
#define SVNREPUUIDLIB "3c1eb747d1930d6d38030a5a607f72d3b58a7a21"
|
||||||
//#define SVNREV 0x1548
|
//#define SVNREV 0x1549
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||||
#define SVNREVLIB 0x1548
|
#define SVNREVLIB 0x1549
|
||||||
#define SVNDATELIB 0x20170828
|
#define SVNDATELIB 0x20170914
|
||||||
//
|
//
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <stdio.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class slsDetector;
|
class slsDetector;
|
||||||
@ -107,67 +109,75 @@ private:
|
|||||||
class SuperTask: public virtual slsDetectorDefs {
|
class SuperTask: public virtual slsDetectorDefs {
|
||||||
public:
|
public:
|
||||||
SuperTask():m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
SuperTask():m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
||||||
|
~SuperTask(){};
|
||||||
protected:
|
protected:
|
||||||
/** Function defined
|
/** Function signature defined
|
||||||
* First argument is Return type, the remaining are arguments
|
* First argument is Return type, the remaining are arguments
|
||||||
*/
|
*/
|
||||||
|
func00_t <void >* m1;
|
||||||
|
func0_t <int >* m2;
|
||||||
func00_t <void >* m1;
|
func1_t <int, int>* m3;
|
||||||
func0_t <int >* m2;
|
func1_t <string, string>* m4;
|
||||||
func1_t <int, int>* m3;
|
func1_t <detectorSettings, int>* m5;
|
||||||
func1_t <string, string>* m4;
|
func2_t <int, int,int>* m6;
|
||||||
func1_t <detectorSettings, int>* m5;
|
func2_t <int, string,int>* m7;
|
||||||
func2_t <int, int,int>* m6;
|
func2_t <dacs_t, dacIndex,int>* m8;
|
||||||
func2_t <int, string,int>* m7;
|
func2_t <detectorSettings, detectorSettings,int>* m9;
|
||||||
func2_t <dacs_t, dacIndex,int>* m8;
|
func2_t <string, networkParameter,string>* m10;
|
||||||
func2_t <detectorSettings, detectorSettings,int>* m9;
|
func3_t <int, int,int,int>* m11;
|
||||||
func2_t <string, networkParameter,string>* m10;
|
func4_t <int, trimMode,int,int,int>* m12;
|
||||||
func3_t <int, int,int,int>* m11;
|
func4_t <int, int,int,detectorSettings,int>* m13;
|
||||||
func4_t <int, trimMode,int,int,int>* m12;
|
func4_t <dacs_t, dacs_t,dacIndex,int,int>* m14;
|
||||||
func4_t <int, int,int,detectorSettings,int>* m13;
|
|
||||||
func4_t <dacs_t, dacs_t,dacIndex,int,int>* m14;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Task: public virtual SuperTask{
|
class Task: public virtual SuperTask {
|
||||||
public:
|
public:
|
||||||
/** Constructors
|
/** Task Constructors using appropriate function signature
|
||||||
* First argument is Return type, the remaining are arguments
|
* First argument is Return type, the remaining are arguments
|
||||||
*/
|
*/
|
||||||
Task(func00_t <void >* t): SuperTask(),m1(t){};
|
Task(func00_t <void >* t): SuperTask(),fnum(1){m1 = t;};
|
||||||
Task(func0_t <int >* t): m1(0),m2(t),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func0_t <int >* t): SuperTask(),fnum(2){m2 = t;};
|
||||||
Task(func1_t <int, int>* t): m1(0),m2(0),m3(t),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func1_t <int, int>* t): SuperTask(),fnum(3){m3 = t;};
|
||||||
Task(func1_t <string, string>* t): m1(0),m2(0),m3(0),m4(t),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func1_t <string, string>* t): SuperTask(),fnum(4){m4 = t;};
|
||||||
Task(func1_t <detectorSettings, int>* t): m1(0),m2(0),m3(0),m4(0),m5(t),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func1_t <detectorSettings, int>* t): SuperTask(),fnum(5){m5 = t;};
|
||||||
Task(func2_t <int, int,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(t),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func2_t <int, int,int>* t): SuperTask(),fnum(6){m6 = t;};
|
||||||
Task(func2_t <int, string,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(t),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func2_t <int, string,int>* t): SuperTask(),fnum(7){m7 = t;};
|
||||||
Task(func2_t <dacs_t, dacIndex,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(t),m9(0),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func2_t <dacs_t, dacIndex,int>* t): SuperTask(),fnum(8){m8 = t;};
|
||||||
Task(func2_t <detectorSettings, detectorSettings,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(t),m10(0),m11(0),m12(0),m13(0),m14(0){};
|
Task(func2_t <detectorSettings, detectorSettings,int>* t): SuperTask(),fnum(9){m9 = t;};
|
||||||
Task(func2_t <string, networkParameter,string>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(t),m11(0),m12(0),m13(0),m14(0){};
|
Task(func2_t <string, networkParameter,string>* t): SuperTask(),fnum(10){m10 = t;};
|
||||||
Task(func3_t <int, int,int,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(t),m12(0),m13(0),m14(0){};
|
Task(func3_t <int, int,int,int>* t): SuperTask(),fnum(11){m11 = t;};
|
||||||
Task(func4_t <int, trimMode,int,int,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(t),m13(0),m14(0){};
|
Task(func4_t <int, trimMode,int,int,int>* t): SuperTask(),fnum(12){m12 = t;};
|
||||||
Task(func4_t <int, int,int,detectorSettings,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(t),m14(0){};
|
Task(func4_t <int, int,int,detectorSettings,int>* t): SuperTask(),fnum(13){m13 = t;};
|
||||||
Task(func4_t <dacs_t, dacs_t,dacIndex,int,int>* t): m1(0),m2(0),m3(0),m4(0),m5(0),m6(0),m7(0),m8(0),m9(0),m10(0),m11(0),m12(0),m13(0),m14(t){};
|
Task(func4_t <dacs_t, dacs_t,dacIndex,int,int>* t): SuperTask(),fnum(14){m14 = t;};
|
||||||
|
|
||||||
|
|
||||||
~Task(){}
|
~Task(){}
|
||||||
|
|
||||||
void operator()(){
|
void operator()(){
|
||||||
if(m1) (*m1)();
|
switch(fnum) {
|
||||||
else if(m2) (*m2)();
|
case 1: (*m1)(); break;
|
||||||
else if(m3) (*m3)();
|
case 2: (*m2)(); break;
|
||||||
else if(m4) (*m4)();
|
case 3: (*m3)(); break;
|
||||||
else if(m5) (*m5)();
|
case 4: (*m4)(); break;
|
||||||
else if(m6) (*m6)();
|
case 5: (*m5)(); break;
|
||||||
else if(m7) (*m7)();
|
case 6: (*m6)(); break;
|
||||||
else if(m8) (*m8)();
|
case 7: (*m7)(); break;
|
||||||
else if(m9) (*m9)();
|
case 8: (*m8)(); break;
|
||||||
else if(m10) (*m10)();
|
case 9: (*m9)(); break;
|
||||||
else if(m11) (*m11)();
|
case 10: (*m10)(); break;
|
||||||
else if(m12) (*m12)();
|
case 11: (*m11)(); break;
|
||||||
else if(m13) (*m13)();
|
case 12: (*m12)(); break;
|
||||||
else if(m14) (*m14)();
|
case 13: (*m13)(); break;
|
||||||
|
case 14: (*m14)(); break;
|
||||||
|
default:
|
||||||
|
cprintf(RED, "Error: Task not defined. Abort!\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** function number */
|
||||||
|
int fnum;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user