Commit 0b624dc3d6f331b3f6dfba1372d4ac0f5a6c122c
1 parent
c2675d4f
Expose protected ctool baseclass methods in Python.
Showing
2 changed files
with
28 additions
and
1 deletions
pyext/ctool.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * ctool - ctool base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2014 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2014-2015 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| 28 | +#define SWIG | |
| 28 | 29 | #include "ctool.hpp" |
| 29 | 30 | %} |
| 30 | 31 | |
| ... | ... | @@ -51,4 +52,26 @@ public: |
| 51 | 52 | |
| 52 | 53 | // Public methods |
| 53 | 54 | virtual void execute(void); |
| 55 | + | |
| 56 | + // Protected methods | |
| 57 | + void init_members(void); | |
| 58 | + void copy_members(const ctool& app); | |
| 59 | + void free_members(void); | |
| 60 | + const bool& read_ahead(void) const; | |
| 61 | + GObservations get_observations(const bool& get_response = true); | |
| 62 | + | |
| 63 | + // Protected methods that create objects from user parameters | |
| 64 | + GEbounds create_ebounds(void); | |
| 65 | + GSkymap create_map(const GObservations& obs); | |
| 66 | + GCTAEventCube create_cube(const GObservations& obs); | |
| 67 | + GCTAObservation create_cta_obs(void); | |
| 68 | + | |
| 69 | + // Protected methods that check user parameters | |
| 70 | + void require_inobs(const std::string& method); | |
| 71 | + | |
| 72 | + // Protected support methods | |
| 73 | + void set_response(GObservations& obs); | |
| 74 | + void set_obs_response(GCTAObservation* obs); | |
| 75 | + GSkyDir get_mean_pointing(const GObservations& obs); | |
| 76 | + size_t get_current_rss(void); | |
| 54 | 77 | }; | ... | ... |
src/support/ctool.hpp