cleaning up slsDetectorCommand

This commit is contained in:
Erik Frojdh
2019-01-16 10:29:10 +01:00
parent 9d9251293d
commit fe09f6d062
2 changed files with 5 additions and 10 deletions

View File

@ -1,5 +1,6 @@
#include "slsDetectorCommand.h" #include "slsDetectorCommand.h"
#include "multiSlsDetector.h" #include "multiSlsDetector.h"
#include "string_utils.h"
#include <cstdlib> #include <cstdlib>
#include <fstream> #include <fstream>

View File

@ -1,9 +1,7 @@
#include "multiSlsDetectorClient.h" #include "multiSlsDetectorClient.h"
#include "gitInfoLib.h" #include "gitInfoLib.h"
#include <cstdlib>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -11,7 +9,7 @@ int main(int argc, char *argv[])
for (int i = 1; i < argc; ++i ) { for (int i = 1; i < argc; ++i ) {
if (!(strcmp (argv[i],"--version")) || !(strcmp (argv[i],"-v"))) { if (!(strcmp (argv[i],"--version")) || !(strcmp (argv[i],"-v"))) {
int64_t tempval = GITDATE; int64_t tempval = GITDATE;
cout << argv[0] << " " << GITBRANCH << " (0x" << hex << tempval << ")" << endl; std::cout << argv[0] << " " << GITBRANCH << " (0x" << std::hex << tempval << ")" << std::endl;
return 0; return 0;
} }
} }
@ -24,23 +22,19 @@ int main(int argc, char *argv[])
int action=slsDetectorDefs::GET_ACTION; int action=slsDetectorDefs::GET_ACTION;
#endif #endif
#ifdef READOUT #ifdef READOUT
int action=slsDetectorDefs::READOUT_ACTION; int action=slsDetectorDefs::READOUT_ACTION;
#endif #endif
#ifdef HELP #ifdef HELP
int action=slsDetectorDefs::HELP_ACTION; int action=slsDetectorDefs::HELP_ACTION;
#endif #endif
multiSlsDetectorClient *cl;
if (argc>1) if (argc>1)
cl=new multiSlsDetectorClient(argc-1, argv+1, action); multiSlsDetectorClient(argc-1, argv+1, action);
else else
cl=new multiSlsDetectorClient(argc-1, argv, action); multiSlsDetectorClient(argc-1, argv, action);
delete cl;
} }