mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
WIP
This commit is contained in:
parent
146d605d19
commit
40f6eb8ede
@ -64,13 +64,13 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// How big should this try block be?
|
|
||||||
sls::Detector det(parser.multi_id());
|
sls::Detector det(parser.multi_id());
|
||||||
sls::CmdProxy proxy(&det);
|
sls::CmdProxy proxy(&det);
|
||||||
proxy.Call(parser.command(), parser.arguments(), parser.detector_id(),
|
proxy.Call(parser.command(), parser.arguments(), parser.detector_id(),
|
||||||
action);
|
action);
|
||||||
} catch (const sls::RuntimeError &e) {
|
} catch (const sls::RuntimeError &e) {
|
||||||
// OK to catch and do nothing since this will print the error message
|
exit(EXIT_FAILURE);
|
||||||
// and command line app will anyway exit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
@ -1126,6 +1126,10 @@ int DetectorImpl::acquire() {
|
|||||||
(end.tv_nsec - begin.tv_nsec) / 1000000000.0)
|
(end.tv_nsec - begin.tv_nsec) / 1000000000.0)
|
||||||
<< " seconds";
|
<< " seconds";
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
if (dataProcessingThread.joinable()){
|
||||||
|
setJoinThreadFlag(true);
|
||||||
|
dataProcessingThread.join();
|
||||||
|
}
|
||||||
setAcquiringFlag(false);
|
setAcquiringFlag(false);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
|
|||||||
<< " filename:" << filename << " fileindex:" << fileindex
|
<< " filename:" << filename << " fileindex:" << fileindex
|
||||||
<< " datasize:" << datasize << " ####";
|
<< " datasize:" << datasize << " ####";
|
||||||
|
|
||||||
/*throw std::runtime_error(
|
// throw std::runtime_error(
|
||||||
"Throwing exception from start acquisition call back");*/
|
// "Throwing exception from start acquisition call back");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user