mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 10:04:39 +01:00
scripting stuff added
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@26 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@@ -241,6 +241,30 @@ int slsDetector::initializeDetectorSize(detectorType type) {
|
||||
thisDetector->binSize=0;
|
||||
thisDetector->stoppedFlag=0;
|
||||
|
||||
thisDetector->actionMask=0;
|
||||
|
||||
|
||||
for (int ia=0; ia<MAX_ACTIONS; ia++) {
|
||||
thisDetector->actionMode[ia]=0;
|
||||
strcpy(thisDetector->actionScript[ia],"none");
|
||||
strcpy(thisDetector->actionParameter[ia],"none");
|
||||
}
|
||||
|
||||
|
||||
for (int iscan=0; iscan<MAX_SCAN_LEVELS; iscan++) {
|
||||
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
strcpy(thisDetector->scanScript[iscan],"none");
|
||||
strcpy(thisDetector->scanParameter[iscan],"none");
|
||||
thisDetector->nScanSteps[iscan]=0;
|
||||
thisDetector->scanPrecision[iscan]=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** calculates the memory offsets for flat field coefficients and errors, module structures, dacs, adcs, chips and channels */
|
||||
@@ -627,11 +651,27 @@ string slsDetector::createFileName() {
|
||||
/*directory name +root file name */
|
||||
osfn << thisDetector->filePath << "/" << thisDetector->fileName;
|
||||
|
||||
// scan level 0
|
||||
if (thisDetector->actionMask & (1 << (MAX_ACTIONS)))
|
||||
osfn << "_S" << fixed << setprecision(thisDetector->scanPrecision[0]) << currentScanVariable[0];
|
||||
|
||||
//scan level 1
|
||||
if (thisDetector->actionMask & (1 << (MAX_ACTIONS+1)))
|
||||
osfn << "_s" << fixed << setprecision(thisDetector->scanPrecision[1]) << currentScanVariable[1];
|
||||
|
||||
|
||||
//position
|
||||
if (currentPositionIndex>0 && currentPositionIndex<=thisDetector->numberOfPositions)
|
||||
osfn << "_p" << currentPositionIndex;
|
||||
|
||||
// file index
|
||||
osfn << "_" << thisDetector->fileIndex;
|
||||
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << "created file name " << osfn.str() << endl;
|
||||
#endif
|
||||
|
||||
return osfn.str();
|
||||
|
||||
}
|
||||
@@ -3094,11 +3134,11 @@ int slsDetector::setFlatFieldCorrection(string fname){
|
||||
fillBadChannelMask();
|
||||
|
||||
} else {
|
||||
std::cout<< "Flat field data from file " << fname << " are not valid " << std::endl;
|
||||
std::cout<< "Flat field data from file " << fname << " are not valid (" << nmed << "///" << xmed[nmed/2] << std::endl;
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
std::cout<< "Flat field from file " << fname << " is not valid " << std::endl;
|
||||
std::cout<< "Flat field from file " << fname << " is not valid " << nch << std::endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -3216,6 +3256,27 @@ int slsDetector::getRateCorrection(float &t){
|
||||
return 0;
|
||||
};
|
||||
|
||||
float slsDetector::getRateCorrectionTau(){
|
||||
|
||||
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Rate correction is enabled with dead time "<< thisDetector->tDead << std::endl;
|
||||
#endif
|
||||
return thisDetector->tDead;
|
||||
//return 1;
|
||||
} else
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Rate correction is disabled " << std::endl;
|
||||
#endif
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int slsDetector::getRateCorrection(){
|
||||
|
||||
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
||||
@@ -3428,6 +3489,392 @@ int slsDetector::exitServer(){
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
set action
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, MAX_ACTIONS}
|
||||
\param fname for script ("" disable but leaves script unchanged, "none" disables and overwrites)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int slsDetector::setAction(int iaction, string fname, string par) {
|
||||
|
||||
if (iaction>=0 && iaction<MAX_ACTIONS) {
|
||||
|
||||
if (fname=="") {
|
||||
thisDetector->actionMode[iaction]=0;
|
||||
} else if (fname=="none") {
|
||||
thisDetector->actionMode[iaction]=0;
|
||||
strcpy(thisDetector->actionScript[iaction],fname.c_str());
|
||||
} else {
|
||||
strcpy(thisDetector->actionScript[iaction],fname.c_str());
|
||||
thisDetector->actionMode[iaction]=1;
|
||||
}
|
||||
|
||||
if (par!="") {
|
||||
strcpy(thisDetector->actionParameter[iaction],par.c_str());
|
||||
}
|
||||
|
||||
if (thisDetector->actionMode[iaction]) {
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << iaction << " " << hex << (1 << iaction) << " " << thisDetector->actionMask << dec;
|
||||
#endif
|
||||
|
||||
thisDetector->actionMask |= (1 << iaction);
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << " set " << hex << thisDetector->actionMask << dec << endl;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
#ifdef VERBOSE
|
||||
cout << iaction << " " << hex << thisDetector->actionMask << dec;
|
||||
#endif
|
||||
|
||||
thisDetector->actionMask &= ~(1 << iaction);
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << " unset " << hex << thisDetector->actionMask << dec << endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
cout << iaction << " Action mask set to " << hex << thisDetector->actionMask << dec << endl;
|
||||
#endif
|
||||
|
||||
return thisDetector->actionMode[iaction];
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int slsDetector::setActionScript(int iaction, string fname) {
|
||||
#ifdef VERBOSE
|
||||
|
||||
#endif
|
||||
return setAction(iaction,fname,"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
int slsDetector::setActionParameter(int iaction, string par) {
|
||||
if (iaction>=0 && iaction<MAX_ACTIONS) {
|
||||
|
||||
if (par!="") {
|
||||
strcpy(thisDetector->actionParameter[iaction],par.c_str());
|
||||
}
|
||||
|
||||
if (thisDetector->actionMode[iaction]) {
|
||||
thisDetector->actionMask |= (1 << iaction);
|
||||
} else {
|
||||
thisDetector->actionMask &= ~(1 << iaction);
|
||||
}
|
||||
|
||||
return thisDetector->actionMode[iaction];
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
returns action script
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action script
|
||||
*/
|
||||
string slsDetector::getActionScript(int iaction){
|
||||
if (iaction>=0 && iaction<MAX_ACTIONS)
|
||||
return string(thisDetector->actionScript[iaction]);
|
||||
else
|
||||
return string("wrong index");
|
||||
};
|
||||
|
||||
/**
|
||||
returns action parameter
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action parameter
|
||||
*/
|
||||
string slsDetector::getActionParameter(int iaction){
|
||||
if (iaction>=0 && iaction<MAX_ACTIONS)
|
||||
return string(thisDetector->actionParameter[iaction]);
|
||||
else
|
||||
return string("wrong index");
|
||||
}
|
||||
|
||||
/**
|
||||
returns action mode
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action mode
|
||||
*/
|
||||
int slsDetector::getActionMode(int iaction){
|
||||
if (iaction>=0 && iaction<MAX_ACTIONS) {
|
||||
#ifdef VERBOSE
|
||||
cout << "slsDetetctor : action " << iaction << " mode is " << thisDetector->actionMode[iaction] << endl;
|
||||
#endif
|
||||
return thisDetector->actionMode[iaction];
|
||||
} else {
|
||||
#ifdef VERBOSE
|
||||
cout << "slsDetetctor : wrong action index " << iaction << endl;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
set scan
|
||||
\param index of the scan (0,1)
|
||||
\param fname for script ("" disable)
|
||||
\returns 0 if scan disabled, >0 otherwise
|
||||
*/
|
||||
int slsDetector::setScan(int iscan, string script, int nvalues, float *values, string par, int precision) {
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
|
||||
if (script=="") {
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
} else {
|
||||
strcpy(thisDetector->scanScript[iscan],script.c_str());
|
||||
if (script=="none") {
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
} else if (script=="energy") {
|
||||
thisDetector->scanMode[iscan]=1;
|
||||
} else if (script=="threshold") {
|
||||
thisDetector->scanMode[iscan]=2;
|
||||
} else if (script=="trimbits") {
|
||||
thisDetector->scanMode[iscan]=3;
|
||||
} else {
|
||||
thisDetector->scanMode[iscan]=4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (par!="")
|
||||
strcpy(thisDetector->scanParameter[iscan],par.c_str());
|
||||
|
||||
if (nvalues>=0) {
|
||||
if (nvalues==0)
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
else {
|
||||
thisDetector->nScanSteps[iscan]=nvalues;
|
||||
if (nvalues>MAX_SCAN_STEPS)
|
||||
thisDetector->nScanSteps[iscan]=MAX_SCAN_STEPS;
|
||||
}
|
||||
}
|
||||
|
||||
if (values) {
|
||||
for (int iv=0; iv<thisDetector->nScanSteps[iscan]; iv++) {
|
||||
thisDetector->scanSteps[iscan][iv]=values[iv];
|
||||
}
|
||||
}
|
||||
if (precision>=0)
|
||||
thisDetector->scanPrecision[iscan]=precision;
|
||||
|
||||
if (thisDetector->scanMode[iscan]>0){
|
||||
thisDetector->actionMask |= 1 >> (iscan+MAX_ACTIONS);
|
||||
} else {
|
||||
thisDetector->actionMask &= ~(1 >> (iscan+MAX_ACTIONS));
|
||||
}
|
||||
|
||||
|
||||
return thisDetector->scanMode[iscan];
|
||||
} else
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
int slsDetector::setScanScript(int iscan, string script) {
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
if (script=="") {
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
} else {
|
||||
strcpy(thisDetector->scanScript[iscan],script.c_str());
|
||||
if (script=="none") {
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
} else if (script=="energy") {
|
||||
thisDetector->scanMode[iscan]=1;
|
||||
} else if (script=="threshold") {
|
||||
thisDetector->scanMode[iscan]=2;
|
||||
} else if (script=="trimbits") {
|
||||
thisDetector->scanMode[iscan]=3;
|
||||
} else {
|
||||
thisDetector->scanMode[iscan]=4;
|
||||
}
|
||||
}
|
||||
|
||||
if (thisDetector->scanMode[iscan]>0){
|
||||
thisDetector->actionMask |= (1 << (iscan+MAX_ACTIONS));
|
||||
} else {
|
||||
thisDetector->actionMask &= ~(1 << (iscan+MAX_ACTIONS));
|
||||
}
|
||||
|
||||
|
||||
return thisDetector->scanMode[iscan];
|
||||
|
||||
|
||||
} else
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int slsDetector::setScanParameter(int iscan, string par) {
|
||||
|
||||
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
if (par!="")
|
||||
strcpy(thisDetector->scanParameter[iscan],par.c_str());
|
||||
return thisDetector->scanMode[iscan];
|
||||
} else
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int slsDetector::setScanPrecision(int iscan, int precision) {
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
if (precision>=0)
|
||||
thisDetector->scanPrecision[iscan]=precision;
|
||||
return thisDetector->scanMode[iscan];
|
||||
} else
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
int slsDetector::setScanSteps(int iscan, int nvalues, float *values) {
|
||||
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
|
||||
if (nvalues>=0) {
|
||||
if (nvalues==0)
|
||||
thisDetector->scanMode[iscan]=0;
|
||||
else {
|
||||
thisDetector->nScanSteps[iscan]=nvalues;
|
||||
if (nvalues>MAX_SCAN_STEPS)
|
||||
thisDetector->nScanSteps[iscan]=MAX_SCAN_STEPS;
|
||||
}
|
||||
}
|
||||
|
||||
if (values) {
|
||||
for (int iv=0; iv<thisDetector->nScanSteps[iscan]; iv++) {
|
||||
thisDetector->scanSteps[iscan][iv]=values[iv];
|
||||
}
|
||||
}
|
||||
|
||||
if (thisDetector->scanMode[iscan]>0){
|
||||
thisDetector->actionMask |= (1 << (iscan+MAX_ACTIONS));
|
||||
} else {
|
||||
thisDetector->actionMask &= ~(1 << (iscan+MAX_ACTIONS));
|
||||
}
|
||||
|
||||
|
||||
return thisDetector->scanMode[iscan];
|
||||
|
||||
|
||||
} else
|
||||
return -1;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
returns scan script
|
||||
\param iscan can be (0,1)
|
||||
\returns scan script
|
||||
*/
|
||||
string slsDetector::getScanScript(int iscan){
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS)
|
||||
return string(thisDetector->scanScript[iscan]);
|
||||
else
|
||||
return string("wrong index");
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
returns scan parameter
|
||||
\param iscan can be (0,1)
|
||||
\returns scan parameter
|
||||
*/
|
||||
string slsDetector::getScanParameter(int iscan){
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS)
|
||||
return string(thisDetector->scanParameter[iscan]);
|
||||
else
|
||||
return string("wrong index");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
returns scan mode
|
||||
\param iscan can be (0,1)
|
||||
\returns scan mode
|
||||
*/
|
||||
int slsDetector::getScanMode(int iscan){
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS)
|
||||
return thisDetector->scanMode[iscan];
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
returns scan steps
|
||||
\param iscan can be (0,1)
|
||||
\param v is the pointer to the scan steps
|
||||
\returns scan steps
|
||||
*/
|
||||
int slsDetector::getScanSteps(int iscan, float *v) {
|
||||
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
if (v) {
|
||||
for (int iv=0; iv<thisDetector->nScanSteps[iscan]; iv++) {
|
||||
v[iv]=thisDetector->scanSteps[iscan][iv];
|
||||
}
|
||||
}
|
||||
|
||||
return thisDetector->nScanSteps[iscan];
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int slsDetector::getScanPrecision(int iscan){
|
||||
if (iscan>=0 && iscan<MAX_SCAN_LEVELS) {
|
||||
return thisDetector->scanPrecision[iscan];
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void slsDetector::startThread() {
|
||||
|
||||
@@ -28,6 +28,8 @@ extern "C" {
|
||||
#define MAX_ROIS 100
|
||||
#define MAX_BADCHANS 2000
|
||||
#define MAXPOS 50
|
||||
#define MAX_SCAN_LEVELS 2
|
||||
#define MAX_SCAN_STEPS 2000
|
||||
|
||||
#define NMODMAXX 24
|
||||
#define NMODMAXY 24
|
||||
@@ -43,6 +45,9 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, MAX_ACTIONS};
|
||||
|
||||
|
||||
/**
|
||||
data structure to hold the detector data after postprocessing (e.g. to plot, store in a root tree etc.)
|
||||
*/
|
||||
@@ -243,6 +248,7 @@ typedef struct sharedSlsDetector {
|
||||
/** readout flags */
|
||||
readOutFlags roFlags;
|
||||
|
||||
|
||||
/* detector setup - not needed */
|
||||
/** name root of the output files */
|
||||
char trimFile[MAX_STR_LENGTH];
|
||||
@@ -254,9 +260,28 @@ typedef struct sharedSlsDetector {
|
||||
int64_t timerValue[MAX_TIMERS];
|
||||
/** clock divider */
|
||||
//int clkDiv;
|
||||
|
||||
|
||||
/** Scans and scripts */
|
||||
|
||||
int actionMask;
|
||||
|
||||
int actionMode[MAX_ACTIONS];
|
||||
char actionScript[MAX_ACTIONS][MAX_STR_LENGTH];
|
||||
char actionParameter[MAX_ACTIONS][MAX_STR_LENGTH];
|
||||
|
||||
|
||||
int scanMode[MAX_SCAN_LEVELS];
|
||||
char scanScript[MAX_SCAN_LEVELS][MAX_STR_LENGTH];
|
||||
char scanParameter[MAX_SCAN_LEVELS][MAX_STR_LENGTH];
|
||||
int nScanSteps[MAX_SCAN_LEVELS];
|
||||
float scanSteps[MAX_SCAN_LEVELS][MAX_SCAN_STEPS];
|
||||
int scanPrecision[MAX_SCAN_LEVELS];
|
||||
|
||||
|
||||
|
||||
/*offsets*/
|
||||
/** memory offsets for the flat filed coefficients */
|
||||
/** memory offsets for the flat field coefficients */
|
||||
int ffoff;
|
||||
/** memory offsets for the flat filed coefficient errors */
|
||||
int fferroff;
|
||||
@@ -1079,7 +1104,7 @@ s
|
||||
get flat field corrections file name
|
||||
\returns flat field correction file name
|
||||
*/
|
||||
char *getFlatFieldCorrectionFile(){return thisDetector->flatFieldFile;};
|
||||
char *getFlatFieldCorrectionFile(){ if (thisDetector->correctionMask&(1<<FLAT_FIELD_CORRECTION)) return thisDetector->flatFieldFile; else return "none";};
|
||||
|
||||
/**
|
||||
set rate correction
|
||||
@@ -1094,8 +1119,14 @@ s
|
||||
\param t reference for dead time
|
||||
\returns 0 if rate correction disabled, >0 otherwise
|
||||
*/
|
||||
int getRateCorrection(float &t);
|
||||
int getRateCorrection(float &t);
|
||||
|
||||
|
||||
/**
|
||||
get rate correction tau
|
||||
\returns 0 if rate correction disabled, otherwise the tau used for the correction
|
||||
*/
|
||||
float getRateCorrectionTau();
|
||||
/**
|
||||
get rate correction
|
||||
\returns 0 if rate correction disabled, >0 otherwise
|
||||
@@ -1210,6 +1241,106 @@ s
|
||||
|
||||
|
||||
|
||||
/**
|
||||
set action
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, MAX_ACTIONS}
|
||||
\param fname for script ("" disable)
|
||||
\param par for script
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setAction(int iaction, string fname="", string par="");
|
||||
|
||||
/**
|
||||
set action
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, MAX_ACTIONS}
|
||||
\param fname for script ("" disable)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setActionScript(int iaction, string fname="");
|
||||
/**
|
||||
set action
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, MAX_ACTIONS}
|
||||
\param par for script ("" disable)
|
||||
\returns 0 if action disabled, >0 otherwise
|
||||
*/
|
||||
int setActionParameter(int iaction, string par="");
|
||||
|
||||
/**
|
||||
returns action script
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action script
|
||||
*/
|
||||
string getActionScript(int iaction);
|
||||
|
||||
/**
|
||||
returns action parameter
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action parameter
|
||||
*/
|
||||
string getActionParameter(int iaction);
|
||||
|
||||
/**
|
||||
returns action mode
|
||||
\param iaction can be enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript}
|
||||
\returns action mode
|
||||
*/
|
||||
int getActionMode(int iaction);
|
||||
|
||||
|
||||
/**
|
||||
set scan
|
||||
\param index of the scan (0,1)
|
||||
\param fname for script ("" disables, "none" disables and overwrites current)
|
||||
\param nvalues number of steps (0 disables, -1 leaves current value)
|
||||
\param values pointer to steps (if NULL leaves current values)
|
||||
\param par parameter for the scan script ("" leaves unchanged)
|
||||
\returns 0 is scan disabled, >0 otherwise
|
||||
*/
|
||||
int setScan(int index, string script="", int nvalues=-1, float *values=NULL, string par="", int precision=-1);
|
||||
|
||||
int setScanScript(int index, string script="");
|
||||
int setScanParameter(int index, string par="");
|
||||
int setScanPrecision(int index, int precision=-1);
|
||||
int setScanSteps(int index, int nvalues=-1, float *values=NULL);
|
||||
/**
|
||||
returns scan script
|
||||
\param iscan can be (0,1)
|
||||
\returns scan script
|
||||
*/
|
||||
string getScanScript(int iscan);
|
||||
|
||||
/**
|
||||
returns scan parameter
|
||||
\param iscan can be (0,1)
|
||||
\returns scan parameter
|
||||
*/
|
||||
string getScanParameter(int iscan);
|
||||
|
||||
/**
|
||||
returns scan mode
|
||||
\param iscan can be (0,1)
|
||||
\returns scan mode
|
||||
*/
|
||||
int getScanMode(int iscan);
|
||||
|
||||
/**
|
||||
returns scan steps
|
||||
\param iscan can be (0,1)
|
||||
\param v is the pointer to the scan steps
|
||||
\returns scan steps
|
||||
*/
|
||||
int getScanSteps(int iscan, float *v=NULL);
|
||||
|
||||
|
||||
/**
|
||||
returns scan precision
|
||||
\param iscan can be (0,1)
|
||||
\returns scan precision
|
||||
*/
|
||||
int getScanPrecision(int iscan);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
decode data from the detector converting them to an array of floats, one for each channle
|
||||
@@ -1407,6 +1538,20 @@ s
|
||||
*/
|
||||
float currentI0;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
current scan variable of the detector
|
||||
*/
|
||||
float currentScanVariable[MAX_SCAN_LEVELS];
|
||||
|
||||
/**
|
||||
current scan variable index of the detector
|
||||
*/
|
||||
int currentScanIndex[MAX_SCAN_LEVELS];
|
||||
|
||||
|
||||
|
||||
|
||||
/** merging bins */
|
||||
@@ -1421,11 +1566,6 @@ s
|
||||
/** merging multiplicity */
|
||||
int *mergingMultiplicity;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** pointer to flat field coefficients */
|
||||
float *ffcoefficients;
|
||||
|
||||
Reference in New Issue
Block a user