Commit 18e3d77f420e2c612e4dac9c026c4c8afd899f58

Authored by Jürgen Knödlseder
1 parent 5758fbb0

Throw exception if counts cube is specified on input to ctobssim.

Showing 1 changed file with 7 additions and 0 deletions
src/ctobssim/ctobssim.cpp
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
33 #include "GTools.hpp" 33 #include "GTools.hpp"
34 34
35 /* __ Method name definitions ____________________________________________ */ 35 /* __ Method name definitions ____________________________________________ */
  36 +#define G_GET_PARAMETERS "ctobssim::get_parameters()"
36 #define G_SIMULATE_SOURCE "ctobssim::simulate_source(GCTAObservation*, "\ 37 #define G_SIMULATE_SOURCE "ctobssim::simulate_source(GCTAObservation*, "\
37 "GModels&, GRan&, GLog*)" 38 "GModels&, GRan&, GLog*)"
38 39
@@ -577,7 +578,13 @@ void ctobssim::get_parameters(void) @@ -577,7 +578,13 @@ void ctobssim::get_parameters(void)
577 // If there are no observations in container then load them via user 578 // If there are no observations in container then load them via user
578 // parameters 579 // parameters
579 if (m_obs.size() == 0) { 580 if (m_obs.size() == 0) {
  581 +
  582 + // Throw exception if counts cube is given
  583 + require_inobs_nocube(G_GET_PARAMETERS);
  584 +
  585 + // Get observation container
580 m_obs = get_observations(); 586 m_obs = get_observations();
  587 +
581 } 588 }
582 589
583 // ... otherwise make sure that observation boundaries are set 590 // ... otherwise make sure that observation boundaries are set