Commit e70ffa3259fbfc2d92882055dc6d34748f69d4a1
1 parent
9e2c5e6c
Adapt to new GammaLib interface.
The GModels access operator now returns a pointer instead of a reference. The code has been adapted accordingly.
Showing
1 changed file
with
3 additions
and
3 deletions
src/ctobssim/ctobssim.cpp
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | /** | 21 | /** |
| 22 | * @file ctobssim.cpp | 22 | * @file ctobssim.cpp |
| 23 | * @brief CTA observation simulator tool implementation | 23 | * @brief CTA observation simulator tool implementation |
| 24 | - * @author J. Knoedlseder | 24 | + * @author Juergen Knoedlseder |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | /* __ Includes ___________________________________________________________ */ | 27 | /* __ Includes ___________________________________________________________ */ |
| @@ -675,7 +675,7 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models, | @@ -675,7 +675,7 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models, | ||
| 675 | for (int i = 0; i < models.size(); ++i) { | 675 | for (int i = 0; i < models.size(); ++i) { |
| 676 | 676 | ||
| 677 | // Get sky model (NULL if not a sky model) | 677 | // Get sky model (NULL if not a sky model) |
| 678 | - const GModelSky* model = dynamic_cast<const GModelSky*>(&models[i]); | 678 | + const GModelSky* model = dynamic_cast<const GModelSky*>(models[i]); |
| 679 | 679 | ||
| 680 | // If we have a sky model then simulate photons | 680 | // If we have a sky model then simulate photons |
| 681 | if (model != NULL) { | 681 | if (model != NULL) { |
| @@ -846,7 +846,7 @@ void ctobssim::simulate_background(GCTAObservation* obs, const GModels& models, | @@ -846,7 +846,7 @@ void ctobssim::simulate_background(GCTAObservation* obs, const GModels& models, | ||
| 846 | 846 | ||
| 847 | // Get model (NULL if not a radial acceptance model) | 847 | // Get model (NULL if not a radial acceptance model) |
| 848 | const GCTAModelRadialAcceptance* model = | 848 | const GCTAModelRadialAcceptance* model = |
| 849 | - dynamic_cast<const GCTAModelRadialAcceptance*>(&models[i]); | 849 | + dynamic_cast<const GCTAModelRadialAcceptance*>(models[i]); |
| 850 | 850 | ||
| 851 | // If we have a radial acceptance model then simulate events | 851 | // If we have a radial acceptance model then simulate events |
| 852 | if (model != NULL) { | 852 | if (model != NULL) { |