Commit 665a83d57b2cd91e2a3134ebcbbbe0281de1bb0a
1 parent
777b0c8d
make save() and write() const
Showing
6 changed files
with
16 additions
and
16 deletions
include/GEbounds.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GEbounds.hpp - Energy boundary class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2010 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2009-2011 by Jurgen Knodlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software; you can redistribute it and/or modify * |
| ... | ... | @@ -57,9 +57,9 @@ public: |
| 57 | 57 | void load(const std::string& filename, |
| 58 | 58 | const std::string& extname = "EBOUNDS"); |
| 59 | 59 | void save(const std::string& filename, bool clobber, |
| 60 | - const std::string& extname = "EBOUNDS"); | |
| 60 | + const std::string& extname = "EBOUNDS") const; | |
| 61 | 61 | void read(GFitsTable* hdu); |
| 62 | - void write(GFits* file, const std::string& extname = "EBOUNDS"); | |
| 62 | + void write(GFits* file, const std::string& extname = "EBOUNDS") const; | |
| 63 | 63 | int index(const GEnergy& eng) const; |
| 64 | 64 | int size(void) const { return m_num; } |
| 65 | 65 | GEnergy emin(void) const { return m_emin; } | ... | ... |
include/GGti.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GGti.hpp - Good time interval class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2010 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2008-2011 by Jurgen Knodlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software; you can redistribute it and/or modify * |
| ... | ... | @@ -59,9 +59,9 @@ public: |
| 59 | 59 | void load(const std::string& filename, |
| 60 | 60 | const std::string& extname = "GTI"); |
| 61 | 61 | void save(const std::string& filename, bool clobber, |
| 62 | - const std::string& extname = "GTI"); | |
| 62 | + const std::string& extname = "GTI") const; | |
| 63 | 63 | void read(GFitsTable* hdu); |
| 64 | - void write(GFits* file, const std::string& extname = "GTI"); | |
| 64 | + void write(GFits* file, const std::string& extname = "GTI") const; | |
| 65 | 65 | int size(void) const { return m_num; } |
| 66 | 66 | GTime tstart(void) const { return m_tstart; } |
| 67 | 67 | GTime tstop(void) const { return m_tstop; } | ... | ... |
pyext/GEbounds.i
| ... | ... | @@ -46,9 +46,9 @@ public: |
| 46 | 46 | void load(const std::string& filename, |
| 47 | 47 | const std::string& extname = "EBOUNDS"); |
| 48 | 48 | void save(const std::string& filename, bool clobber, |
| 49 | - const std::string& extname = "EBOUNDS"); | |
| 49 | + const std::string& extname = "EBOUNDS") const; | |
| 50 | 50 | void read(GFitsTable* hdu); |
| 51 | - void write(GFits* file, const std::string& extname = "EBOUNDS"); | |
| 51 | + void write(GFits* file, const std::string& extname = "EBOUNDS") const; | |
| 52 | 52 | int index(const GEnergy& eng) const; |
| 53 | 53 | int size(void) const { return m_num; } |
| 54 | 54 | GEnergy emin(void) const { return m_emin; } | ... | ... |
pyext/GGti.i
| ... | ... | @@ -45,9 +45,9 @@ public: |
| 45 | 45 | void load(const std::string& filename, |
| 46 | 46 | const std::string& extname = "GTI"); |
| 47 | 47 | void save(const std::string& filename, bool clobber, |
| 48 | - const std::string& extname = "GTI"); | |
| 48 | + const std::string& extname = "GTI") const; | |
| 49 | 49 | void read(GFitsTable* hdu); |
| 50 | - void write(GFits* file, const std::string& extname = "GTI"); | |
| 50 | + void write(GFits* file, const std::string& extname = "GTI") const; | |
| 51 | 51 | int size(void) const { return m_num; } |
| 52 | 52 | GTime tstart(void) const { return m_tstart; } |
| 53 | 53 | GTime tstop(void) const { return m_tstop; } | ... | ... |
src/obs/GEbounds.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GEbounds.cpp - Energy boundary class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2010 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2009-2011 by Jurgen Knodlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software; you can redistribute it and/or modify * |
| ... | ... | @@ -303,7 +303,7 @@ void GEbounds::load(const std::string& filename, const std::string& extname) |
| 303 | 303 | * @param[in] extname Energy boundary extension name (default is "EBOUNDS") |
| 304 | 304 | ***************************************************************************/ |
| 305 | 305 | void GEbounds::save(const std::string& filename, bool clobber, |
| 306 | - const std::string& extname) | |
| 306 | + const std::string& extname) const | |
| 307 | 307 | { |
| 308 | 308 | // Allocate FITS file |
| 309 | 309 | GFits file; |
| ... | ... | @@ -378,7 +378,7 @@ void GEbounds::read(GFitsTable* hdu) |
| 378 | 378 | * |
| 379 | 379 | * @todo Write header keywords. |
| 380 | 380 | ***************************************************************************/ |
| 381 | -void GEbounds::write(GFits* file, const std::string& extname) | |
| 381 | +void GEbounds::write(GFits* file, const std::string& extname) const | |
| 382 | 382 | { |
| 383 | 383 | // Create energy boundary columns |
| 384 | 384 | GFitsTableDoubleCol cemin = GFitsTableDoubleCol("E_MIN", m_num); | ... | ... |
src/obs/GGti.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GGti.cpp - Good time interval class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2010 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2008-2011 by Jurgen Knodlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software; you can redistribute it and/or modify * |
| ... | ... | @@ -284,7 +284,7 @@ void GGti::load(const std::string& filename, const std::string& extname) |
| 284 | 284 | * @todo Method assumes that times are in MET. |
| 285 | 285 | ***************************************************************************/ |
| 286 | 286 | void GGti::save(const std::string& filename, bool clobber, |
| 287 | - const std::string& extname) | |
| 287 | + const std::string& extname) const | |
| 288 | 288 | { |
| 289 | 289 | // Allocate FITS file |
| 290 | 290 | GFits file; |
| ... | ... | @@ -354,7 +354,7 @@ void GGti::read(GFitsTable* hdu) |
| 354 | 354 | * |
| 355 | 355 | * @todo Implement clobber method for overwriting of existing GTIs. |
| 356 | 356 | ***************************************************************************/ |
| 357 | -void GGti::write(GFits* file, const std::string& extname) | |
| 357 | +void GGti::write(GFits* file, const std::string& extname) const | |
| 358 | 358 | { |
| 359 | 359 | // Create GTI columns |
| 360 | 360 | GFitsTableDoubleCol cstart = GFitsTableDoubleCol("START", m_num); | ... | ... |