Commit d9c127cdef6b715c746b796f018b153e880d1d39

Authored by Jürgen Knödlseder
1 parent 45f21ca5

Add read_ahead method to Python support module to allow a cscript setting the fl…

…ag in the execute() method.
pyext/ctool.i
@@ -136,3 +136,14 @@ public: @@ -136,3 +136,14 @@ public:
136 virtual void save(void); 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,12 +91,14 @@ protected:
91 GSkyDir get_mean_pointing(const GObservations& obs); 91 GSkyDir get_mean_pointing(const GObservations& obs);
92 size_t get_current_rss(void); 92 size_t get_current_rss(void);
93 93
  94 + // Protected members
  95 + bool m_read_ahead; //!< Read ahead parameters
  96 +
94 protected: 97 protected:
95 // Protected methods 98 // Protected methods
96 void provide_help(void) const; 99 void provide_help(void) const;
97 100
98 // Protected members 101 // Protected members
99 - bool m_read_ahead; //!< Read ahead parameters  
100 bool m_use_xml; //!< Use XML file instead of FITS file for observations 102 bool m_use_xml; //!< Use XML file instead of FITS file for observations
101 GTimeReference m_cta_ref; //!< CTA time reference 103 GTimeReference m_cta_ref; //!< CTA time reference
102 }; 104 };