mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 18:40:42 +02:00
chaning return type of getSettingsDir and setSettingsDir to std::string
This commit is contained in:
parent
e65b416215
commit
301600e720
@ -1044,31 +1044,6 @@ slsDetectorDefs::synchronizationMode multiSlsDetector::setSynchronization(synchr
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int multiSlsDetector::setOnline(int off) {
|
int multiSlsDetector::setOnline(int off) {
|
||||||
|
|
||||||
if (off!=GET_ONLINE_FLAG) {
|
if (off!=GET_ONLINE_FLAG) {
|
||||||
@ -2077,8 +2052,6 @@ int multiSlsDetector::setSpeed(speedVariable index, int value){
|
|||||||
int i;
|
int i;
|
||||||
int ret1=-100, ret;
|
int ret1=-100, ret;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (i=0; i<thisMultiDetector->numberOfDetectors; ++i) {
|
for (i=0; i<thisMultiDetector->numberOfDetectors; ++i) {
|
||||||
if (detectors[i]) {
|
if (detectors[i]) {
|
||||||
ret=detectors[i]->setSpeed(index,value);
|
ret=detectors[i]->setSpeed(index,value);
|
||||||
@ -2098,22 +2071,13 @@ int multiSlsDetector::setSpeed(speedVariable index, int value){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int multiSlsDetector::getDataBytes(){
|
int multiSlsDetector::getDataBytes(){
|
||||||
int ret=0;
|
int n_bytes = 0;
|
||||||
for (int ip=0; ip<thisMultiDetector->numberOfDetectors; ++ip) {
|
for (int ip=0; ip<thisMultiDetector->numberOfDetectors; ++ip) {
|
||||||
if (detectors[ip])
|
if (detectors[ip])
|
||||||
ret+=detectors[ip]->getDataBytes();
|
n_bytes += detectors[ip]->getDataBytes();
|
||||||
}
|
}
|
||||||
return ret;
|
return n_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3656,7 +3620,8 @@ int multiSlsDetector::exitServer() {
|
|||||||
|
|
||||||
|
|
||||||
/** returns the detector trimbit/settings directory */
|
/** returns the detector trimbit/settings directory */
|
||||||
char* multiSlsDetector::getSettingsDir() {
|
// char* multiSlsDetector::getSettingsDir() {
|
||||||
|
string multiSlsDetector::getSettingsDir() {
|
||||||
string s0="", s1="", s;
|
string s0="", s1="", s;
|
||||||
|
|
||||||
|
|
||||||
@ -3678,16 +3643,16 @@ char* multiSlsDetector::getSettingsDir() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s1=="bad")
|
if (s1=="bad")
|
||||||
strcpy(ans,s0.c_str());
|
return s0;
|
||||||
else
|
else
|
||||||
strcpy(ans,s1.c_str());
|
return s1;
|
||||||
return ans;
|
// return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
char* multiSlsDetector::setSettingsDir(string s){
|
string multiSlsDetector::setSettingsDir(string s){
|
||||||
|
|
||||||
if (s.find('+')==string::npos) {
|
if (s.find('+')==string::npos) {
|
||||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; ++idet) {
|
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; ++idet) {
|
||||||
|
@ -1047,9 +1047,9 @@ class multiSlsDetector : public slsDetectorUtils {
|
|||||||
|
|
||||||
|
|
||||||
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
char* getSettingsDir();
|
std::string getSettingsDir();
|
||||||
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
char* setSettingsDir(std::string s);
|
std::string setSettingsDir(std::string s);
|
||||||
/**
|
/**
|
||||||
returns the location of the calibration files
|
returns the location of the calibration files
|
||||||
\sa sharedSlsDetector
|
\sa sharedSlsDetector
|
||||||
|
@ -483,9 +483,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
|||||||
/* I/O */
|
/* I/O */
|
||||||
|
|
||||||
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
char* getSettingsDir() {return thisDetector->settingsDir;};
|
std::string getSettingsDir() {return std::string(thisDetector->settingsDir);};
|
||||||
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
|
||||||
char* setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};
|
std::string setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3031,9 +3031,9 @@ string slsDetectorCommand::cmdSettingsDir(int narg, char *args[], int action){
|
|||||||
if (action==PUT_ACTION) {
|
if (action==PUT_ACTION) {
|
||||||
myDet->setSettingsDir(string(args[1]));
|
myDet->setSettingsDir(string(args[1]));
|
||||||
}
|
}
|
||||||
if (myDet->getSettingsDir()==NULL)
|
if (myDet->getSettingsDir()=="")
|
||||||
return string("undefined");
|
return string("undefined");
|
||||||
return string(myDet->getSettingsDir());
|
return myDet->getSettingsDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -405,10 +405,10 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
|
|||||||
/**
|
/**
|
||||||
returns the detector trimbit/settings directory
|
returns the detector trimbit/settings directory
|
||||||
*/
|
*/
|
||||||
virtual char* getSettingsDir()=0;
|
virtual std::string getSettingsDir()=0;
|
||||||
|
|
||||||
/** sets the detector trimbit/settings directory */
|
/** sets the detector trimbit/settings directory */
|
||||||
virtual char* setSettingsDir(std::string s)=0;
|
virtual std::string setSettingsDir(std::string s)=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
returns the location of the calibration files
|
returns the location of the calibration files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user