Action #499
Feature #490: Avoid casts for derived classes
Rework GModel interface
Status: | Closed | Start date: | 09/20/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | Estimated time: | 0.00 hour | |
Target version: | 00-07-00 | |||
Duration: |
Description
Here a list of methods in derived classes of GModel
:
GModelData
:
None
GCTAModelRadialAcceptance
:
virtual GCTAEventList* mc(const GObservation& obs, GRan& ran) const;
GCTAModelRadial* radial(void) const;
GModelSpectral* spectral(void) const;
GModelTemporal* temporal(void) const;
Note: radial()
should be renamed to spatial()
for conformance with GModelSky
.
GModelSky
:
GModelSpatial* spatial(void) const;
GModelSpectral* spectral(void) const;
GModelTemporal* temporal(void) const;
double value(const GSkyDir& srcDir, const GEnergy& srcEng, const GTime& srcTime);
GVector gradients(const GSkyDir& srcDir, const GEnergy& srcEng, const GTime& srcTime);
GPhotons mc(const double& area, const GSkyDir& dir, const double& radius, const GEnergy& emin, const GEnergy& emax, const GTime& tmin, const GTime& tmax, GRan& ran) const;
Note: the spatial()
, spectral()
and temporal() methods could be exposed to the @GModel
base class. The mc()
, value()
and gradients()
methods are more specific as their arguments would be different for sky and data models.
GModelDiffuseSource
:
None
GModelExtendedSource
:
GModelRadial* radial(void) const;
GSkyDir dir(void) const;
- the
dir()
method should be removed as it is implement in the radial model. Installed of callingdir()
one should callspatial().dir()
. - the
radial()
method should also be removed as it is a simple cast to thespatial()
method.
GModelPointSource
:
GSkyDir dir(void) const;
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen about 12 years ago
- Description updated (diff)
#2 Updated by Knödlseder Jürgen about 12 years ago
- Start date set to 09/20/2012
due to changes in a related task
#3 Updated by Knödlseder Jürgen about 12 years ago
- Status changed from New to Feedback
- Assigned To set to Knödlseder Jürgen
- % Done changed from 0 to 100
- Remaining (hours) set to 0.0
The interface has not been reworked. Instead, output typemaps have been implemented that perform typecasting at the access level.
#4 Updated by Knödlseder Jürgen almost 12 years ago
- Status changed from Feedback to Closed
- Estimated time set to 0.00