mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
warnings fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@343 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -723,13 +723,13 @@ int slsDetector::initializeDetectorStructure() {
|
||||
|
||||
/** initializes the dacs values to 0 */
|
||||
for (int idac=0; idac<thisDetector->nDacs; idac++) {
|
||||
*(dacs+idac+thisDetector->nDacs*imod)=0.;
|
||||
*(dacs+idac+thisDetector->nDacs*imod)=0;
|
||||
}
|
||||
|
||||
|
||||
/** initializes the adc values to 0 */
|
||||
for (int iadc=0; iadc<thisDetector->nAdcs; iadc++) {
|
||||
*(adcs+iadc+thisDetector->nAdcs*imod)=0.;
|
||||
*(adcs+iadc+thisDetector->nAdcs*imod)=0;
|
||||
}
|
||||
|
||||
|
||||
@ -1276,7 +1276,7 @@ int slsDetector::setNumberOfModules(int n, dimension d){
|
||||
#endif
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (controlSocket) {
|
||||
cout << "connected" << endl;
|
||||
// cout << "connected" << endl;
|
||||
if (controlSocket->Connect()>=0) {
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
controlSocket->SendDataOnly(&arg,sizeof(arg));
|
||||
@ -1292,7 +1292,7 @@ int slsDetector::setNumberOfModules(int n, dimension d){
|
||||
updateDetector();
|
||||
}
|
||||
} else
|
||||
cout << "no control socket?!??!?" << endl;
|
||||
cout << "no control socket?" << endl;
|
||||
} else {
|
||||
cout << "offline" << endl;
|
||||
ret=OK;
|
||||
@ -5297,7 +5297,7 @@ slsDetectorDefs::synchronizationMode slsDetector::setSynchronization(synchroniza
|
||||
|
||||
/*receiver*/
|
||||
int slsDetector::setReceiverOnline(int off) {
|
||||
int prev = thisDetector->receiverOnlineFlag;
|
||||
// int prev = thisDetector->receiverOnlineFlag;
|
||||
if (off!=GET_ONLINE_FLAG) {
|
||||
if(strcmp(thisDetector->receiverIP,"none")){
|
||||
thisDetector->receiverOnlineFlag=off;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "angleConversionConstant.h"
|
||||
#include "MySocketTCP.h"
|
||||
|
||||
#include "angleConversionConstant.h";
|
||||
#include "angleConversionConstant.h"
|
||||
|
||||
#include "receiverInterface.h"
|
||||
|
||||
|
@ -470,22 +470,7 @@ int slsDetectorActions::executeAction(int level) {
|
||||
fName=getCurrentFileName();
|
||||
nowIndex=getFileIndexFromFileName(getCurrentFileName());
|
||||
case headerAfter:
|
||||
// sprintf(cmd,"%s nrun=%d fn=%s acqtime=%f gainmode=%d threshold=%d badfile=%s angfile=%s bloffset=%f fineoffset=%f fffile=%s/%s tau=%f par=%s", \
|
||||
// getActionScript(level).c_str(), \
|
||||
// getFileIndexFromFileName(currentFileName), \
|
||||
// currentFileName.c_str(), \
|
||||
// ((double)timerValue[ACQUISITION_TIME])*1E-9, \
|
||||
// *currentSettings, \
|
||||
// *currentThresholdEV, \
|
||||
// getBadChannelCorrectionFile().c_str(), \
|
||||
// angularConversion::getAngularConversionFile().c_str(), \
|
||||
// *globalOffset, \
|
||||
// *fineOffset, \
|
||||
// getFlatFieldCorrectionDir().c_str(), \
|
||||
// getFlatFieldCorrectionFile().c_str(), \
|
||||
// getRateCorrectionTau(), \
|
||||
// getActionParameter(level).c_str());
|
||||
|
||||
|
||||
// all other parameters should be taken using text client calls in the header scripts!
|
||||
|
||||
sprintf(cmd,"%s nrun=%d fn=%s par=%s", \
|
||||
|
@ -40,6 +40,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
|
||||
/* Detector structure configuration and debugging commands */
|
||||
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="free";//OK
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFree;
|
||||
i++;
|
||||
@ -83,6 +84,8 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
i++;
|
||||
|
||||
/* data processing commands */
|
||||
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="flatfield"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFlatField;
|
||||
i++;
|
||||
@ -1964,11 +1967,31 @@ string slsDetectorCommand::cmdScripts(int narg, char *args[], int action) {
|
||||
|
||||
string slsDetectorCommand::helpScripts(int narg, char *args[], int action) {
|
||||
|
||||
ostringstream os;
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << "positions np [pos0 pos1...posnp] \t sets the number of positions at which the detector is moved during the acquisition and their values"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << "positions \t returns the number of positions at which the detector is moved during the acquisition and their values"<< std::endl;
|
||||
ostringstream os;
|
||||
|
||||
if (narg>0) {
|
||||
if ((string(args[0]).find("start")!=string::npos) || (string(args[0]).find("stop")!=string::npos) || (string(args[0]).find("scriptbefore")!=string::npos) || \
|
||||
(string(args[0]).find("scriptafter")!=string::npos) || (string(args[0]).find("headerafter")!=string::npos) || (string(args[0]).find("headerbefore")!=string::npos)) {
|
||||
|
||||
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " script \t sets the script to execute for the corresponding action"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the script to execute for the corresponding action"<< std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((string(args[0]).find("encallog")!=string::npos) || (string(args[0]).find("angcallog")!=string::npos)) {
|
||||
|
||||
|
||||
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " i \t enables (1) or disables (0) the logging for the calibration"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the calibration log mode"<< std::endl;
|
||||
}
|
||||
}
|
||||
return os.str();
|
||||
|
||||
}
|
||||
@ -2119,10 +2142,46 @@ string slsDetectorCommand::cmdScans(int narg, char *args[], int action) {
|
||||
string slsDetectorCommand::helpScans(int narg, char *args[], int action) {
|
||||
|
||||
ostringstream os;
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << "positions np [pos0 pos1...posnp] \t sets the number of positions at which the detector is moved during the acquisition and their values"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << "positions \t returns the number of positions at which the detector is moved during the acquisition and their values"<< std::endl;
|
||||
|
||||
if ((string(args[0])).find("script")!=string::npos) {
|
||||
|
||||
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " script \t sets the script to execute for the corresponding scan level (threshold, energy, trimbits or positions are internally defined)"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the script to execute for the corresponding scan level (threshold, energy, trimbits or positions are internally defined)"<< std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((string(args[0])).find("prec")!=string::npos) {
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " i \t sets the number of decimals for the scan variable in the file name"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the number of decimals for the scan variable in the file name"<< std::endl;
|
||||
|
||||
}
|
||||
|
||||
if ((string(args[0])).find("steps")!=string::npos) {
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " n [st0...stn] \t sets the number of steps and steps value for the corresponding scan level"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the the number of steps and steps value for the corresponding scan level"<< std::endl;
|
||||
|
||||
}
|
||||
|
||||
if ((string(args[0])).find("range")!=string::npos) {
|
||||
if (action==PUT_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " min max step \t sets the minimum, maximum and step size for the corresponding scan level"<< std::endl;
|
||||
if (action==GET_ACTION || action==HELP_ACTION)
|
||||
os << args[0] << " \t returns the the number of steps and steps value for the corresponding scan level"<< std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return os.str();
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
|
||||
|
||||
slsDetectorCommand(slsDetectorUtils *det);
|
||||
|
||||
virtual ~slsDetectorCommand(){};
|
||||
|
||||
/* /\** */
|
||||
/* executes a set of string arguments according to a given format. It is used to read/write configuration file, dump and retrieve detector settings and for the command line interface command parsing */
|
||||
@ -175,8 +175,6 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ class slsDetectorUsers
|
||||
|
||||
|
||||
/** @short virtual destructor */
|
||||
~slsDetectorUsers();
|
||||
virtual ~slsDetectorUsers();
|
||||
|
||||
|
||||
|
||||
|
@ -213,7 +213,7 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
|
||||
executeAction(headerBefore);
|
||||
|
||||
if (*correctionMask&(1<< ANGULAR_CONVERSION) || aclog || eclog) {
|
||||
if (*correctionMask&(1<< ANGULAR_CONVERSION) || aclog){// || eclog) {
|
||||
positionFinished(0);
|
||||
setCurrentPosition(getDetectorPosition());
|
||||
}
|
||||
@ -431,9 +431,11 @@ void slsDetectorUtils::acquire(int delflag){
|
||||
if (eclog)
|
||||
delete eclog;
|
||||
|
||||
if (acquisition_finished)
|
||||
if (acquisition_finished) {
|
||||
cout << "Acquisition " << endl;
|
||||
acquisition_finished(getCurrentProgress(),getDetectorStatus(),acqFinished_p);
|
||||
|
||||
cout << "finished " << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user