removed command threaded

This commit is contained in:
Erik Frojdh
2018-10-17 17:35:55 +02:00
parent 1d14dc6ff4
commit 0070a79838
7 changed files with 40 additions and 84 deletions

View File

@ -439,7 +439,7 @@ void slsDetector::initializeDetectorStructure(detectorType type) {
thisDetector->nTrimEn = 0;
for(int i = 0; i < MAX_TRIMEN; ++i)
thisDetector->trimEnergies[i] = 0;
thisDetector->threadedProcessing = 1;
// thisDetector->threadedProcessing = 1;
thisDetector->nROI = 0;
memset(thisDetector->roiLimits, 0, MAX_ROIS * sizeof(ROI));
thisDetector->roFlags = NORMAL_READOUT;

View File

@ -126,7 +126,7 @@ private:
/** threaded processing flag
* (i.e. if data are processed in a separate thread) */
int threadedProcessing;
// int threadedProcessing;
/** number of rois defined */
int nROI;

View File

@ -812,12 +812,12 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRateCorr;
++i;
/*! \page data
- <b>threaded [i]</b> Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded.
*/
descrToFuncMap[i].m_pFuncName="threaded"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdThreaded;
++i;
// /*! \page data
// - <b>threaded [i]</b> Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded.
// */
// descrToFuncMap[i].m_pFuncName="threaded"; //
// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdThreaded;
// ++i;
/*! \page data
- <b>darkimage fn</b> Loads the dark image to the detector from file fn (pedestal image). Cannot get. For Gotthard only.
@ -2161,15 +2161,15 @@ string slsDetectorCommand::cmdData(int narg, char *args[], int action, int detPo
} else if (action==HELP_ACTION) {
return helpData(HELP_ACTION);
} else {
b=myDet->setThreadedProcessing(-1);
myDet->setThreadedProcessing(0);
myDet->setOnline(ONLINE_FLAG, detPos);
myDet->setReceiverOnline(ONLINE_FLAG, detPos);
myDet->readAll(detPos);
//processdata in receiver is useful only for gui purposes
if(myDet->setReceiverOnline(detPos)==OFFLINE_FLAG)
myDet->processData();
myDet->setThreadedProcessing(b);
// b=myDet->setThreadedProcessing(-1);
// myDet->setThreadedProcessing(0);
// myDet->setOnline(ONLINE_FLAG, detPos);
// myDet->setReceiverOnline(ONLINE_FLAG, detPos);
// myDet->readAll(detPos);
// //processdata in receiver is useful only for gui purposes
// if(myDet->setReceiverOnline(detPos)==OFFLINE_FLAG)
// myDet->processData();
// myDet->setThreadedProcessing(b);
return string("");
}
}
@ -2744,21 +2744,21 @@ string slsDetectorCommand::helpRateCorr(int action){
string slsDetectorCommand::cmdThreaded(int narg, char *args[], int action, int detPos){
int ival;
char answer[1000];
// string slsDetectorCommand::cmdThreaded(int narg, char *args[], int action, int detPos){
// int ival;
// char answer[1000];
if (action==HELP_ACTION)
return helpThreaded(action);
// if (action==HELP_ACTION)
// return helpThreaded(action);
if (action==PUT_ACTION) {
if (sscanf(args[1],"%d",&ival))
myDet->setThreadedProcessing(ival);
}
sprintf(answer,"%d",myDet->setThreadedProcessing());
return string(answer);
// if (action==PUT_ACTION) {
// if (sscanf(args[1],"%d",&ival))
// myDet->setThreadedProcessing(ival);
// }
// sprintf(answer,"%d",myDet->setThreadedProcessing());
// return string(answer);
}
// }
string slsDetectorCommand::helpThreaded(int action){

View File

@ -113,7 +113,7 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
std::string cmdFileName(int narg, char *args[], int action, int detPos = -1);
std::string cmdFileIndex(int narg, char *args[], int action, int detPos = -1);
std::string cmdRateCorr(int narg, char *args[], int action, int detPos = -1);
std::string cmdThreaded(int narg, char *args[], int action, int detPos = -1);
// std::string cmdThreaded(int narg, char *args[], int action, int detPos = -1);
std::string cmdNetworkParameter(int narg, char *args[], int action, int detPos = -1);
std::string cmdPort(int narg, char *args[], int action, int detPos = -1);
std::string cmdLock(int narg, char *args[], int action, int detPos = -1);