mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
enableWriteToFile added
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@204 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -3977,7 +3977,9 @@ float* slsDetector::decodeData(int *datain, float *fdata) {
|
||||
}
|
||||
*/
|
||||
|
||||
int slsDetector::setFlatFieldCorrection(string fname){
|
||||
int slsDetector::setFlatFieldCorrection(string fname)
|
||||
|
||||
{
|
||||
float data[thisDetector->nModMax[X]*thisDetector->nModMax[Y]*thisDetector->nChans*thisDetector->nChips];
|
||||
//float err[thisDetector->nModMax[X]*thisDetector->nModMax[Y]*thisDetector->nChans*thisDetector->nChips];
|
||||
float xmed[thisDetector->nModMax[X]*thisDetector->nModMax[Y]*thisDetector->nChans*thisDetector->nChips];
|
||||
|
@ -64,7 +64,7 @@ using namespace std;
|
||||
*/
|
||||
|
||||
//public virtual slsDetectorUsers,
|
||||
class slsDetectorBase : public virtual slsDetectorDefs, public slsDetectorUsers {
|
||||
class slsDetectorBase : public virtual slsDetectorUsers , public virtual slsDetectorDefs {
|
||||
|
||||
public:
|
||||
|
||||
|
@ -183,6 +183,11 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline;
|
||||
i++;
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="enablefwrite"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdEnablefwrite;
|
||||
i++;
|
||||
|
||||
|
||||
/* Acquisition actions */
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="positions"; //
|
||||
@ -530,6 +535,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer;
|
||||
i++;
|
||||
|
||||
|
||||
/* read only timers */
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="exptimel"; //
|
||||
@ -1295,6 +1301,32 @@ string slsDetectorCommand::helpFileName(int narg, char *args[], int action){
|
||||
}
|
||||
|
||||
|
||||
//enable file write
|
||||
string slsDetectorCommand::cmdEnablefwrite(int narg, char *args[], int action){
|
||||
|
||||
int i;
|
||||
char ans[100];
|
||||
if (action==HELP_ACTION) {
|
||||
return helpFileName(narg, args, action);
|
||||
}
|
||||
if (action==PUT_ACTION) {
|
||||
if (sscanf(args[1],"%d",&i))
|
||||
myDet->enableWriteToFile(i);
|
||||
;
|
||||
}
|
||||
return string(myDet->getFileName());
|
||||
}
|
||||
|
||||
|
||||
|
||||
string slsDetectorCommand::helpEnablefwrite(int narg, char *args[], int action){
|
||||
ostringstream os;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << string("When Enabled writes the data into the file\n");
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << string(" i \t should be 1 or 0 or -1\n");
|
||||
return os.str();
|
||||
}
|
||||
|
||||
string slsDetectorCommand::cmdFileIndex(int narg, char *args[], int action){
|
||||
|
||||
|
@ -81,7 +81,7 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
static string helpImage(int narg, char *args[], int action);
|
||||
static string helpCounter(int narg, char *args[], int action);
|
||||
static string helpADC(int narg, char *args[], int action);
|
||||
|
||||
static string helpEnablefwrite(int narg, char *args[], int action);
|
||||
|
||||
|
||||
|
||||
@ -151,7 +151,8 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
string cmdImage(int narg, char *args[], int action);
|
||||
string cmdCounter(int narg, char *args[], int action);
|
||||
string cmdADC(int narg, char *args[], int action);
|
||||
|
||||
//string helpADC(int narg, char *args[], int action);
|
||||
string cmdEnablefwrite(int narg, char *args[], int action);
|
||||
|
||||
|
||||
|
||||
|
@ -141,6 +141,7 @@ class slsDetectorUsers
|
||||
\returns 0 if disable (or file could not be read), >0 otherwise
|
||||
*/
|
||||
virtual int setFlatFieldCorrectionFile(string fname="")=0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -171,6 +172,10 @@ class slsDetectorUsers
|
||||
*/
|
||||
virtual int enableAngularConversion(int i=-1)=0;
|
||||
|
||||
/**Enable write file function included*/
|
||||
|
||||
virtual int enableWriteToFile(int i=-1)=0;
|
||||
|
||||
/**
|
||||
@short set positions for the acquisition
|
||||
\param nPos number of positions
|
||||
|
Reference in New Issue
Block a user