Merge branch 'developer' into gotthardversioning

This commit is contained in:
2018-05-29 12:14:59 +02:00
10 changed files with 5234 additions and 6175 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1042,24 +1042,55 @@ class multiSlsDetector : public slsDetectorUtils {
//virtual runStatus getRunStatus()=0;
runStatus getRunStatus();
void setErrorMaskFromAllDetectors();
template<typename T>
bool allElemetsEqual(const std::vector<T>&);
template<typename T>
T callDetectorMember(T (slsDetector::*somefunc)());
std::string callDetectorMember(std::string(slsDetector::*somefunc)());
template<typename T, typename V>
T callDetectorMember(T (slsDetector::*somefunc)(V), V value);
template<typename T, typename P1, typename P2>
T callDetectorMember(T (slsDetector::*somefunc)(P1, P2), P1 par1, P2 par2);
//func0_t
template<typename T>
T parallelCallDetectorMember(T (slsDetector::*somefunc)());
//func1_t
template<typename T, typename P1>
T parallelCallDetectorMember(T (slsDetector::*somefunc)(P1), P1 value); //Should probably be templated
//func2_t
template<typename T, typename P1, typename P2>
T parallelCallDetectorMember(T (slsDetector::*somefunc)(P1, P2), P1 par1, P2 par2);
int parallelCallDetectorMember(int (slsDetector::*somefunc)(int, int, int), int v0, int v1, int v2); //Should probably be templated
template<typename T>
T minusOneIfDifferent(const std::vector<T>&);
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
char* getSettingsDir();
std::string getSettingsDir();
/** 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
\sa sharedSlsDetector
*/
char* getCalDir();
std::string getCalDir();
/**
sets the location of the calibration files
\sa sharedSlsDetector
*/
char* setCalDir(std::string s);
std::string setCalDir(std::string s);
std::string getNetworkParameter(networkParameter);

View File

@ -1316,7 +1316,7 @@ int slsDetector::setOnline(int off) {
string slsDetector::checkOnline() {
string retval = string("");
string retval;
if(!controlSocket){
//this already sets the online/offline flag
setTCPSocket();

View File

@ -490,9 +490,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
/* I/O */
/** 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 */
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;};
@ -500,12 +500,12 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
returns the location of the calibration files
\sa sharedSlsDetector
*/
char* getCalDir() {return thisDetector->calDir;};
std::string getCalDir() {return thisDetector->calDir;};
/**
sets the location of the calibration files
\sa sharedSlsDetector
*/
char* setCalDir(string s) {sprintf(thisDetector->calDir, s.c_str()); return thisDetector->calDir;};
std::string setCalDir(string s) {sprintf(thisDetector->calDir, s.c_str()); return thisDetector->calDir;};

View File

@ -3047,9 +3047,9 @@ string slsDetectorCommand::cmdSettingsDir(int narg, char *args[], int action){
if (action==PUT_ACTION) {
myDet->setSettingsDir(string(args[1]));
}
if (myDet->getSettingsDir()==NULL)
if (myDet->getSettingsDir()=="")
return string("undefined");
return string(myDet->getSettingsDir());
return myDet->getSettingsDir();
}
@ -3077,9 +3077,9 @@ string slsDetectorCommand::cmdCalDir(int narg, char *args[], int action){
if (action==PUT_ACTION) {
myDet->setCalDir(string(args[1]));
}
if (myDet->getCalDir()==NULL)
if ( (myDet->getCalDir()).empty() )
return string("undefined");
return string(myDet->getCalDir());
return myDet->getCalDir();
}

View File

@ -405,20 +405,20 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
/**
returns the detector trimbit/settings directory
*/
virtual char* getSettingsDir()=0;
virtual std::string getSettingsDir()=0;
/** 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
*/
virtual char* getCalDir()=0;
virtual std::string getCalDir()=0;
/**
sets the location of the calibration files
*/
virtual char* setCalDir(std::string s)=0;
virtual std::string setCalDir(std::string s)=0;
/** Frees the shared memory - should not be used except for debugging*/
virtual int freeSharedMemory()=0;