Commit a8afe7e15a49d3aaa5b998d9ceff5ca4db2dc56e
1 parent
bac7285b
Do final adjustments after introduction of GBase class.
I went over all .hpp to make sure that the GBase.hpp file is properly included, and no supoerfluous other includes remain. I also checked that no ostream and GLog friends are no longer available. I went over all .i files to make sure that classes are derived from GBase.
Showing
45 changed files
with
124 additions
and
162 deletions
include/GCaldb.hpp
| ... | ... | @@ -28,11 +28,10 @@ |
| 28 | 28 | #define GCALDB_HPP |
| 29 | 29 | |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | -#include <iostream> | |
| 32 | 31 | #include <string> |
| 33 | 32 | #include "GBase.hpp" |
| 34 | 33 | #include "GFits.hpp" |
| 35 | -#include "GFitsBinTable.hpp" | |
| 34 | +#include "GFitsTable.hpp" | |
| 36 | 35 | |
| 37 | 36 | |
| 38 | 37 | /***********************************************************************//** | ... | ... |
include/GCsv.hpp
| ... | ... | @@ -30,9 +30,7 @@ |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | 31 | #include <vector> |
| 32 | 32 | #include <string> |
| 33 | -#include <iostream> | |
| 34 | 33 | #include "GBase.hpp" |
| 35 | -#include "GLog.hpp" | |
| 36 | 34 | |
| 37 | 35 | |
| 38 | 36 | /***********************************************************************//** | ... | ... |
include/GDerivative.hpp
include/GEbounds.hpp
include/GFitsTableCol.hpp
include/GModelPar.hpp
include/GModels.hpp
include/GNodeArray.hpp
include/GOptimizer.hpp
| ... | ... | @@ -29,9 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | 31 | #include <string> |
| 32 | -#include <iostream> | |
| 33 | 32 | #include "GBase.hpp" |
| 34 | -#include "GLog.hpp" | |
| 35 | 33 | #include "GOptimizerPars.hpp" |
| 36 | 34 | #include "GOptimizerFunction.hpp" |
| 37 | 35 | #include "GModels.hpp" |
| ... | ... | @@ -46,10 +44,6 @@ |
| 46 | 44 | ***************************************************************************/ |
| 47 | 45 | class GOptimizer : public GBase { |
| 48 | 46 | |
| 49 | - // I/O friends | |
| 50 | - friend std::ostream& operator<<(std::ostream& os, const GOptimizer& opt); | |
| 51 | - friend GLog& operator<<(GLog& log, const GOptimizer& opt); | |
| 52 | - | |
| 53 | 47 | public: |
| 54 | 48 | // Constructors and destructors |
| 55 | 49 | GOptimizer(void); | ... | ... |
include/GPointing.hpp
| ... | ... | @@ -31,7 +31,6 @@ |
| 31 | 31 | #include <string> |
| 32 | 32 | #include "GBase.hpp" |
| 33 | 33 | #include "GSkyDir.hpp" |
| 34 | -#include "GTime.hpp" | |
| 35 | 34 | |
| 36 | 35 | |
| 37 | 36 | /***********************************************************************//** |
| ... | ... | @@ -39,8 +38,7 @@ |
| 39 | 38 | * |
| 40 | 39 | * @brief Interface for the pointing classes |
| 41 | 40 | * |
| 42 | - * The pointing class holds information about the time dependent telescope | |
| 43 | - * pointing. | |
| 41 | + * The pointing class holds information about the telescope pointing. | |
| 44 | 42 | ***************************************************************************/ |
| 45 | 43 | class GPointing : public GBase { |
| 46 | 44 | ... | ... |
include/GRan.hpp
| ... | ... | @@ -29,11 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | 31 | #include <string> |
| 32 | -#include <iostream> | |
| 33 | 32 | #include "GBase.hpp" |
| 34 | -#include "GSkyDir.hpp" | |
| 35 | -#include "GEnergy.hpp" | |
| 36 | -#include "GTime.hpp" | |
| 37 | 33 | |
| 38 | 34 | |
| 39 | 35 | /***********************************************************************//** | ... | ... |
include/GTestCase.hpp
include/GTestSuite.hpp
pyext/GCaldb.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCaldb.i - Calibration database class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2011-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GCaldb.i |
| 23 | 23 | * @brief Calibration database class interface definition |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Interface for the Calibration database class |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GCaldb { | |
| 38 | +class GCaldb : public GBase { | |
| 39 | 39 | public: |
| 40 | 40 | // Constructors and destructors |
| 41 | 41 | GCaldb(void); | ... | ... |
pyext/GEbounds.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GEbounds.i - Energy boundary class python I/F * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GEbounds.i |
| 23 | 23 | * @brief GEbounds class python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | * |
| 38 | 38 | * This class holds a list of energy intervals. |
| 39 | 39 | ***************************************************************************/ |
| 40 | -class GEbounds { | |
| 40 | +class GEbounds : public GBase { | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GEbounds(void); |
| ... | ... | @@ -46,26 +46,27 @@ public: |
| 46 | 46 | virtual ~GEbounds(void); |
| 47 | 47 | |
| 48 | 48 | // Methods |
| 49 | - void clear(void); | |
| 50 | - void append(const GEnergy& emin, const GEnergy& emax); | |
| 51 | - void insert(const GEnergy& emin, const GEnergy& emax); | |
| 52 | - void setlin(const GEnergy& emin, const GEnergy& emax, const int& num); | |
| 53 | - void setlog(const GEnergy& emin, const GEnergy& emax, const int& num); | |
| 54 | - void load(const std::string& filename, | |
| 55 | - const std::string& extname); | |
| 56 | - void save(const std::string& filename, bool clobber, | |
| 57 | - const std::string& extname) const; | |
| 58 | - void read(GFitsTable* hdu); | |
| 59 | - void write(GFits* file, const std::string& extname) const; | |
| 60 | - int index(const GEnergy& eng) const; | |
| 61 | - int size(void) const { return m_num; } | |
| 62 | - GEnergy emin(void) const { return m_emin; } | |
| 63 | - GEnergy emax(void) const { return m_emax; } | |
| 64 | - GEnergy emin(int inx) const; | |
| 65 | - GEnergy emax(int inx) const; | |
| 66 | - GEnergy emean(int inx) const; | |
| 67 | - GEnergy elogmean(int inx) const; | |
| 68 | - bool isin(const GEnergy& eng) const; | |
| 49 | + void clear(void); | |
| 50 | + GEbounds* clone(void) const; | |
| 51 | + void append(const GEnergy& emin, const GEnergy& emax); | |
| 52 | + void insert(const GEnergy& emin, const GEnergy& emax); | |
| 53 | + void setlin(const GEnergy& emin, const GEnergy& emax, const int& num); | |
| 54 | + void setlog(const GEnergy& emin, const GEnergy& emax, const int& num); | |
| 55 | + void load(const std::string& filename, | |
| 56 | + const std::string& extname); | |
| 57 | + void save(const std::string& filename, bool clobber, | |
| 58 | + const std::string& extname) const; | |
| 59 | + void read(GFitsTable* hdu); | |
| 60 | + void write(GFits* file, const std::string& extname) const; | |
| 61 | + int index(const GEnergy& eng) const; | |
| 62 | + int size(void) const; | |
| 63 | + GEnergy emin(void) const; | |
| 64 | + GEnergy emax(void) const; | |
| 65 | + GEnergy emin(int inx) const; | |
| 66 | + GEnergy emax(int inx) const; | |
| 67 | + GEnergy emean(int inx) const; | |
| 68 | + GEnergy elogmean(int inx) const; | |
| 69 | + bool isin(const GEnergy& eng) const; | |
| 69 | 70 | }; |
| 70 | 71 | |
| 71 | 72 | ... | ... |
pyext/GEnergy.i
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | * units. This makes instrument specific implementations more robust and |
| 41 | 41 | * reduces the risk of unit errors. |
| 42 | 42 | ***************************************************************************/ |
| 43 | -class GEnergy { | |
| 43 | +class GEnergy : public GBase { | |
| 44 | 44 | public: |
| 45 | 45 | // Constructors and destructors |
| 46 | 46 | GEnergy(void); | ... | ... |
pyext/GEvent.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GEvent.i - Abstract event class python I/F * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GEvent.i |
| 23 | 23 | * @brief GEvent class python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -63,7 +63,7 @@ |
| 63 | 63 | * The GEvent class does not hold any data members. Data members are stored |
| 64 | 64 | * in the derived classes. |
| 65 | 65 | ***************************************************************************/ |
| 66 | -class GEvent { | |
| 66 | +class GEvent : public GBase { | |
| 67 | 67 | |
| 68 | 68 | public: |
| 69 | 69 | // Constructors and destructors | ... | ... |
pyext/GEvents.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GEvents.i - Abstract event container class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GEvents.i |
| 23 | 23 | * @brief Abstract event container class Python interface definition |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Abstract event container class Python interface |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GEvents { | |
| 38 | +class GEvents : public GBase { | |
| 39 | 39 | public: |
| 40 | 40 | // Constructors and destructors |
| 41 | 41 | GEvents(void); | ... | ... |
pyext/GFits.i
| ... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 | * via members of GFits. A FITS file is composed of Header Data Units (HDU) |
| 57 | 57 | * which are implemented by the GFitsHDU class. |
| 58 | 58 | ***************************************************************************/ |
| 59 | -class GFits { | |
| 59 | +class GFits : public GBase { | |
| 60 | 60 | |
| 61 | 61 | public: |
| 62 | 62 | // Constructors and destructors | ... | ... |
pyext/GFitsHeader.i
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | * saved into another file (using the 'save' method). Cards are added or |
| 44 | 44 | * changed using the 'update' method. |
| 45 | 45 | ***************************************************************************/ |
| 46 | -class GFitsHeader { | |
| 46 | +class GFitsHeader : public GBase { | |
| 47 | 47 | public: |
| 48 | 48 | // Constructors and destructors |
| 49 | 49 | GFitsHeader(void); | ... | ... |
pyext/GFitsHeaderCard.i
| ... | ... | @@ -40,7 +40,8 @@ |
| 40 | 40 | * keyname (string), a value (string, floating pointer, integer or logical) |
| 41 | 41 | * and a comment (string). COMMENT or HISTORY cards do not have any value. |
| 42 | 42 | ***************************************************************************/ |
| 43 | -class GFitsHeaderCard { | |
| 43 | +class GFitsHeaderCard : public GBase { | |
| 44 | + | |
| 44 | 45 | public: |
| 45 | 46 | // Constructors & Destructors |
| 46 | 47 | GFitsHeaderCard(void); | ... | ... |
pyext/GFitsTableCol.i
| ... | ... | @@ -49,7 +49,8 @@ |
| 49 | 49 | * |
| 50 | 50 | * @brief FITS table column abstract Python base class definition |
| 51 | 51 | ***************************************************************************/ |
| 52 | -class GFitsTableCol { | |
| 52 | +class GFitsTableCol : public GBase { | |
| 53 | + | |
| 53 | 54 | public: |
| 54 | 55 | // Constructors and destructors |
| 55 | 56 | GFitsTableCol(void); | ... | ... |
pyext/GGti.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GGti.i - Good time interval class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GGti.i |
| 23 | 23 | * @brief Good time interval class Python interface definition |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | * This class holds a list of Good Time Intervals, i.e. time intervals that |
| 39 | 39 | * are valid for science analysis. Times are stored using the GTime class. |
| 40 | 40 | ***************************************************************************/ |
| 41 | -class GGti { | |
| 41 | +class GGti : public GBase { | |
| 42 | 42 | public: |
| 43 | 43 | // Constructors and destructors |
| 44 | 44 | GGti(void); |
| ... | ... | @@ -47,6 +47,7 @@ public: |
| 47 | 47 | |
| 48 | 48 | // Methods |
| 49 | 49 | void clear(void); |
| 50 | + GGti* clone(void) const; | |
| 50 | 51 | int size(void) const; |
| 51 | 52 | void add(const GTime& tstart, const GTime& tstop); |
| 52 | 53 | void append(const GTime& tstart, const GTime& tstop); |
| ... | ... | @@ -64,7 +65,7 @@ public: |
| 64 | 65 | GTime tstop(int inx) const; |
| 65 | 66 | double telapse(void) const; |
| 66 | 67 | double ontime(void) const; |
| 67 | - double mjdref(void) const { return m_mjdref; } | |
| 68 | + double mjdref(void) const; | |
| 68 | 69 | bool isin(const GTime& time) const; |
| 69 | 70 | }; |
| 70 | 71 | ... | ... |
pyext/GInstDir.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GInstDir.i - Instrument direction class python I/F * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GInstDir.i |
| 23 | 23 | * @brief GInstDir class python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -42,7 +42,8 @@ |
| 42 | 42 | * reconstructions for imaging devices or detector numbers etc. for |
| 43 | 43 | * non-imaging devices. |
| 44 | 44 | ***************************************************************************/ |
| 45 | -class GInstDir { | |
| 45 | +class GInstDir : public GBase { | |
| 46 | + | |
| 46 | 47 | public: |
| 47 | 48 | // Constructors and destructors |
| 48 | 49 | GInstDir(void); | ... | ... |
pyext/GIntegral.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GIntegral.hpp - Integration class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GIntegral.hpp |
| 23 | 23 | * @brief Integration class Python interface definition |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | * This class allows to perform integration using various methods. The |
| 39 | 39 | * integrand is implemented by a derived class of GIntegrand. |
| 40 | 40 | ***************************************************************************/ |
| 41 | -class GIntegral { | |
| 41 | +class GIntegral : public GBase { | |
| 42 | 42 | public: |
| 43 | 43 | |
| 44 | 44 | // Constructors and destructors | ... | ... |
pyext/GModel.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GModel.i - Abstract virtual model base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2009-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GModel.i |
| 23 | 23 | * @brief Abstract model base class python interface |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Abstract model base class python interface |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GModel { | |
| 38 | +class GModel : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GModel(void); | ... | ... |
pyext/GModelPar.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GModelPar.i - Model parameter class Python interface * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2009-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GModelPar.i |
| 23 | 23 | * @brief Model parameter class Python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Model parameter class |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GModelPar { | |
| 38 | +class GModelPar : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GModelPar(void); | ... | ... |
pyext/GNodeArray.i
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GNodeArray.i |
| 23 | 23 | * @brief Node array class Python interface definition |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Python interface for the node array class |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GNodeArray { | |
| 38 | +class GNodeArray : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GNodeArray(void); | ... | ... |
pyext/GObservation.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GObservation.i - Abstract observation abstract base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GObservation.i |
| 23 | 23 | * @brief Abstract observation base class Python interface definition |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Abstract Python interface for the observation classes |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GObservation { | |
| 38 | +class GObservation : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GObservation(void); | ... | ... |
pyext/GOptimizer.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GOptimizer.i - Optimizer class Python interface * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2009-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GOptimizer.i |
| 23 | 23 | * @brief Optimizer abstract base class Python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -37,7 +37,8 @@ |
| 37 | 37 | * |
| 38 | 38 | * This class defines the abstract interface for the optimizer class. |
| 39 | 39 | ***************************************************************************/ |
| 40 | -class GOptimizer { | |
| 40 | +class GOptimizer : public GBase { | |
| 41 | + | |
| 41 | 42 | public: |
| 42 | 43 | // Constructors and destructors |
| 43 | 44 | GOptimizer(void); | ... | ... |
pyext/GPars.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GPars.i - Application parameters Python interface * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GPars.i |
| 23 | 23 | * @brief Application parameter container class Python interface definition |
| 24 | - * @author Jurgen Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | * |
| 37 | 37 | * @brief Application parameter container class |
| 38 | 38 | ***************************************************************************/ |
| 39 | -class GPars { | |
| 39 | +class GPars : public GBase { | |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| ... | ... | @@ -47,15 +47,15 @@ public: |
| 47 | 47 | virtual ~GPars(void); |
| 48 | 48 | |
| 49 | 49 | // Methods |
| 50 | - void clear(void); | |
| 51 | - GPars* clone(void) const; | |
| 52 | - int size(void) const; | |
| 53 | - void append(const GPar& par); | |
| 54 | - void append_standard(void); | |
| 55 | - void load(const std::string& filename); | |
| 56 | - void load(const std::string& filename, const std::vector<std::string>& args); | |
| 57 | - void save(const std::string& filename); | |
| 58 | - bool haspar(const std::string& name) const; | |
| 50 | + void clear(void); | |
| 51 | + GPars* clone(void) const; | |
| 52 | + int size(void) const; | |
| 53 | + void append(const GPar& par); | |
| 54 | + void append_standard(void); | |
| 55 | + void load(const std::string& filename); | |
| 56 | + void load(const std::string& filename, const std::vector<std::string>& args); | |
| 57 | + void save(const std::string& filename); | |
| 58 | + bool haspar(const std::string& name) const; | |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | 61 | ... | ... |
pyext/GPointing.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GPointing.i - Abstract pointing class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GPointing.i |
| 23 | 23 | * @brief Abstract pointing class Python interface definition. |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Abstract Pointing class |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GPointing { | |
| 38 | +class GPointing : public GBase { | |
| 39 | 39 | |
| 40 | 40 | public: |
| 41 | 41 | // Constructors and destructors | ... | ... |
pyext/GResponse.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GResponse.i - Abstract response base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GResponse.i |
| 23 | 23 | * @brief Abstract response base class Python interface definition |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Abstract response base class |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GResponse { | |
| 38 | +class GResponse : public GBase { | |
| 39 | 39 | |
| 40 | 40 | public: |
| 41 | 41 | // Constructors and destructors | ... | ... |
pyext/GRoi.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GRoi.i - Region of interest abstract base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GRoi.i |
| 23 | 23 | * @brief GRoi class python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -40,7 +40,8 @@ |
| 40 | 40 | * for an analysis. In particular, the definition of a region of interest |
| 41 | 41 | * is required for an unbinned analysis. |
| 42 | 42 | ***************************************************************************/ |
| 43 | -class GRoi { | |
| 43 | +class GRoi : public GBase { | |
| 44 | + | |
| 44 | 45 | public: |
| 45 | 46 | // Constructors and destructors |
| 46 | 47 | GRoi(void); | ... | ... |
pyext/GSkyDir.i
pyext/GSkyPixel.i
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief GSkyPixel class interface defintion |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GSkyPixel { | |
| 38 | +class GSkyPixel : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GSkyPixel(void); | ... | ... |
pyext/GSkymap.i
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GSkymap.i |
| 23 | 23 | * @brief Sky map class SWIG file. |
| 24 | - * @author J. Knoedlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -105,7 +105,8 @@ static int skymap_tuple(PyObject *input, int *ptr) { |
| 105 | 105 | * |
| 106 | 106 | * @brief GSkymap class interface defintion |
| 107 | 107 | ***************************************************************************/ |
| 108 | -class GSkymap { | |
| 108 | +class GSkymap : public GBase { | |
| 109 | + | |
| 109 | 110 | public: |
| 110 | 111 | // Constructors and destructors |
| 111 | 112 | GSkymap(void); |
| ... | ... | @@ -121,12 +122,13 @@ public: |
| 121 | 122 | virtual ~GSkymap(void); |
| 122 | 123 | |
| 123 | 124 | // Methods |
| 125 | + void clear(void); | |
| 126 | + GSkymap* clone(void) const; | |
| 124 | 127 | GSkyDir pix2dir(const int& pix); |
| 125 | 128 | int dir2pix(const GSkyDir& dir) const; |
| 126 | 129 | double omega(const int& pix) const; |
| 127 | 130 | GSkyDir xy2dir(const GSkyPixel& pix); |
| 128 | 131 | GSkyPixel dir2xy(const GSkyDir& dir) const; |
| 129 | - void clear(void); | |
| 130 | 132 | void load(const std::string& filename); |
| 131 | 133 | void save(const std::string& filename, bool clobber = false) const; |
| 132 | 134 | void read(const GFitsHDU* hdu); | ... | ... |
pyext/GTestSuites.i
pyext/GTime.i
| ... | ... | @@ -40,7 +40,8 @@ |
| 40 | 40 | * The GTime class stores a time value in seconds and its MJD reference in |
| 41 | 41 | * days. The time can be retrieved in any MJD reference. |
| 42 | 42 | ***************************************************************************/ |
| 43 | -class GTime { | |
| 43 | +class GTime : public GBase { | |
| 44 | + | |
| 44 | 45 | public: |
| 45 | 46 | // Constructors and destructors |
| 46 | 47 | GTime(void); | ... | ... |
pyext/GWcs.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GWcs.i - World Coordinate System virtual base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GWcs.i |
| 23 | 23 | * @brief World Coordinate System virtual base class Python interface |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -35,7 +35,8 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief World Coordinate System virtual base class Python interface |
| 37 | 37 | ***************************************************************************/ |
| 38 | -class GWcs { | |
| 38 | +class GWcs : public GBase { | |
| 39 | + | |
| 39 | 40 | public: |
| 40 | 41 | // Constructors and destructors |
| 41 | 42 | GWcs(void); | ... | ... |
pyext/GXmlNode.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GXmlNode.i - Abstract XML node base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GXmlNode.i |
| 23 | 23 | * @brief Abstract XML node base class Python interface definition |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | * |
| 38 | 38 | * This class defines an abstract node of a XML document. |
| 39 | 39 | ***************************************************************************/ |
| 40 | -class GXmlNode { | |
| 40 | +class GXmlNode : public GBase { | |
| 41 | 41 | |
| 42 | 42 | public: |
| 43 | 43 | // Constructors and destructors |
| ... | ... | @@ -58,9 +58,10 @@ public: |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | 60 | // Pure virtual methods |
| 61 | - virtual void clear(void) = 0; | |
| 62 | - virtual void write(FILE* fptr, int indent = 0) const = 0; | |
| 63 | - virtual NodeType type(void) const = 0; | |
| 61 | + virtual void clear(void) = 0; | |
| 62 | + virtual GXmlNode* clone(void) const = 0; | |
| 63 | + virtual void write(FILE* fptr, int indent = 0) const = 0; | |
| 64 | + virtual NodeType type(void) const = 0; | |
| 64 | 65 | |
| 65 | 66 | // Methods |
| 66 | 67 | void append(GXmlNode* node); | ... | ... |
src/model/GModelRegistry.cpp
src/model/GModelSpectralRegistry.cpp
src/model/GModelTemporalRegistry.cpp
src/opt/GOptimizer.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GOptimizer.cpp - Abstract base class for optimizer * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2009-2011 by Jurgen Knodlseder * | |
| 4 | + * copyright (C) 2009-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | /** |
| 22 | 22 | * @file GOptimizer.cpp |
| 23 | 23 | * @brief GOptimizer abstract base class implementation. |
| 24 | - * @author J. Knodlseder | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | 27 | /* __ Includes ___________________________________________________________ */ |
| ... | ... | @@ -160,42 +160,3 @@ void GOptimizer::free_members(void) |
| 160 | 160 | // Return |
| 161 | 161 | return; |
| 162 | 162 | } |
| 163 | - | |
| 164 | - | |
| 165 | -/*========================================================================== | |
| 166 | - = = | |
| 167 | - = Friends = | |
| 168 | - = = | |
| 169 | - ==========================================================================*/ | |
| 170 | - | |
| 171 | -/***********************************************************************//** | |
| 172 | - * @brief Output operator | |
| 173 | - * | |
| 174 | - * @param[in] os Output stream. | |
| 175 | - * @param[in] opt Optimizer. | |
| 176 | - ***************************************************************************/ | |
| 177 | -std::ostream& operator<< (std::ostream& os, const GOptimizer& opt) | |
| 178 | -{ | |
| 179 | - // Write optimizer in output stream | |
| 180 | - os << opt.print(); | |
| 181 | - | |
| 182 | - // Return output stream | |
| 183 | - return os; | |
| 184 | -} | |
| 185 | - | |
| 186 | - | |
| 187 | -/***********************************************************************//** | |
| 188 | - * @brief Log operator | |
| 189 | - * | |
| 190 | - * @param[in] log Logger. | |
| 191 | - * @param[in] opt Optimizer. | |
| 192 | - ***************************************************************************/ | |
| 193 | -GLog& operator<< (GLog& log, const GOptimizer& opt) | |
| 194 | -{ | |
| 195 | - // Write optimizer into logger | |
| 196 | - log << opt.print(); | |
| 197 | - | |
| 198 | - // Return logger | |
| 199 | - return log; | |
| 200 | -} | |
| 201 | - | ... | ... |