Commit d9c127cdef6b715c746b796f018b153e880d1d39
1 parent
45f21ca5
Add read_ahead method to Python support module to allow a cscript setting the fl…
…ag in the execute() method.
Showing
2 changed files
with
14 additions
and
1 deletions
pyext/ctool.i
| ... | ... | @@ -136,3 +136,14 @@ public: |
| 136 | 136 | virtual void save(void); |
| 137 | 137 | }; |
| 138 | 138 | |
| 139 | + | |
| 140 | +/***********************************************************************//** | |
| 141 | + * @brief ctool base class Python extension | |
| 142 | + ***************************************************************************/ | |
| 143 | +%extend ctool { | |
| 144 | + void read_ahead(const bool& flag) { | |
| 145 | + self->m_read_ahead = flag; | |
| 146 | + return; | |
| 147 | + } | |
| 148 | +} | |
| 149 | + | ... | ... |
src/support/ctool.hpp
| ... | ... | @@ -91,12 +91,14 @@ protected: |
| 91 | 91 | GSkyDir get_mean_pointing(const GObservations& obs); |
| 92 | 92 | size_t get_current_rss(void); |
| 93 | 93 | |
| 94 | + // Protected members | |
| 95 | + bool m_read_ahead; //!< Read ahead parameters | |
| 96 | + | |
| 94 | 97 | protected: |
| 95 | 98 | // Protected methods |
| 96 | 99 | void provide_help(void) const; |
| 97 | 100 | |
| 98 | 101 | // Protected members |
| 99 | - bool m_read_ahead; //!< Read ahead parameters | |
| 100 | 102 | bool m_use_xml; //!< Use XML file instead of FITS file for observations |
| 101 | 103 | GTimeReference m_cta_ref; //!< CTA time reference |
| 102 | 104 | }; | ... | ... |