mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-20 05:54:31 +01:00
moved cmdlineparser.h to includes, Paralel calls edited to throw exception if no detector added
This commit is contained in:
@@ -89,6 +89,8 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
std::vector<int> positions,
|
std::vector<int> positions,
|
||||||
typename NonDeduced<CT>::type... Args) {
|
typename NonDeduced<CT>::type... Args) {
|
||||||
|
|
||||||
|
if (detectors.size() == 0)
|
||||||
|
throw sls::RuntimeError("No detectors added");
|
||||||
if (positions.empty() ||
|
if (positions.empty() ||
|
||||||
(positions.size() == 1 && positions[0] == -1)) {
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
positions.resize(detectors.size());
|
positions.resize(detectors.size());
|
||||||
@@ -115,6 +117,8 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
std::vector<int> positions,
|
std::vector<int> positions,
|
||||||
typename NonDeduced<CT>::type... Args) const {
|
typename NonDeduced<CT>::type... Args) const {
|
||||||
|
|
||||||
|
if (detectors.size() == 0)
|
||||||
|
throw sls::RuntimeError("No detectors added");
|
||||||
if (positions.empty() ||
|
if (positions.empty() ||
|
||||||
(positions.size() == 1 && positions[0] == -1)) {
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
positions.resize(detectors.size());
|
positions.resize(detectors.size());
|
||||||
@@ -141,6 +145,8 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
std::vector<int> positions,
|
std::vector<int> positions,
|
||||||
typename NonDeduced<CT>::type... Args) {
|
typename NonDeduced<CT>::type... Args) {
|
||||||
|
|
||||||
|
if (detectors.size() == 0)
|
||||||
|
throw sls::RuntimeError("No detectors added");
|
||||||
if (positions.empty() ||
|
if (positions.empty() ||
|
||||||
(positions.size() == 1 && positions[0] == -1)) {
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
positions.resize(detectors.size());
|
positions.resize(detectors.size());
|
||||||
@@ -164,6 +170,8 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
std::vector<int> positions,
|
std::vector<int> positions,
|
||||||
typename NonDeduced<CT>::type... Args) const {
|
typename NonDeduced<CT>::type... Args) const {
|
||||||
|
|
||||||
|
if (detectors.size() == 0)
|
||||||
|
throw sls::RuntimeError("No detectors added");
|
||||||
if (positions.empty() ||
|
if (positions.empty() ||
|
||||||
(positions.size() == 1 && positions[0] == -1)) {
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
positions.resize(detectors.size());
|
positions.resize(detectors.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user