Action #494
Feature #490: Avoid casts for derived classes
Rework GObservation interface
Status: | Closed | Start date: | 09/20/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 00-07-00 | |||
Duration: |
Description
Here a list of additional methods that are implement in the derived classes of GObservation
:
GCOMObservation:
void load(const std::string& drename, const std::string& drbname, const std::string& drgname, const std::string& drxname);
void response(const std::string& iaqname, const std::string& caldb = "");
void obs_id(const double& id);
void ontime(const double& ontime);
void livetime(const double& livetime);
void deadc(const double& deadc);
double obs_id(void) const;
Note: the load function can definitely not be implemented on the base class method, but usually when loading explicitly an observation one knows with which observation one deals. The load function could also be put protected, so that loading can only be done through a constructor.
GCTAObservation:
void load_unbinned(const std::string& filename);
void load_binned(const std::string& filename);
void save(const std::string& filename, bool clobber) const;
void response(const std::string& irfname, std::string caldb = "");
void pointing(const GCTAPointing& pointing);
void obs_id(const int& id);
void ra_obj(const double& ra);
void dec_obj(const double& dec);
void ontime(const double& ontime);
void livetime(const double& livetime);
void deadc(const double& deadc);
int obs_id(void) const;
double ra_obj(void) const;
double dec_obj(void) const;
std::string eventfile(void) const;
void eventfile(const std::string& filename);
Note: All methods concerning standard attributes should be added as member functions to the GObservation
base class.
GLATObservation:
void load_unbinned(const std::string& ft1name, const std::string& ft2name, const std::string& ltcube_name);
void load_binned(const std::string& cntmap_name, const std::string& expmap_name, const std::string& ltcube_name);
void response(const std::string& irfname, std::string caldb = "");
GLATLtCube* ltcube(void) const;
GMWLObservation:
void load(const std::string& filename);
void load(const std::string& filename, const int& extno);
void load(const std::string& filename, const std::string& extname);
std::string filename(void) const;
std::string extno(void) const;
std::string extname(void) const;
void filename(const std::string& filename);
void extno(const std::string& extno);
void extname(const std::string& extname);
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
- Assigned To set to Knödlseder Jürgen
#4 Updated by Knödlseder Jürgen almost 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Remaining (hours) set to 0.0
All casts in the instrument specific classes have been removed. No rework has been done on the GObservation
interface. Not clear whether we really need a rework, as long as we don’t have the need for a cast.