mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
in between
This commit is contained in:
parent
91f3db6691
commit
67cdfe8b41
@ -1190,7 +1190,7 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func4_t<int,slsDetector,int,int,detectorSettings,int,int>(&slsDetector::setThresholdEnergy,
|
Task* task = new Task(new func4_t<int,int,int,detectorSettings,int>(&slsDetector::setThresholdEnergy,
|
||||||
detectors[idet],e_eV,-1,isettings,tb,iret[idet]));
|
detectors[idet],e_eV,-1,isettings,tb,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1237,11 +1237,11 @@ slsDetectorDefs::detectorSettings multiSlsDetector::getSettings(int pos) {
|
|||||||
return GET_SETTINGS;
|
return GET_SETTINGS;
|
||||||
}else{
|
}else{
|
||||||
//return storage values
|
//return storage values
|
||||||
int* iret[posmax-posmin];
|
detectorSettings* iret[posmax-posmin];
|
||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new detectorSettings(GET_SETTINGS);
|
||||||
Task* task = new Task(new func1_t<detectorSettings,slsDetector,int,int>(&slsDetector::getSettings,
|
Task* task = new Task(new func1_t<detectorSettings,int>(&slsDetector::getSettings,
|
||||||
detectors[idet],-1,iret[idet]));
|
detectors[idet],-1,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1285,11 +1285,11 @@ slsDetectorDefs::detectorSettings multiSlsDetector::setSettings(detectorSettings
|
|||||||
return GET_SETTINGS;
|
return GET_SETTINGS;
|
||||||
}else{
|
}else{
|
||||||
//return storage values
|
//return storage values
|
||||||
int* iret[posmax-posmin];
|
detectorSettings* iret[posmax-posmin];
|
||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new detectorSettings(GET_SETTINGS);
|
||||||
Task* task = new Task(new func2_t<detectorSettings,slsDetector,detectorSettings,int,int>(&slsDetector::setSettings,
|
Task* task = new Task(new func2_t<detectorSettings,detectorSettings,int>(&slsDetector::setSettings,
|
||||||
detectors[idet],isettings,-1,iret[idet]));
|
detectors[idet],isettings,-1,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1374,7 +1374,7 @@ int multiSlsDetector::prepareAcquisition(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::prepareAcquisition,
|
Task* task = new Task(new func0_t<int>(&slsDetector::prepareAcquisition,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1437,7 +1437,7 @@ int multiSlsDetector::cleanupAcquisition(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::cleanupAcquisition,
|
Task* task = new Task(new func0_t<int>(&slsDetector::cleanupAcquisition,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1483,7 +1483,7 @@ int multiSlsDetector::startAcquisition(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::startAcquisition,
|
Task* task = new Task(new func0_t<int>(&slsDetector::startAcquisition,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1545,7 +1545,7 @@ int multiSlsDetector::stopAcquisition(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::stopAcquisition,
|
Task* task = new Task(new func0_t<int>(&slsDetector::stopAcquisition,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -1828,7 +1828,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::startAndReadAllNoWait,
|
Task* task = new Task(new func0_t<int>(&slsDetector::startAndReadAllNoWait,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -3148,7 +3148,7 @@ dacs_t multiSlsDetector::setDAC(dacs_t val, dacIndex idac, int mV, int imod) {
|
|||||||
for(int idet=posmin; idet<posmax; ++idet){
|
for(int idet=posmin; idet<posmax; ++idet){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new dacs_t(-1);
|
iret[idet]= new dacs_t(-1);
|
||||||
Task* task = new Task(new func4_t <dacs_t,slsDetector,dacs_t,dacIndex,int,int,dacs_t>(&slsDetector::setDAC,
|
Task* task = new Task(new func4_t <dacs_t,dacs_t,dacIndex,int,int>(&slsDetector::setDAC,
|
||||||
detectors[idet],val, idac, mV, imod, iret[idet]));
|
detectors[idet],val, idac, mV, imod, iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -3210,7 +3210,7 @@ dacs_t multiSlsDetector::getADC(dacIndex idac, int imod) {
|
|||||||
for(int idet=posmin; idet<posmax; ++idet){
|
for(int idet=posmin; idet<posmax; ++idet){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new dacs_t(-1);
|
iret[idet]= new dacs_t(-1);
|
||||||
Task* task = new Task(new func2_t <dacs_t,slsDetector,dacIndex,int,dacs_t>(&slsDetector::getADC,
|
Task* task = new Task(new func2_t <dacs_t,dacIndex,int>(&slsDetector::getADC,
|
||||||
detectors[idet],idac, imod, iret[idet]));
|
detectors[idet],idac, imod, iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -3608,7 +3608,7 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){
|
|||||||
if (p == RECEIVER_STREAMING_PORT)
|
if (p == RECEIVER_STREAMING_PORT)
|
||||||
s.append("multi\0");
|
s.append("multi\0");
|
||||||
sret[idet]=new string("error");
|
sret[idet]=new string("error");
|
||||||
Task* task = new Task(new func2_t <string,slsDetector,networkParameter,string,string>(&slsDetector::setNetworkParameter,
|
Task* task = new Task(new func2_t <string,networkParameter,string>(&slsDetector::setNetworkParameter,
|
||||||
detectors[idet],p,s,sret[idet]));
|
detectors[idet],p,s,sret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -4264,7 +4264,7 @@ int multiSlsDetector::executeTrimming(trimMode mode, int par1, int par2, int imo
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func4_t <int,slsDetector,trimMode,int,int,int,int>(&slsDetector::executeTrimming,
|
Task* task = new Task(new func4_t <int,trimMode,int,int,int>(&slsDetector::executeTrimming,
|
||||||
detectors[idet],mode,par1,par2,imod,iret[idet]));
|
detectors[idet],mode,par1,par2,imod,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -4367,7 +4367,7 @@ int multiSlsDetector::loadSettingsFile(string fname, int imod) {
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func2_t <int,slsDetector,string,int,int>(&slsDetector::loadSettingsFile,
|
Task* task = new Task(new func2_t <int,string,int>(&slsDetector::loadSettingsFile,
|
||||||
detectors[idet],fname,imod,iret[idet]));
|
detectors[idet],fname,imod,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -4441,7 +4441,7 @@ int multiSlsDetector::setAllTrimbits(int val, int imod){
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func2_t <int,slsDetector,int,int,int>(&slsDetector::setAllTrimbits,
|
Task* task = new Task(new func2_t <int,int,int>(&slsDetector::setAllTrimbits,
|
||||||
detectors[idet],val,imod,iret[idet]));
|
detectors[idet],val,imod,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -4495,7 +4495,7 @@ int multiSlsDetector::loadCalibrationFile(string fname, int imod) {
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func2_t <int,slsDetector,string,int,int>(&slsDetector::loadCalibrationFile,
|
Task* task = new Task(new func2_t <int,string,int>(&slsDetector::loadCalibrationFile,
|
||||||
detectors[idet],fname,imod,iret[idet]));
|
detectors[idet],fname,imod,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -5173,7 +5173,7 @@ int multiSlsDetector::startReceiver(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::startReceiver,
|
Task* task = new Task(new func0_t<int>(&slsDetector::startReceiver,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -5235,7 +5235,7 @@ int multiSlsDetector::stopReceiver(){
|
|||||||
for(int idet=posmin; idet<posmax; idet++){
|
for(int idet=posmin; idet<posmax; idet++){
|
||||||
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
|
||||||
iret[idet]= new int(OK);
|
iret[idet]= new int(OK);
|
||||||
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::stopReceiver,
|
Task* task = new Task(new func0_t<int>(&slsDetector::stopReceiver,
|
||||||
detectors[idet],iret[idet]));
|
detectors[idet],iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -5906,7 +5906,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func1_t <int,slsDetector,int,int>(&slsDetector::enableDataStreamingFromReceiver,
|
Task* task = new Task(new func1_t <int,int>(&slsDetector::enableDataStreamingFromReceiver,
|
||||||
detectors[idet],enable,iret[idet]));
|
detectors[idet],enable,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -6135,7 +6135,7 @@ int multiSlsDetector::pulsePixel(int n,int x,int y) {
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func3_t <int,slsDetector,int,int,int,int>(&slsDetector::pulsePixel,
|
Task* task = new Task(new func3_t <int,int,int,int>(&slsDetector::pulsePixel,
|
||||||
detectors[idet],n,x,y,iret[idet]));
|
detectors[idet],n,x,y,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -6172,7 +6172,7 @@ int multiSlsDetector::pulsePixelNMove(int n,int x,int y) {
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func3_t <int,slsDetector,int,int,int,int>(&slsDetector::pulsePixelNMove,
|
Task* task = new Task(new func3_t <int,int,int,int>(&slsDetector::pulsePixelNMove,
|
||||||
detectors[idet],n,x,y,iret[idet]));
|
detectors[idet],n,x,y,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
@ -6209,7 +6209,7 @@ int multiSlsDetector::pulseChip(int n) {
|
|||||||
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
for(int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++){
|
||||||
if(detectors[idet]){
|
if(detectors[idet]){
|
||||||
iret[idet]= new int(-1);
|
iret[idet]= new int(-1);
|
||||||
Task* task = new Task(new func1_t <int,slsDetector,int,int>(&slsDetector::pulseChip,
|
Task* task = new Task(new func1_t <int,int>(&slsDetector::pulseChip,
|
||||||
detectors[idet],n,iret[idet]));
|
detectors[idet],n,iret[idet]));
|
||||||
threadpool->add_task(task);
|
threadpool->add_task(task);
|
||||||
}
|
}
|
||||||
|
@ -16,127 +16,138 @@ using namespace std;
|
|||||||
|
|
||||||
class slsDetector;
|
class slsDetector;
|
||||||
|
|
||||||
template<typename _Ret, typename _Class>
|
template<typename _Ret>
|
||||||
class func00_t{
|
class func00_t{
|
||||||
public:
|
public:
|
||||||
func00_t(_Ret (_Class::*fn)(),_Class* ptr):
|
func00_t(_Ret (slsDetector::*fn)(),slsDetector* ptr):
|
||||||
m_fn(fn),m_ptr(ptr){}
|
m_fn(fn),m_ptr(ptr){}
|
||||||
~func00_t() {}
|
~func00_t() {}
|
||||||
void operator()() const {((m_ptr->*m_fn)());}
|
void operator()() const {((m_ptr->*m_fn)());}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)();
|
_Ret (slsDetector::*m_fn)();
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Ret, typename _Class, typename _Store>
|
template<typename _Ret>
|
||||||
class func0_t{
|
class func0_t{
|
||||||
public:
|
public:
|
||||||
func0_t(_Ret (_Class::*fn)(),_Class* ptr, _Store* sto):
|
func0_t(_Ret (slsDetector::*fn)(),slsDetector* ptr, _Ret* sto):
|
||||||
m_fn(fn),m_ptr(ptr),m_store(sto){}
|
m_fn(fn),m_ptr(ptr),m_store(sto){}
|
||||||
~func0_t() {}
|
~func0_t() {}
|
||||||
void operator()() const {*m_store = ((m_ptr->*m_fn)());}
|
void operator()() const {*m_store = ((m_ptr->*m_fn)());}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)();
|
_Ret (slsDetector::*m_fn)();
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
_Store* m_store;
|
_Ret* m_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Ret, typename _Class,typename _Arg1, typename _Store>
|
template<typename _Ret,typename _Arg1>
|
||||||
class func1_t{
|
class func1_t{
|
||||||
public:
|
public:
|
||||||
func1_t(_Ret (_Class::*fn)(_Arg1),_Class* ptr,_Arg1 arg1, _Store* sto):
|
func1_t(_Ret (slsDetector::*fn)(_Arg1),slsDetector* ptr,_Arg1 arg1, _Ret* sto):
|
||||||
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_store(sto){}
|
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_store(sto){}
|
||||||
~func1_t() {}
|
~func1_t() {}
|
||||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1));}
|
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1));}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)(_Arg1);
|
_Ret (slsDetector::*m_fn)(_Arg1);
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
_Arg1 m_arg1;
|
_Arg1 m_arg1;
|
||||||
_Store* m_store;
|
_Ret* m_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Ret, typename _Class,typename _Arg1, typename _Arg2,typename _Store>
|
template<typename _Ret,typename _Arg1, typename _Arg2>
|
||||||
class func2_t{
|
class func2_t{
|
||||||
public:
|
public:
|
||||||
func2_t(_Ret (_Class::*fn)(_Arg1,_Arg2),_Class* ptr,_Arg1 arg1,_Arg2 arg2,_Store* sto):
|
func2_t(_Ret (slsDetector::*fn)(_Arg1,_Arg2),slsDetector* ptr,_Arg1 arg1,_Arg2 arg2,_Ret* sto):
|
||||||
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_store(sto){}
|
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_store(sto){}
|
||||||
~func2_t() {}
|
~func2_t() {}
|
||||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2));}
|
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2));}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2);
|
_Ret (slsDetector::*m_fn)(_Arg1,_Arg2);
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
_Arg1 m_arg1;
|
_Arg1 m_arg1;
|
||||||
_Arg2 m_arg2;
|
_Arg2 m_arg2;
|
||||||
_Store* m_store;
|
_Ret* m_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Ret, typename _Class,typename _Arg1, typename _Arg2, typename _Arg3, typename _Store>
|
template<typename _Ret,typename _Arg1, typename _Arg2, typename _Arg3>
|
||||||
class func3_t{
|
class func3_t{
|
||||||
public:
|
public:
|
||||||
func3_t(_Ret (_Class::*fn)(_Arg1,_Arg2,_Arg3),_Class* ptr,_Arg1 arg1,_Arg2 arg2,_Arg3 arg3,_Store* sto):
|
func3_t(_Ret (slsDetector::*fn)(_Arg1,_Arg2,_Arg3),slsDetector* ptr,_Arg1 arg1,_Arg2 arg2,_Arg3 arg3,_Ret* sto):
|
||||||
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_arg3(arg3),m_store(sto){}
|
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_arg3(arg3),m_store(sto){}
|
||||||
~func3_t() {}
|
~func3_t() {}
|
||||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3));}
|
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3));}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3);
|
_Ret (slsDetector::*m_fn)(_Arg1,_Arg2,_Arg3);
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
_Arg1 m_arg1;
|
_Arg1 m_arg1;
|
||||||
_Arg2 m_arg2;
|
_Arg2 m_arg2;
|
||||||
_Arg3 m_arg3;
|
_Arg3 m_arg3;
|
||||||
_Store* m_store;
|
_Ret* m_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Ret, typename _Class,typename _Arg1, typename _Arg2, typename _Arg3, typename _Arg4,typename _Store>
|
template<typename _Ret,typename _Arg1, typename _Arg2, typename _Arg3, typename _Arg4>
|
||||||
class func4_t{
|
class func4_t{
|
||||||
public:
|
public:
|
||||||
func4_t(_Ret (_Class::*fn)(_Arg1,_Arg2,_Arg3,_Arg4),_Class* ptr,_Arg1 arg1,_Arg2 arg2,_Arg3 arg3,_Arg4 arg4,_Store* sto):
|
func4_t(_Ret (slsDetector::*fn)(_Arg1,_Arg2,_Arg3,_Arg4),slsDetector* ptr,_Arg1 arg1,_Arg2 arg2,_Arg3 arg3,_Arg4 arg4,_Ret* sto):
|
||||||
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_arg3(arg3),m_arg4(arg4),m_store(sto){}
|
m_fn(fn),m_ptr(ptr),m_arg1(arg1),m_arg2(arg2),m_arg3(arg3),m_arg4(arg4),m_store(sto){}
|
||||||
~func4_t() {}
|
~func4_t() {}
|
||||||
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3,m_arg4));}
|
void operator()() const {*m_store = ((m_ptr->*m_fn)(m_arg1,m_arg2,m_arg3,m_arg4));}
|
||||||
private:
|
private:
|
||||||
_Ret (_Class::*m_fn)(_Arg1,_Arg2,_Arg3,_Arg4);
|
_Ret (slsDetector::*m_fn)(_Arg1,_Arg2,_Arg3,_Arg4);
|
||||||
_Class* m_ptr;
|
slsDetector* m_ptr;
|
||||||
_Arg1 m_arg1;
|
_Arg1 m_arg1;
|
||||||
_Arg2 m_arg2;
|
_Arg2 m_arg2;
|
||||||
_Arg3 m_arg3;
|
_Arg3 m_arg3;
|
||||||
_Arg4 m_arg4;
|
_Arg4 m_arg4;
|
||||||
_Store* m_store;
|
_Ret* m_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Task: public virtual slsDetectorDefs{
|
|
||||||
|
class SuperTask: public virtual slsDetectorDefs {
|
||||||
public:
|
public:
|
||||||
/* Return: int, Param: int */
|
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){};
|
||||||
Task(func1_t <int,slsDetector,int,int>* t): m1(t),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),m15(0){};
|
protected:
|
||||||
/* Return: int, Param: string,int */
|
/** Function defined
|
||||||
Task(func2_t <int,slsDetector,string,int,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),m15(0){};
|
* First argument is Return type, the remaining are arguments
|
||||||
/* Return: string, Param: string */
|
*/
|
||||||
Task(func1_t <string,slsDetector,string,string>* 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),m15(0){};
|
|
||||||
/* Return: char*, Param: char* */
|
|
||||||
Task(func1_t <char*,slsDetector,char*,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),m15(0){};
|
|
||||||
/* Return: detectorSettings, Param: int */
|
|
||||||
Task(func1_t <detectorSettings,slsDetector,int,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),m15(0){};
|
|
||||||
/* Return: detectorSettings, Param: detectorSettings,int */
|
|
||||||
Task(func2_t <detectorSettings,slsDetector,detectorSettings,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),m15(0){};
|
|
||||||
/* Return: int, Param: int,int */
|
|
||||||
Task(func2_t <int,slsDetector,int,int,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),m15(0){};
|
|
||||||
/* Return: int, Param: int,int,int */
|
|
||||||
Task(func3_t <int,slsDetector,int,int,int,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),m15(0){};
|
|
||||||
/* Return: int, Param: trimMode,int,int,int */
|
|
||||||
Task(func4_t <int,slsDetector,trimMode,int,int,int,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),m15(0){};
|
|
||||||
/* Return: int, Param: none */
|
|
||||||
Task(func0_t <int,slsDetector,int>* 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),m15(0){};
|
|
||||||
/* Return: char*, Param: networkParameter,string */
|
|
||||||
Task(func2_t <string,slsDetector,networkParameter,string,string>* 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),m15(0){};
|
|
||||||
/* Return: void, Param: none */
|
|
||||||
Task(func00_t <void,slsDetector>* 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),m15(0){};
|
|
||||||
/* Return: int, Param: int,int,detectorSettings,int */
|
|
||||||
Task(func4_t <int,slsDetector,int,int,detectorSettings,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(t),m14(0),m15(0){};
|
|
||||||
/* Return: dacs_t, Param: dacs_t, dacIndex, int, int */
|
|
||||||
Task(func4_t <dacs_t,slsDetector,dacs_t,dacIndex,int,int,dacs_t>* 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),m15(0){};
|
|
||||||
/* Return: dacs_t, Param: dacIndex, int */
|
|
||||||
Task(func2_t <dacs_t,slsDetector,dacIndex,int,dacs_t>* 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(0),m15(t){};
|
|
||||||
|
|
||||||
|
|
||||||
|
func00_t <void >* m1;
|
||||||
|
func0_t <int >* m2;
|
||||||
|
func1_t <int, int>* m3;
|
||||||
|
func1_t <string, string>* m4;
|
||||||
|
func1_t <detectorSettings, int>* m5;
|
||||||
|
func2_t <int, int,int>* m6;
|
||||||
|
func2_t <int, string,int>* m7;
|
||||||
|
func2_t <dacs_t, dacIndex,int>* m8;
|
||||||
|
func2_t <detectorSettings, detectorSettings,int>* m9;
|
||||||
|
func2_t <string, networkParameter,string>* m10;
|
||||||
|
func3_t <int, int,int,int>* m11;
|
||||||
|
func4_t <int, trimMode,int,int,int>* m12;
|
||||||
|
func4_t <int, int,int,detectorSettings,int>* m13;
|
||||||
|
func4_t <dacs_t, dacs_t,dacIndex,int,int>* m14;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Task: public virtual SuperTask{
|
||||||
|
public:
|
||||||
|
/** Constructors
|
||||||
|
* First argument is Return type, the remaining are arguments
|
||||||
|
*/
|
||||||
|
Task(func00_t <void >* t): SuperTask(),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(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 <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 <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(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, 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 <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 <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 <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(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(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, 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 <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(){}
|
~Task(){}
|
||||||
@ -156,42 +167,7 @@ public:
|
|||||||
else if(m12) (*m12)();
|
else if(m12) (*m12)();
|
||||||
else if(m13) (*m13)();
|
else if(m13) (*m13)();
|
||||||
else if(m14) (*m14)();
|
else if(m14) (*m14)();
|
||||||
else if(m15) (*m15)();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
/* Return: int, Param: int */
|
|
||||||
func1_t <int,slsDetector,int,int>* m1;
|
|
||||||
/* Return: int, Param: string,int */
|
|
||||||
func2_t <int,slsDetector,string,int,int>* m2;
|
|
||||||
/* Return: string, Param: string */
|
|
||||||
func1_t <string,slsDetector,string,string>* m3;
|
|
||||||
/* Return: char*, Param: char* */
|
|
||||||
func1_t <char*,slsDetector,char*,string>* m4;
|
|
||||||
/* Return: detectorSettings, Param: int */
|
|
||||||
func1_t <detectorSettings,slsDetector,int,int>* m5;
|
|
||||||
/* Return: detectorSettings, Param: detectorSettings,int */
|
|
||||||
func2_t <detectorSettings,slsDetector,detectorSettings,int,int>* m6;
|
|
||||||
/* Return: int, Param: int,int */
|
|
||||||
func2_t <int,slsDetector,int,int,int>* m7;
|
|
||||||
/* Return: int, Param: int,int,int */
|
|
||||||
func3_t <int,slsDetector,int,int,int,int>* m8;
|
|
||||||
/* Return: int, Param: trimMode,int,int,int */
|
|
||||||
func4_t <int,slsDetector,trimMode,int,int,int,int>* m9;
|
|
||||||
/* Return: int, Param: int */
|
|
||||||
func0_t <int,slsDetector,int>* m10;
|
|
||||||
/* Return: char*, Param: networkParameter,string */
|
|
||||||
func2_t <string,slsDetector,networkParameter,string,string>* m11;
|
|
||||||
/* Return: void, Param: none */
|
|
||||||
func00_t <void,slsDetector>* m12;
|
|
||||||
/* Return: int, Param: int,int,detectorSettings,int */
|
|
||||||
func4_t <int,slsDetector,int,int,detectorSettings,int,int>* m13;
|
|
||||||
/* Return: dacs_t, Param: dacs_t, dacIndex, int, int */
|
|
||||||
func4_t <dacs_t,slsDetector,dacs_t,dacIndex,int,int,dacs_t>* m14;
|
|
||||||
/* Return: dacs_t, Param: dacIndex, int */
|
|
||||||
func2_t <dacs_t,slsDetector,dacIndex,int,dacs_t>* m15;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user