mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
included setroi for multidet
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@466 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -3912,20 +3912,99 @@ int slsDetector::setDynamicRange(int n){
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
int slsDetector::setROI(int nroi, int *xmin, int *xmax, int *ymin, int *ymax){
|
|
||||||
|
|
||||||
|
|
||||||
return thisDetector->nROI;
|
int slsDetector::setROI(int n,ROI roiLimits[]){
|
||||||
};
|
int ret = FAIL;
|
||||||
|
//sort ascending order
|
||||||
|
int temp;
|
||||||
|
for(int i=0;i<n;i++){
|
||||||
|
for(int j=i+1;j<n;j++){
|
||||||
|
if(roiLimits[j].xmin<roiLimits[i].xmin){
|
||||||
|
temp=roiLimits[i].xmin;roiLimits[i].xmin=roiLimits[j].xmin;roiLimits[j].xmin=temp;
|
||||||
|
temp=roiLimits[i].xmax;roiLimits[i].xmax=roiLimits[j].xmax;roiLimits[j].xmax=temp;
|
||||||
|
temp=roiLimits[i].ymin;roiLimits[i].ymin=roiLimits[j].ymin;roiLimits[j].ymin=temp;
|
||||||
|
temp=roiLimits[i].ymax;roiLimits[i].ymax=roiLimits[j].ymax;roiLimits[j].ymax=temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = sendROI(n,roiLimits);
|
||||||
|
if(ret==FAIL)
|
||||||
|
setErrorMask((getErrorMask())|(COULDNOT_SET_ROI));
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int slsDetector::getROI(int nroi, int *xmin, int *xmax, int *ymin, int *ymax){
|
slsDetectorDefs::ROI* slsDetector::getROI(int &n){
|
||||||
|
sendROI();
|
||||||
|
n=thisDetector->nROI;
|
||||||
|
return thisDetector->roiLimits;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int slsDetector::sendROI(int n,ROI roiLimits[]){
|
||||||
|
int ret=FAIL;
|
||||||
|
int fnum=F_SET_ROI;
|
||||||
|
char mess[100];
|
||||||
|
int arg = n;
|
||||||
|
int retvalsize=0;
|
||||||
|
ROI retval[MAX_ROIS];
|
||||||
|
int nrec=-1;
|
||||||
|
|
||||||
|
|
||||||
|
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||||
|
if (controlSocket) {
|
||||||
|
if (controlSocket->Connect()>=0) {
|
||||||
|
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||||
|
controlSocket->SendDataOnly(&arg,sizeof(arg));
|
||||||
|
if(arg==-1){;
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Getting ROI from detector" << endl;
|
||||||
|
#endif
|
||||||
|
}else{
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Sending ROI of size " << arg << " to detector" << endl;
|
||||||
|
#endif
|
||||||
|
controlSocket->SendDataOnly(roiLimits,arg*sizeof(ROI));
|
||||||
|
}
|
||||||
|
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||||
|
|
||||||
|
if (ret!=FAIL){
|
||||||
|
controlSocket->ReceiveDataOnly(&retvalsize,sizeof(retvalsize));
|
||||||
|
nrec = controlSocket->ReceiveDataOnly(retval,retvalsize*sizeof(ROI));
|
||||||
|
if(nrec!=(retvalsize*sizeof(ROI))){
|
||||||
|
ret=FAIL;
|
||||||
|
std::cout << " wrong size received: received " << nrec << "but expected " << retvalsize*sizeof(ROI) << endl;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||||
|
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||||
|
}
|
||||||
|
controlSocket->Disconnect();
|
||||||
|
if (ret==FORCE_UPDATE)
|
||||||
|
updateDetector();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//update client
|
||||||
|
if(ret!=FAIL){
|
||||||
|
for(int i=0;i<retvalsize;i++)
|
||||||
|
thisDetector->roiLimits[i]=retval[i];
|
||||||
|
thisDetector->nROI = retvalsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef VERBOSE
|
||||||
|
for(int j=0;j<thisDetector->nROI;j++)
|
||||||
|
cout<<roiLimits[j].xmin<<"\t"<<roiLimits[j].xmax<<"\t"<<roiLimits[j].ymin<<"\t"<<roiLimits[j].ymax<<endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return thisDetector->nROI;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -4727,7 +4806,7 @@ int slsDetector::setUDPConnection(){
|
|||||||
updateReceiver();
|
updateReceiver();
|
||||||
|
|
||||||
//configure detector with udp details, -100 is so it doesnt overwrite the previous value
|
//configure detector with udp details, -100 is so it doesnt overwrite the previous value
|
||||||
if(configureMAC(-1)==FAIL){
|
if(configureMAC()==FAIL){
|
||||||
setReceiverOnline(OFFLINE_FLAG);
|
setReceiverOnline(OFFLINE_FLAG);
|
||||||
std::cout << "could not configure mac" << endl;
|
std::cout << "could not configure mac" << endl;
|
||||||
}
|
}
|
||||||
@ -4741,7 +4820,7 @@ int slsDetector::setUDPConnection(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int slsDetector::configureMAC(int adc){
|
int slsDetector::configureMAC(){
|
||||||
int i;
|
int i;
|
||||||
int ret=FAIL;
|
int ret=FAIL;
|
||||||
int fnum=F_CONFIGURE_MAC;
|
int fnum=F_CONFIGURE_MAC;
|
||||||
@ -4751,12 +4830,6 @@ int slsDetector::configureMAC(int adc){
|
|||||||
string sword;
|
string sword;
|
||||||
int retval=-1;
|
int retval=-1;
|
||||||
|
|
||||||
if(((adc>=-1)&&(adc<=4))||(adc==-100));
|
|
||||||
else{
|
|
||||||
std::cout << "configure mac failed.\nConfigure [adc]; adc should be -1, 0, 1, 2, 3 or 4" << endl;
|
|
||||||
setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC));
|
|
||||||
return FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if udpip wasnt initialized in config file
|
//if udpip wasnt initialized in config file
|
||||||
if(!(strcmp(thisDetector->receiverUDPIP,"none"))){
|
if(!(strcmp(thisDetector->receiverUDPIP,"none"))){
|
||||||
@ -4782,7 +4855,7 @@ int slsDetector::configureMAC(int adc){
|
|||||||
strcpy(arg[4],thisDetector->detectorIP);
|
strcpy(arg[4],thisDetector->detectorIP);
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "Configuring MAC with adc:"<< adc << std::endl;
|
std::cout<< "Configuring MAC"<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -4849,7 +4922,6 @@ int slsDetector::configureMAC(int adc){
|
|||||||
if (controlSocket->Connect()>=0) {
|
if (controlSocket->Connect()>=0) {
|
||||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||||
controlSocket->SendDataOnly(arg,sizeof(arg));
|
controlSocket->SendDataOnly(arg,sizeof(arg));
|
||||||
controlSocket->SendDataOnly(&adc,sizeof(adc));
|
|
||||||
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||||
if (ret==FAIL){
|
if (ret==FAIL){
|
||||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||||
|
@ -308,10 +308,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
configures mac for gotthard readout
|
configures mac for gotthard readout
|
||||||
\param adc adc number
|
|
||||||
\returns OK or FAIL
|
\returns OK or FAIL
|
||||||
*/
|
*/
|
||||||
int configureMAC(int adc=-1);
|
int configureMAC();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads the configuration file fname
|
Reads the configuration file fname
|
||||||
@ -571,16 +570,30 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
|||||||
/** Returns the number of modules (without connecting to the detector) */
|
/** Returns the number of modules (without connecting to the detector) */
|
||||||
int getNMods(){return thisDetector->nMods;}; //
|
int getNMods(){return thisDetector->nMods;}; //
|
||||||
|
|
||||||
|
/** Returns the number of modules in direction d (without connecting to the detector) */
|
||||||
|
int getNMod(dimension d){return thisDetector->nMod[d];}; //
|
||||||
|
|
||||||
int getChansPerMod(int imod=0){return thisDetector->nChans*thisDetector->nChips;};
|
int getChansPerMod(int imod=0){return thisDetector->nChans*thisDetector->nChips;};
|
||||||
|
|
||||||
|
/** Returns the max number of modules in direction d (without connecting to the detector) */
|
||||||
|
int getNMaxMod(dimension d){return thisDetector->nModMax[d];}; //
|
||||||
|
|
||||||
/** Returns the number of modules (without connecting to the detector) */
|
/** Returns the number of modules (without connecting to the detector) */
|
||||||
int getMaxMods(){return thisDetector->nModsMax;}; //
|
int getMaxMods(){return thisDetector->nModsMax;}; //
|
||||||
|
|
||||||
|
|
||||||
int getTotalNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nMods;};
|
int getTotalNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nMods;};
|
||||||
|
|
||||||
|
int getTotalNumberOfChannels(dimension d){return thisDetector->nChans*thisDetector->nChips*thisDetector->nMod[X];};
|
||||||
|
|
||||||
int getMaxNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nModsMax;};
|
int getMaxNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nModsMax;};
|
||||||
|
|
||||||
|
int getMaxNumberOfChannels(dimension d){return thisDetector->nChans*thisDetector->nChips*thisDetector->nModMax[d];};
|
||||||
|
|
||||||
|
/** Returns number of rois */
|
||||||
|
int getNRoi(){return thisDetector->nROI;};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Communication to server */
|
/* Communication to server */
|
||||||
|
|
||||||
@ -1038,18 +1051,23 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
|||||||
int getDataBytes(){return thisDetector->dataBytes;};
|
int getDataBytes(){return thisDetector->dataBytes;};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
set roi
|
set roi
|
||||||
\param nroi number of rois
|
\param n number of rois
|
||||||
\param xmin x minimum of roi
|
\param roiLimits array of roi
|
||||||
\param xmax x maximum of roi
|
\returns success or failure
|
||||||
\param ymin y minimum of roi
|
|
||||||
\param ymax y maximum of roi
|
|
||||||
\returns number of rois added
|
|
||||||
*/
|
*/
|
||||||
//int setROI(int nroi=-1, int *xmin=NULL, int *xmax=NULL, int *ymin=NULL, int *ymax=NULL);
|
int setROI(int n=-1,ROI roiLimits[]=NULL);
|
||||||
|
|
||||||
|
/**
|
||||||
|
get roi from each detector and convert it to the multi detector scale
|
||||||
|
\param n number of roi
|
||||||
|
\returns an array of multidetector's rois
|
||||||
|
*/
|
||||||
|
slsDetectorDefs::ROI* getROI(int &n);
|
||||||
|
|
||||||
|
|
||||||
|
int sendROI(int n=-1,ROI roiLimits[]=NULL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
set/get readout flags
|
set/get readout flags
|
||||||
|
@ -383,9 +383,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
|||||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
//descrToFuncMap[i].m_pFuncName="roi"; //
|
descrToFuncMap[i].m_pFuncName="roi"; //
|
||||||
//descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
||||||
//i++;
|
i++;
|
||||||
|
|
||||||
|
descrToFuncMap[i].m_pFuncName="detsizechan"; //
|
||||||
|
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
|
||||||
|
i++;
|
||||||
|
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
|
|
||||||
@ -2513,15 +2518,12 @@ string slsDetectorCommand::cmdConfigureMac(int narg, char *args[], int action) {
|
|||||||
if (action==HELP_ACTION) {
|
if (action==HELP_ACTION) {
|
||||||
return helpConfigureMac(narg,args,action);
|
return helpConfigureMac(narg,args,action);
|
||||||
}
|
}
|
||||||
int ival;
|
|
||||||
int ret;
|
int ret;
|
||||||
char ans[1000];
|
char ans[1000];
|
||||||
|
|
||||||
if (action==PUT_ACTION){
|
if (action==PUT_ACTION){
|
||||||
if (sscanf(args[1],"%d",&ival)){
|
|
||||||
myDet->setOnline(ONLINE_FLAG);
|
myDet->setOnline(ONLINE_FLAG);
|
||||||
ret=myDet->configureMAC(ival);
|
ret=myDet->configureMAC();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return string("Cannot get ")+cmd;
|
return string("Cannot get ")+cmd;
|
||||||
@ -2534,7 +2536,7 @@ string slsDetectorCommand::helpConfigureMac(int narg, char *args[], int action)
|
|||||||
|
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||||
os << "configuremac i \n configures the MAC of the detector. i is adc number. -1 for all adcs"<< std::endl;
|
os << "configuremac i \n configures the MAC of the detector."<< std::endl;
|
||||||
if (action==GET_ACTION || action==HELP_ACTION)
|
if (action==GET_ACTION || action==HELP_ACTION)
|
||||||
os << "configuremac " << "Cannot get " << std::endl;
|
os << "configuremac " << "Cannot get " << std::endl;
|
||||||
|
|
||||||
@ -2546,31 +2548,58 @@ string slsDetectorCommand::cmdDetectorSize(int narg, char *args[], int action) {
|
|||||||
|
|
||||||
if (action==HELP_ACTION)
|
if (action==HELP_ACTION)
|
||||||
return helpDetectorSize(narg,args,action);
|
return helpDetectorSize(narg,args,action);
|
||||||
int ret, val=-1;
|
int ret, val=-1, pos=-1,i;
|
||||||
char ans[1000];
|
char ans[1000], temp[100];
|
||||||
// portType index;
|
|
||||||
|
|
||||||
if (action==PUT_ACTION) {
|
if (action==PUT_ACTION) {
|
||||||
if (cmd=="maxmod")
|
if (cmd=="maxmod")
|
||||||
return string("cannot put!");
|
return string("cannot put!");
|
||||||
// else if (cmd=="roi"){
|
else if (!sscanf(args[1],"%d",&val))
|
||||||
|
|
||||||
// } else
|
|
||||||
if (sscanf(args[1],"%d",&val))
|
|
||||||
;
|
|
||||||
else
|
|
||||||
return string("could not scan ")+string(args[0])+string(" ")+string(args[1]);
|
return string("could not scan ")+string(args[0])+string(" ")+string(args[1]);
|
||||||
}
|
|
||||||
|
|
||||||
myDet->setOnline(ONLINE_FLAG);
|
myDet->setOnline(ONLINE_FLAG);
|
||||||
|
|
||||||
|
if (cmd=="roi"){
|
||||||
|
//debug number of arguments
|
||||||
|
if ((val<0) || (narg!=((val*4)+2)) )
|
||||||
|
return helpDetectorSize(narg,args,action);
|
||||||
|
ROI allroi[val];
|
||||||
|
pos=2;
|
||||||
|
for(int i=0;i<val;i++){
|
||||||
|
if ((!sscanf(args[pos++],"%d",&allroi[i].xmin)) ||
|
||||||
|
(!sscanf(args[pos++],"%d",&allroi[i].xmax)) ||
|
||||||
|
(!sscanf(args[pos++],"%d",&allroi[i].ymin)) ||
|
||||||
|
(!sscanf(args[pos++],"%d",&allroi[i].ymax)) )
|
||||||
|
return string("cannot parse arguments for roi");
|
||||||
|
}
|
||||||
|
myDet->setROI(val,allroi);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd=="detsizechan"){
|
||||||
|
if ((sscanf(args[1],"%d",&val)) && (val>0))
|
||||||
|
myDet->setMaxNumberOfChannelsPerDetector(X,val);
|
||||||
|
if ((narg > 2) && (sscanf(args[2],"%d",&val)) && (val>0))
|
||||||
|
myDet->setMaxNumberOfChannelsPerDetector(Y,val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd=="nmod") {
|
if (cmd=="nmod") {
|
||||||
ret=myDet->setNumberOfModules(val);
|
ret=myDet->setNumberOfModules(val);
|
||||||
} else if (cmd=="maxmod") {
|
} else if (cmd=="maxmod") {
|
||||||
ret=myDet->getMaxNumberOfModules();
|
ret=myDet->getMaxNumberOfModules();
|
||||||
} else if (cmd=="dr") {
|
} else if (cmd=="dr") {
|
||||||
ret=myDet->setDynamicRange(val);
|
ret=myDet->setDynamicRange(val);
|
||||||
} else
|
} else if (cmd=="roi") {
|
||||||
|
myDet->getROI(ret);
|
||||||
|
} else if (cmd=="detsizechan") {
|
||||||
|
sprintf(ans,"%d",myDet->getMaxNumberOfChannelsPerDetector(X));
|
||||||
|
sprintf(temp,"%d",myDet->getMaxNumberOfChannelsPerDetector(Y));
|
||||||
|
strcat(ans," ");
|
||||||
|
strcat(ans,temp);
|
||||||
|
return string(ans);
|
||||||
|
}
|
||||||
|
else
|
||||||
return string("unknown detector size ")+cmd;
|
return string("unknown detector size ")+cmd;
|
||||||
|
|
||||||
|
|
||||||
@ -2586,12 +2615,14 @@ string slsDetectorCommand::helpDetectorSize(int narg, char *args[], int action)
|
|||||||
if (action==PUT_ACTION || action==HELP_ACTION) {
|
if (action==PUT_ACTION || action==HELP_ACTION) {
|
||||||
os << "nmod i \n sets the number of modules of the detector"<< std::endl;
|
os << "nmod i \n sets the number of modules of the detector"<< std::endl;
|
||||||
os << "dr i \n sets the dynamic range of the detector"<< std::endl;
|
os << "dr i \n sets the dynamic range of the detector"<< std::endl;
|
||||||
|
os << "roi i xmin xmax ymin ymax \n sets region of interest where i is number of rois;i=0 to clear rois"<< std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (action==GET_ACTION || action==HELP_ACTION) {
|
if (action==GET_ACTION || action==HELP_ACTION) {
|
||||||
os << "nmod \n gets the number of modules of the detector"<< std::endl;
|
os << "nmod \n gets the number of modules of the detector"<< std::endl;
|
||||||
os << "maxmod \n gets the maximum number of modules of the detector"<< std::endl;
|
os << "maxmod \n gets the maximum number of modules of the detector"<< std::endl;
|
||||||
os << "dr \n gets the dynamic range of the detector"<< std::endl;
|
os << "dr \n gets the dynamic range of the detector"<< std::endl;
|
||||||
|
os << "roi \n gets region of interest"<< std::endl;
|
||||||
}
|
}
|
||||||
return os.str();
|
return os.str();
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ using namespace std;
|
|||||||
#include "postProcessing.h"
|
#include "postProcessing.h"
|
||||||
|
|
||||||
#define MAX_TIMERS 11
|
#define MAX_TIMERS 11
|
||||||
#define MAX_ROIS 100
|
|
||||||
#define MAXPOS 50
|
#define MAXPOS 50
|
||||||
|
|
||||||
#define DEFAULT_HOSTNAME "localhost"
|
#define DEFAULT_HOSTNAME "localhost"
|
||||||
@ -67,6 +66,9 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
|||||||
virtual int getNumberOfDetectors(){return 1; };
|
virtual int getNumberOfDetectors(){return 1; };
|
||||||
|
|
||||||
|
|
||||||
|
virtual int getMaxNumberOfChannelsPerDetector(dimension d){return -1;};
|
||||||
|
|
||||||
|
virtual int setMaxNumberOfChannelsPerDetector(dimension d,int i){return -1;};
|
||||||
|
|
||||||
//int setPositions(int nPos, double *pos){return angularConversion::setPositions(nPos, pos);};
|
//int setPositions(int nPos, double *pos){return angularConversion::setPositions(nPos, pos);};
|
||||||
|
|
||||||
@ -430,7 +432,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
|||||||
|
|
||||||
virtual int getTotalNumberOfChannels()=0;
|
virtual int getTotalNumberOfChannels()=0;
|
||||||
virtual int getMaxNumberOfChannels()=0;
|
virtual int getMaxNumberOfChannels()=0;
|
||||||
|
virtual int getMaxNumberOfChannels(dimension d)=0;
|
||||||
|
|
||||||
// virtual int getParameters();
|
// virtual int getParameters();
|
||||||
|
|
||||||
@ -474,11 +476,10 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
configures mac for gotthard readout
|
configures mac for gotthard readout
|
||||||
\param adc adc number
|
|
||||||
\returns OK or FAIL
|
\returns OK or FAIL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual int configureMAC(int adc=-1)=0;
|
virtual int configureMAC()=0;
|
||||||
|
|
||||||
|
|
||||||
/** loads the modules settings/trimbits reading from a file
|
/** loads the modules settings/trimbits reading from a file
|
||||||
@ -656,6 +657,22 @@ virtual int enableWriteToFile(int enable=-1)=0;
|
|||||||
virtual int calibratePedestal(int frames = 0)=0;
|
virtual int calibratePedestal(int frames = 0)=0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
set roi
|
||||||
|
\param n number of rois
|
||||||
|
\param roiLimits array of roi
|
||||||
|
\returns success or failure
|
||||||
|
*/
|
||||||
|
virtual int setROI(int n=-1,ROI roiLimits[]=NULL)=0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
get roi from each detector and convert it to the multi detector scale
|
||||||
|
\param n number of rois
|
||||||
|
\returns an array of multidetector's rois
|
||||||
|
*/
|
||||||
|
virtual ROI* getROI(int &n)=0;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user