Commit 6c667ebc2fc2f170d589e6906928788a4abe4510

Authored by Jürgen Knödlseder
1 parent 811cf12e

Add classname() method to all classes and implement full automatic typecasting f…

…or the observation Python module.

The classname() method returns in a human readable format the class name. This method is needed for full automatic typecasting in Python. Full automatic typecasting has for the moment been implemented for the observation module.
Showing 255 changed files with 2703 additions and 323 deletions

Too many changes.

To preserve performance only 100 of 255 files are displayed.

ChangeLog
1   -2014-08-05 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
  1 +2014-09-10 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
2 2  
3 3 * Version 0.9.0 released
4 4 ========================
... ... @@ -12,10 +12,12 @@
12 12 Add ts attribute to GModel and use it in GModelSky models
13 13 Add manipulation methods to GCTAResponseTable
14 14 Add read(), write() and save() methods to GCTAPsf2D and GCTAPsfKing
  15 + Add classname() method to all classes
15 16 Read/write altitude and azimuth attributes of CTA data
16 17 Refactor CTA response class, add GCTAResponseCube class
17 18 Improve CTA response computation for extended models
18 19 Implement CTA cube-style analysis
  20 + Implement full automatic typecasting in Python module
19 21 Optimize CTA binned and cube-style analysis
20 22 Rename GCTAModelBackground to GCTAModelCubeBackground
21 23 Rename GCTAModelInstBackground to GCTAModelIrfBackground
... ...
... ... @@ -2,7 +2,7 @@ New Features and Important Changes in GammaLib 00-09-00
2 2  
3 3 Author(s) : Juergen Knoedlseder
4 4  
5   -5 August 2014
  5 +10 September 2014
6 6  
7 7  
8 8 1. Introduction
... ... @@ -27,6 +27,9 @@ instead of a reference.
27 27 The GCTAObservation::load(GFits&) and GCTAObservation::save(GFits&)
28 28 methods have been remaned to read() and write().
29 29  
  30 +A classname() method has been added to all classes that returns the name
  31 +of the GammaLib class.
  32 +
30 33  
31 34 3. Configuration
32 35 -----------------
... ... @@ -113,6 +116,8 @@ quite time consuming (at least for methods that are called very often, such
113 116 as the response methods). The class code enumerators are defined in
114 117 GTypemaps.
115 118  
  119 +Full automatic typecasting has been implemented for the Python module.
  120 +
116 121  
117 122 11. Optimization module
118 123 -----------------------
... ...
include/GApplication.hpp
1 1 /***************************************************************************
2 2 * GApplication.hpp - GammaLib application base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -65,6 +65,7 @@ public:
65 65 // Methods
66 66 void clear(void);
67 67 GApplication* clone(void) const;
  68 + std::string classname(void) const;
68 69 const std::string& name(void) const;
69 70 const std::string& version(void) const;
70 71 double telapse(void) const;
... ... @@ -108,6 +109,18 @@ protected:
108 109  
109 110  
110 111 /***********************************************************************//**
  112 + * @brief Return class name
  113 + *
  114 + * @return String containing the class name ("GApplication").
  115 + ***************************************************************************/
  116 +inline
  117 +std::string GApplication::classname(void) const
  118 +{
  119 + return ("GApplication");
  120 +}
  121 +
  122 +
  123 +/***********************************************************************//**
111 124 * @brief Parameter access operator
112 125 *
113 126 * @param[in] name Parameter name.
... ...
include/GApplicationPar.hpp
1 1 /***************************************************************************
2 2 * GApplicationPar.hpp - Application parameter class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -59,6 +59,7 @@ public:
59 59 // Methods
60 60 void clear(void);
61 61 GApplicationPar* clone(void) const;
  62 + std::string classname(void) const;
62 63 void type(const std::string& type);
63 64 void mode(const std::string& mode);
64 65 void value(const std::string& value);
... ... @@ -129,6 +130,18 @@ protected:
129 130  
130 131  
131 132 /***********************************************************************//**
  133 + * @brief Return class name
  134 + *
  135 + * @return String containing the class name ("GApplicationPar").
  136 + ***************************************************************************/
  137 +inline
  138 +std::string GApplicationPar::classname(void) const
  139 +{
  140 + return ("GApplicationPar");
  141 +}
  142 +
  143 +
  144 +/***********************************************************************//**
132 145 * @brief Returns parameter name
133 146 *
134 147 * @return Parameter name
... ...
include/GApplicationPars.hpp
... ... @@ -65,6 +65,7 @@ public:
65 65 // Methods
66 66 void clear(void);
67 67 GApplicationPars* clone(void) const;
  68 + std::string classname(void) const;
68 69 GApplicationPar& at(const int& index);
69 70 const GApplicationPar& at(const int& index) const;
70 71 int size(void) const;
... ... @@ -110,6 +111,18 @@ protected:
110 111  
111 112  
112 113 /***********************************************************************//**
  114 + * @brief Return class name
  115 + *
  116 + * @return String containing the class name ("GApplicationPars").
  117 + ***************************************************************************/
  118 +inline
  119 +std::string GApplicationPars::classname(void) const
  120 +{
  121 + return ("GApplicationPars");
  122 +}
  123 +
  124 +
  125 +/***********************************************************************//**
113 126 * @brief Returns reference to parameter
114 127 *
115 128 * @param[in] index Parameter index [0,...,size()-1].
... ...
include/GArf.hpp
1 1 /***************************************************************************
2 2 * GArf.hpp - XSPEC Auxiliary Response File class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2013-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,6 +58,7 @@ public:
58 58 // Methods
59 59 void clear(void);
60 60 GArf* clone(void) const;
  61 + std::string classname(void) const;
61 62 int size(void) const;
62 63 double& at(const int& index);
63 64 const double& at(const int& index) const;
... ... @@ -84,6 +85,18 @@ protected:
84 85  
85 86  
86 87 /***********************************************************************//**
  88 + * @brief Return class name
  89 + *
  90 + * @return String containing the class name ("GArf").
  91 + ***************************************************************************/
  92 +inline
  93 +std::string GArf::classname(void) const
  94 +{
  95 + return ("GArf");
  96 +}
  97 +
  98 +
  99 +/***********************************************************************//**
87 100 * @brief Return content of spectral bin
88 101 *
89 102 * @param[in] index Bin index [0,...,size()-1].
... ...
include/GBase.hpp
1 1 /***************************************************************************
2 2 * GBase.hpp - GammaLib base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -42,12 +42,12 @@
42 42 * abstract base class from which all other GammaLib classes will be
43 43 * derived. The interface class imposes on all GammaLib classes to
44 44 * implement the following methods:
45   - *
46   - * clear() Sets the object to a clean initial state
47 45 *
48   - * clone() Creates a deep copy of the object
  46 + * clear - Clear container
  47 + * clone - Clones container
  48 + * class_name - Returns the class name
  49 + * print - Print container content
49 50 *
50   - * print() Print content of object
51 51 ***************************************************************************/
52 52 class GBase {
53 53  
... ... @@ -72,6 +72,14 @@ public:
72 72 /// object.
73 73 virtual GBase* clone(void) const = 0;
74 74  
  75 + /// @brief Return class name
  76 + ///
  77 + /// @return String containing the class name.
  78 + ///
  79 + /// Returns the class name for non-abstract classes in a human readable
  80 + /// way.
  81 + virtual std::string classname(void) const = 0;
  82 +
75 83 /// @brief Print content of object
76 84 ///
77 85 /// @param[in] chatter Chattiness (defaults to NORMAL).
... ...
include/GCaldb.hpp
... ... @@ -78,6 +78,7 @@ public:
78 78 // Methods
79 79 void clear(void);
80 80 GCaldb* clone(void) const;
  81 + std::string classname(void) const;
81 82 int size(void) const;
82 83 std::string rootdir(void) const;
83 84 void rootdir(const std::string& pathname);
... ... @@ -111,4 +112,16 @@ protected:
111 112 GFitsTable* m_cif; //!< Pointer to CIF table
112 113 };
113 114  
  115 +
  116 +/***********************************************************************//**
  117 + * @brief Return class name
  118 + *
  119 + * @return String containing the class name ("GCaldb").
  120 + ***************************************************************************/
  121 +inline
  122 +std::string GCaldb::classname(void) const
  123 +{
  124 + return ("GCaldb");
  125 +}
  126 +
114 127 #endif /* GCALDB_HPP */
... ...
include/GContainer.hpp
1 1 /***************************************************************************
2 2 * GContainer.hpp - Container interface class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2013-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -42,9 +42,10 @@
42 42 *
43 43 * clear - Clear container (inherited from GBase)
44 44 * clone - Clones container (inherited from GBase)
  45 + * classname - Returns the class name (inherited from GBase)
45 46 * print - Print container content (inherited from GBase)
46 47 * size - Returns number of objects is container
47   - * is_empty - Checks if container is empty
  48 + * is_empty - Checks if container is empty
48 49 * remove - Removes an object from the container
49 50 * reserve - Reserves space in the container
50 51 ***************************************************************************/
... ...
include/GCsv.hpp
1 1 /***************************************************************************
2 2 * GCsv.hpp - Column separated values table class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -68,6 +68,7 @@ public:
68 68 // Methods
69 69 void clear(void);
70 70 GCsv* clone(void) const;
  71 + std::string classname(void) const;
71 72 int size(void) const;
72 73 const int& ncols(void) const;
73 74 const int& nrows(void) const;
... ... @@ -91,6 +92,18 @@ protected:
91 92  
92 93  
93 94 /***********************************************************************//**
  95 + * @brief Return class name
  96 + *
  97 + * @return String containing the class name ("GCsv").
  98 + ***************************************************************************/
  99 +inline
  100 +std::string GCsv::classname(void) const
  101 +{
  102 + return ("GCsv");
  103 +}
  104 +
  105 +
  106 +/***********************************************************************//**
94 107 * @brief Return table size (columns times rows)
95 108 *
96 109 * @return Table size.
... ...
include/GDerivative.hpp
... ... @@ -58,6 +58,7 @@ public:
58 58 // Methods
59 59 void clear(void);
60 60 GDerivative* clone(void) const;
  61 + std::string classname(void) const;
61 62 void max_iter(const int& max_iter);
62 63 void eps(const double& eps);
63 64 void step_frac(const double& fraction);
... ... @@ -110,6 +111,18 @@ protected:
110 111  
111 112  
112 113 /***********************************************************************//**
  114 + * @brief Return class name
  115 + *
  116 + * @return String containing the class name ("GDerivative").
  117 + ***************************************************************************/
  118 +inline
  119 +std::string GDerivative::classname(void) const
  120 +{
  121 + return ("GDerivative");
  122 +}
  123 +
  124 +
  125 +/***********************************************************************//**
113 126 * @brief Return number of iterations
114 127 *
115 128 * @return Number of iterations.
... ...
include/GEbounds.hpp
... ... @@ -66,6 +66,7 @@ public:
66 66 // Methods
67 67 void clear(void);
68 68 GEbounds* clone(void) const;
  69 + std::string classname(void) const;
69 70 int size(void) const;
70 71 bool is_empty(void) const;
71 72 void append(const GEnergy& emin, const GEnergy& emax);
... ... @@ -117,6 +118,18 @@ protected:
117 118  
118 119  
119 120 /***********************************************************************//**
  121 + * @brief Return class name
  122 + *
  123 + * @return String containing the class name ("GEbounds").
  124 + ***************************************************************************/
  125 +inline
  126 +std::string GEbounds::classname(void) const
  127 +{
  128 + return ("GEbounds");
  129 +}
  130 +
  131 +
  132 +/***********************************************************************//**
120 133 * @brief Return number of energy boundaries
121 134 *
122 135 * @return Number of energy boundaries.
... ...
include/GEnergies.hpp
1 1 /***************************************************************************
2 2 * GEnergies.hpp - Energy container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2013-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -62,6 +62,7 @@ public:
62 62 // Methods
63 63 void clear(void);
64 64 GEnergies* clone(void) const;
  65 + std::string classname(void) const;
65 66 GEnergy& at(const int& index);
66 67 const GEnergy& at(const int& index) const;
67 68 int size(void) const;
... ... @@ -92,6 +93,18 @@ protected:
92 93  
93 94  
94 95 /***********************************************************************//**
  96 + * @brief Return class name
  97 + *
  98 + * @return String containing the class name ("GEnergies").
  99 + ***************************************************************************/
  100 +inline
  101 +std::string GEnergies::classname(void) const
  102 +{
  103 + return ("GEnergies");
  104 +}
  105 +
  106 +
  107 +/***********************************************************************//**
95 108 * @brief Return reference to energy
96 109 *
97 110 * @param[in] index Energy index [0,...,size()-1].
... ...
include/GEnergy.hpp
... ... @@ -77,6 +77,7 @@ public:
77 77 // Methods
78 78 void clear(void);
79 79 GEnergy* clone(void) const;
  80 + std::string classname(void) const;
80 81 double erg(void) const;
81 82 double keV(void) const;
82 83 double MeV(void) const;
... ... @@ -113,6 +114,19 @@ protected:
113 114 mutable bool m_has_log10; //!< log10 of energy is valid
114 115 };
115 116  
  117 +
  118 +/***********************************************************************//**
  119 + * @brief Return class name
  120 + *
  121 + * @return String containing the class name ("GEnergy").
  122 + ***************************************************************************/
  123 +inline
  124 +std::string GEnergy::classname(void) const
  125 +{
  126 + return ("GEnergy");
  127 +}
  128 +
  129 +
116 130 /***************************************************************************
117 131 * Inline friends *
118 132 ***************************************************************************/
... ...
include/GEvent.hpp
1 1 /***************************************************************************
2 2 * GEvent.hpp - Abstract event base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -82,6 +82,7 @@ public:
82 82 // Pure virtual methods
83 83 virtual void clear(void) = 0;
84 84 virtual GEvent* clone(void) const = 0;
  85 + virtual std::string classname(void) const = 0;
85 86 virtual double size(void) const = 0;
86 87 virtual const GInstDir& dir(void) const = 0;
87 88 virtual const GEnergy& energy(void) const = 0;
... ...
include/GEventAtom.hpp
1 1 /***************************************************************************
2 2 * GEventAtom.hpp - Abstract event atom base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Jurgen Knodlseder *
  4 + * copyright (C) 2009-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -76,6 +76,7 @@ public:
76 76 // Pure virtual methods
77 77 virtual void clear(void) = 0;
78 78 virtual GEvent* clone(void) const = 0;
  79 + virtual std::string classname(void) const = 0;
79 80 virtual double size(void) const;
80 81 virtual const GInstDir& dir(void) const = 0;
81 82 virtual const GEnergy& energy(void) const = 0;
... ...
include/GEventBin.hpp
1 1 /***************************************************************************
2 2 * GEventBin.hpp - Abstract event bin base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Jurgen Knodlseder *
  4 + * copyright (C) 2009-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -78,6 +78,7 @@ public:
78 78 // Pure virtual methods
79 79 virtual void clear(void) = 0;
80 80 virtual GEvent* clone(void) const = 0;
  81 + virtual std::string classname(void) const = 0;
81 82 virtual double size(void) const = 0;
82 83 virtual const GInstDir& dir(void) const = 0;
83 84 virtual const GEnergy& energy(void) const = 0;
... ...
include/GEventCube.hpp
1 1 /***************************************************************************
2 2 * GEventCube.hpp - Abstract event bin container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -56,6 +56,7 @@ public:
56 56 // Pure virtual methods
57 57 virtual void clear(void) = 0;
58 58 virtual GEventCube* clone(void) const = 0;
  59 + virtual std::string classname(void) const = 0;
59 60 virtual int size(void) const = 0;
60 61 virtual int dim(void) const = 0;
61 62 virtual int naxis(const int& axis) const = 0;
... ...
include/GEventList.hpp
1 1 /***************************************************************************
2 2 * GEventList.hpp - Abstract event atom container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -59,6 +59,7 @@ public:
59 59 // Pure virtual methods
60 60 virtual void clear(void) = 0;
61 61 virtual GEventList* clone(void) const = 0;
  62 + virtual std::string classname(void) const = 0;
62 63 virtual int size(void) const = 0;
63 64 virtual void load(const std::string& filename) = 0;
64 65 virtual void save(const std::string& filename,
... ...
include/GEvents.hpp
1 1 /***************************************************************************
2 2 * GEvents.hpp - Abstract event container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -76,6 +76,7 @@ public:
76 76 // Pure virtual methods
77 77 virtual void clear(void) = 0;
78 78 virtual GEvents* clone(void) const = 0;
  79 + virtual std::string classname(void) const = 0;
79 80 virtual int size(void) const = 0;
80 81 virtual void load(const std::string& filename) = 0;
81 82 virtual void save(const std::string& filename,
... ...
include/GFits.hpp
1 1 /***************************************************************************
2 2 * GFits.hpp - FITS file class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -78,6 +78,7 @@ public:
78 78 // Methods
79 79 void clear(void);
80 80 GFits* clone(void) const;
  81 + std::string classname(void) const;
81 82 GFitsHDU* at(const int& extno);
82 83 const GFitsHDU* at(const int& extno) const;
83 84 GFitsHDU* at(const std::string& extname);
... ... @@ -143,6 +144,18 @@ private:
143 144  
144 145  
145 146 /***********************************************************************//**
  147 + * @brief Return class name
  148 + *
  149 + * @return String containing the class name ("GFits").
  150 + ***************************************************************************/
  151 +inline
  152 +std::string GFits::classname(void) const
  153 +{
  154 + return ("GFits");
  155 +}
  156 +
  157 +
  158 +/***********************************************************************//**
146 159 * @brief Get pointer to HDU
147 160 *
148 161 * @param[in] extno Extension number [0,...,size()-1].
... ...
include/GFitsAsciiTable.hpp
1 1 /***************************************************************************
2 2 * GFitsAsciiTable.hpp - FITS ASCII table class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Methods
58 58 virtual void clear(void);
59 59 virtual GFitsAsciiTable* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 HDUType exttype(void) const;
61 62  
62 63 private:
... ... @@ -68,6 +69,18 @@ private:
68 69  
69 70  
70 71 /***********************************************************************//**
  72 + * @brief Return class name
  73 + *
  74 + * @return String containing the class name ("GFitsAsciiTable").
  75 + ***************************************************************************/
  76 +inline
  77 +std::string GFitsAsciiTable::classname(void) const
  78 +{
  79 + return ("GFitsAsciiTable");
  80 +}
  81 +
  82 +
  83 +/***********************************************************************//**
71 84 * @brief Return extension type
72 85 *
73 86 * @return Extension type (HT_ASCII_TABLE).
... ...
include/GFitsBinTable.hpp
1 1 /***************************************************************************
2 2 * GFitsBinTable.hpp - FITS binary table class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -51,6 +51,7 @@ public:
51 51 // Implemented pure virtual methods
52 52 virtual void clear(void);
53 53 virtual GFitsBinTable* clone(void) const;
  54 + virtual std::string classname(void) const;
54 55 HDUType exttype(void) const;
55 56  
56 57 private:
... ... @@ -62,6 +63,18 @@ private:
62 63  
63 64  
64 65 /***********************************************************************//**
  66 + * @brief Return class name
  67 + *
  68 + * @return String containing the class name ("GFitsBinTable").
  69 + ***************************************************************************/
  70 +inline
  71 +std::string GFitsBinTable::classname(void) const
  72 +{
  73 + return ("GFitsBinTable");
  74 +}
  75 +
  76 +
  77 +/***********************************************************************//**
65 78 * @brief Return extension type
66 79 *
67 80 * @return Extension type (HT_BIN_TABLE).
... ...
include/GFitsHDU.hpp
1 1 /***************************************************************************
2 2 * GFitsHDU.hpp - Abstract FITS extension base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -72,6 +72,7 @@ public:
72 72 // Pure virtual methods
73 73 virtual void clear(void) = 0;
74 74 virtual GFitsHDU* clone(void) const = 0;
  75 + virtual std::string classname(void) const = 0;
75 76 virtual HDUType exttype(void) const = 0;
76 77 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
77 78  
... ...
include/GFitsHeader.hpp
1 1 /***************************************************************************
2 2 * GFitsHeader.hpp - FITS header cards container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsHeader* clone(void) const;
  66 + std::string classname(void) const;
66 67 GFitsHeaderCard& at(const int& cardno);
67 68 const GFitsHeaderCard& at(const int& cardno) const;
68 69 GFitsHeaderCard& at(const std::string& keyname);
... ... @@ -101,6 +102,18 @@ private:
101 102  
102 103  
103 104 /***********************************************************************//**
  105 + * @brief Return class name
  106 + *
  107 + * @return String containing the class name ("GFitsHeader").
  108 + ***************************************************************************/
  109 +inline
  110 +std::string GFitsHeader::classname(void) const
  111 +{
  112 + return ("GFitsHeader");
  113 +}
  114 +
  115 +
  116 +/***********************************************************************//**
104 117 * @brief Return header card
105 118 *
106 119 * @param[in] cardno Number of card in header [0,...,size()-1]
... ...
include/GFitsHeaderCard.hpp
1 1 /***************************************************************************
2 2 * GFitsHeaderCard.hpp - FITS header card class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -66,6 +66,7 @@ public:
66 66 // Methods
67 67 void clear(void);
68 68 GFitsHeaderCard* clone(void) const;
  69 + std::string classname(void) const;
69 70 void keyname(const std::string& keyname);
70 71 std::string keyname(void) const;
71 72 void value(const std::string& value);
... ... @@ -115,6 +116,18 @@ private:
115 116  
116 117  
117 118 /***********************************************************************//**
  119 + * @brief Return class name
  120 + *
  121 + * @return String containing the class name ("GFitsHeaderCard").
  122 + ***************************************************************************/
  123 +inline
  124 +std::string GFitsHeaderCard::classname(void) const
  125 +{
  126 + return ("GFitsHeaderCard");
  127 +}
  128 +
  129 +
  130 +/***********************************************************************//**
118 131 * @brief Set unit of header card value
119 132 *
120 133 * @param[in] unit Unit of header card.
... ...
include/GFitsImage.hpp
1 1 /***************************************************************************
2 2 * GFitsImage.hpp - Abstract FITS image base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Pure virtual methods
58 58 virtual void clear(void) = 0;
59 59 virtual GFitsImage* clone(void) const = 0;
  60 + virtual std::string classname(void) const = 0;
60 61 virtual void* pixels(void) = 0;
61 62 virtual double pixel(const int& ix) const = 0;
62 63 virtual double pixel(const int& ix, const int& iy) const = 0;
... ...
include/GFitsImageByte.hpp
1 1 /***************************************************************************
2 2 * GFitsImageByte.hpp - FITS Byte image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageByte* clone(void) const;
  66 + std::string classname(void) const;
66 67 unsigned char& at(const int& ix);
67 68 unsigned char& at(const int& ix, const int& iy);
68 69 unsigned char& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 unsigned char* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageByte").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageByte::classname(void) const
  109 +{
  110 + return ("GFitsImageByte");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGEBYTE_HPP */
... ...
include/GFitsImageDouble.hpp
1 1 /***************************************************************************
2 2 * GFitsImageDouble.hpp - Double precision FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageDouble* clone(void) const;
  66 + std::string classname(void) const;
66 67 double& at(const int& ix);
67 68 double& at(const int& ix, const int& iy);
68 69 double& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 double* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageDouble").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageDouble::classname(void) const
  109 +{
  110 + return ("GFitsImageDouble");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGEDOUBLE_HPP */
... ...
include/GFitsImageFloat.hpp
1 1 /***************************************************************************
2 2 * GFitsImageFloat.hpp - Single precision FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageFloat* clone(void) const;
  66 + std::string classname(void) const;
66 67 float& at(const int& ix);
67 68 float& at(const int& ix, const int& iy);
68 69 float& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 float* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageFloat").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageFloat::classname(void) const
  109 +{
  110 + return ("GFitsImageFloat");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGEFLOAT_HPP */
... ...
include/GFitsImageLong.hpp
1 1 /***************************************************************************
2 2 * GFitsImageLong.hpp - Long integer FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageLong* clone(void) const;
  66 + std::string classname(void) const;
66 67 long& at(const int& ix);
67 68 long& at(const int& ix, const int& iy);
68 69 long& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 long* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageLong").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageLong::classname(void) const
  109 +{
  110 + return ("GFitsImageLong");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGELONG_HPP */
... ...
include/GFitsImageLongLong.hpp
1 1 /***************************************************************************
2 2 * GFitsImageLongLong.hpp - Long long integer FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageLongLong* clone(void) const;
  66 + std::string classname(void) const;
66 67 long long& at(const int& ix);
67 68 long long& at(const int& ix, const int& iy);
68 69 long long& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 long long* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageLongLong").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageLongLong::classname(void) const
  109 +{
  110 + return ("GFitsImageLongLong");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGELONGLONG_HPP */
... ...
include/GFitsImageSByte.hpp
1 1 /***************************************************************************
2 2 * GFitsImageSByte.hpp - Signed Byte FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageSByte* clone(void) const;
  66 + std::string classname(void) const;
66 67 char& at(const int& ix);
67 68 char& at(const int& ix, const int& iy);
68 69 char& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 char* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageSByte").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageSByte::classname(void) const
  109 +{
  110 + return ("GFitsImageSByte");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGESBYTE_HPP */
... ...
include/GFitsImageShort.hpp
1 1 /***************************************************************************
2 2 * GFitsImageShort.hpp - Short integer FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageShort* clone(void) const;
  66 + std::string classname(void) const;
66 67 short& at(const int& ix);
67 68 short& at(const int& ix, const int& iy);
68 69 short& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 short* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageShort").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageShort::classname(void) const
  109 +{
  110 + return ("GFitsImageShort");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGESHORT_HPP */
... ...
include/GFitsImageULong.hpp
1 1 /***************************************************************************
2 2 * GFitsImageULong.hpp - Unsigned long image FITS class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageULong* clone(void) const;
  66 + std::string classname(void) const;
66 67 unsigned long& at(const int& ix);
67 68 unsigned long& at(const int& ix, const int& iy);
68 69 unsigned long& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 unsigned long* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageULong").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageULong::classname(void) const
  109 +{
  110 + return ("GFitsImageULong");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGEULONG_HPP */
... ...
include/GFitsImageUShort.hpp
1 1 /***************************************************************************
2 2 * GFitsImageUShort.hpp - Unsigned short FITS image class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Methods
64 64 void clear(void);
65 65 GFitsImageUShort* clone(void) const;
  66 + std::string classname(void) const;
66 67 unsigned short& at(const int& ix);
67 68 unsigned short& at(const int& ix, const int& iy);
68 69 unsigned short& at(const int& ix, const int& iy, const int& iz);
... ... @@ -97,4 +98,16 @@ private:
97 98 unsigned short* m_nulval; //!< NULL value
98 99 };
99 100  
  101 +
  102 +/***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsImageUShort").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsImageUShort::classname(void) const
  109 +{
  110 + return ("GFitsImageUShort");
  111 +}
  112 +
100 113 #endif /* GFITSIMAGEUSHORT_HPP */
... ...
include/GFitsTable.hpp
1 1 /***************************************************************************
2 2 * GFitsTable.hpp - FITS table abstract base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -62,6 +62,7 @@ public:
62 62 // Pure virtual methods
63 63 virtual void clear(void) = 0;
64 64 virtual GFitsTable* clone(void) const = 0;
  65 + virtual std::string classname(void) const = 0;
65 66 virtual HDUType exttype(void) const = 0;
66 67  
67 68 // Implemented Methods
... ...
include/GFitsTableBitCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableBitCol.hpp - FITS table bit column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -59,6 +59,7 @@ public:
59 59 // Implemented virtual methods
60 60 virtual void clear(void);
61 61 virtual GFitsTableBitCol* clone(void) const;
  62 + virtual std::string classname(void) const;
62 63 virtual std::string string(const int& row, const int& col = 0) const;
63 64 virtual double real(const int& row, const int& col = 0) const;
64 65 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -110,6 +111,18 @@ private:
110 111  
111 112  
112 113 /***********************************************************************//**
  114 + * @brief Return class name
  115 + *
  116 + * @return String containing the class name ("GFitsTableBitCol").
  117 + ***************************************************************************/
  118 +inline
  119 +std::string GFitsTableBitCol::classname(void) const
  120 +{
  121 + return ("GFitsTableBitCol");
  122 +}
  123 +
  124 +
  125 +/***********************************************************************//**
113 126 * @brief Checks if column has been loaded
114 127 *
115 128 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableBoolCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableBoolCol.hpp - FITS table boolean column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -60,6 +60,7 @@ public:
60 60 // Implement virtual methods
61 61 virtual void clear(void);
62 62 virtual GFitsTableBoolCol* clone(void) const;
  63 + virtual std::string classname(void) const;
63 64 virtual std::string string(const int& row, const int& col = 0) const;
64 65 virtual double real(const int& row, const int& col = 0) const;
65 66 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -102,6 +103,18 @@ private:
102 103  
103 104  
104 105 /***********************************************************************//**
  106 + * @brief Return class name
  107 + *
  108 + * @return String containing the class name ("GFitsTableBoolCol").
  109 + ***************************************************************************/
  110 +inline
  111 +std::string GFitsTableBoolCol::classname(void) const
  112 +{
  113 + return ("GFitsTableBoolCol");
  114 +}
  115 +
  116 +
  117 +/***********************************************************************//**
105 118 * @brief Checks if column has been loaded
106 119 *
107 120 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableByteCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableByteCol.hpp - FITS table Byte column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableByteCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableByteCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableByteCol::classname(void) const
  103 +{
  104 + return ("GFitsTableByteCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableCDoubleCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableCDoubleCol.hpp - FITS table double precision complex column *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,6 +58,7 @@ public:
58 58 // Implement virtual methods
59 59 virtual void clear(void);
60 60 virtual GFitsTableCDoubleCol* clone(void) const;
  61 + virtual std::string classname(void) const;
61 62 virtual std::string string(const int& row, const int& col = 0) const;
62 63 virtual double real(const int& row, const int& col = 0) const;
63 64 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -94,6 +95,18 @@ private:
94 95  
95 96  
96 97 /***********************************************************************//**
  98 + * @brief Return class name
  99 + *
  100 + * @return String containing the class name ("GFitsTableCDoubleCol").
  101 + ***************************************************************************/
  102 +inline
  103 +std::string GFitsTableCDoubleCol::classname(void) const
  104 +{
  105 + return ("GFitsTableCDoubleCol");
  106 +}
  107 +
  108 +
  109 +/***********************************************************************//**
97 110 * @brief Checks if column has been loaded
98 111 *
99 112 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableCFloatCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableCFloatCol.hpp - FITS table single precision complex column *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,6 +58,7 @@ public:
58 58 // Implement virtual methods
59 59 virtual void clear(void);
60 60 virtual GFitsTableCFloatCol* clone(void) const;
  61 + virtual std::string classname(void) const;
61 62 virtual std::string string(const int& row, const int& col = 0) const;
62 63 virtual double real(const int& row, const int& col = 0) const;
63 64 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -94,6 +95,18 @@ private:
94 95  
95 96  
96 97 /***********************************************************************//**
  98 + * @brief Return class name
  99 + *
  100 + * @return String containing the class name ("GFitsTableCFloatCol").
  101 + ***************************************************************************/
  102 +inline
  103 +std::string GFitsTableCFloatCol::classname(void) const
  104 +{
  105 + return ("GFitsTableCFloatCol");
  106 +}
  107 +
  108 +
  109 +/***********************************************************************//**
97 110 * @brief Checks if column has been loaded
98 111 *
99 112 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableCol.hpp - FITS table column abstract base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -62,6 +62,7 @@ public:
62 62 // Pure virtual methods
63 63 virtual void clear(void) = 0;
64 64 virtual GFitsTableCol* clone(void) const = 0;
  65 + virtual std::string classname(void) const = 0;
65 66 virtual std::string string(const int& row, const int& inx = 0) const = 0;
66 67 virtual double real(const int& row, const int& inx = 0) const = 0;
67 68 virtual int integer(const int& row, const int& inx = 0) const = 0;
... ...
include/GFitsTableDoubleCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableDoubleCol.hpp - FITS table double column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableDoubleCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableDoubleCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableDoubleCol::classname(void) const
  103 +{
  104 + return ("GFitsTableDoubleCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableFloatCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableFloatCol.hpp - FITS table float column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableFloatCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableFloatCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableFloatCol::classname(void) const
  103 +{
  104 + return ("GFitsTableFloatCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableLongCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableLongCol.hpp - FITS table long column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableLongCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableLongCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableLongCol::classname(void) const
  103 +{
  104 + return ("GFitsTableLongCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableLongLongCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableLongLongCol.hpp - FITS table long long column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableLongLongCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableLongLongCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableLongLongCol::classname(void) const
  103 +{
  104 + return ("GFitsTableLongLongCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableShortCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableShortCol.hpp - FITS table short column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableShortCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableShortCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableShortCol::classname(void) const
  103 +{
  104 + return ("GFitsTableShortCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableStringCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableStringCol.hpp - FITS table string column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableStringCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -99,6 +100,18 @@ private:
99 100  
100 101  
101 102 /***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GFitsTableStringCol").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GFitsTableStringCol::classname(void) const
  109 +{
  110 + return ("GFitsTableStringCol");
  111 +}
  112 +
  113 +
  114 +/***********************************************************************//**
102 115 * @brief Checks if column has been loaded
103 116 *
104 117 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableULongCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableULongCol.hpp - FITS table unsigned long column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableULongCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableULongCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableULongCol::classname(void) const
  103 +{
  104 + return ("GFitsTableULongCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GFitsTableUShortCol.hpp
1 1 /***************************************************************************
2 2 * GFitsTableUShortCol.hpp - FITS table unsigned short column class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -57,6 +57,7 @@ public:
57 57 // Implement virtual methods
58 58 virtual void clear(void);
59 59 virtual GFitsTableUShortCol* clone(void) const;
  60 + virtual std::string classname(void) const;
60 61 virtual std::string string(const int& row, const int& col = 0) const;
61 62 virtual double real(const int& row, const int& col = 0) const;
62 63 virtual int integer(const int& row, const int& col = 0) const;
... ... @@ -93,6 +94,18 @@ private:
93 94  
94 95  
95 96 /***********************************************************************//**
  97 + * @brief Return class name
  98 + *
  99 + * @return String containing the class name ("GFitsTableUShortCol").
  100 + ***************************************************************************/
  101 +inline
  102 +std::string GFitsTableUShortCol::classname(void) const
  103 +{
  104 + return ("GFitsTableUShortCol");
  105 +}
  106 +
  107 +
  108 +/***********************************************************************//**
96 109 * @brief Checks if column has been loaded
97 110 *
98 111 * @return True if column has been loaded, false otherwise
... ...
include/GGti.hpp
1 1 /***************************************************************************
2 2 * GGti.hpp - Good time interval class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2008-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2008-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -65,6 +65,7 @@ public:
65 65 // Methods
66 66 void clear(void);
67 67 GGti* clone(void) const;
  68 + std::string classname(void) const;
68 69 int size(void) const;
69 70 bool is_empty(void) const;
70 71 void append(const GTime& tstart, const GTime& tstop);
... ... @@ -115,6 +116,18 @@ protected:
115 116  
116 117  
117 118 /***********************************************************************//**
  119 + * @brief Return class name
  120 + *
  121 + * @return String containing the class name ("GGti").
  122 + ***************************************************************************/
  123 +inline
  124 +std::string GGti::classname(void) const
  125 +{
  126 + return ("GGti");
  127 +}
  128 +
  129 +
  130 +/***********************************************************************//**
118 131 * @brief Return number of Good Time Intervals
119 132 *
120 133 * @return Number of Good Time Intervals.
... ...
include/GHealpix.hpp
... ... @@ -61,6 +61,7 @@ public:
61 61 // Implemented pure virtual base class methods
62 62 virtual void clear(void);
63 63 virtual GHealpix* clone(void) const;
  64 + virtual std::string classname(void) const;
64 65 virtual int size(void) const;
65 66 virtual std::string code(void) const;
66 67 virtual std::string name(void) const;
... ... @@ -106,6 +107,18 @@ private:
106 107  
107 108  
108 109 /***********************************************************************//**
  110 + * @brief Return class name
  111 + *
  112 + * @return String containing the class name ("GHealpix").
  113 + ***************************************************************************/
  114 +inline
  115 +std::string GHealpix::classname(void) const
  116 +{
  117 + return ("GHealpix");
  118 +}
  119 +
  120 +
  121 +/***********************************************************************//**
109 122 * @brief Return dimension of projection
110 123 *
111 124 * @return Dimension of projection.
... ...
include/GHorizDir.hpp
... ... @@ -67,6 +67,7 @@ public:
67 67 // Methods
68 68 void clear(void);
69 69 GHorizDir* clone(void) const;
  70 + std::string classname(void) const;
70 71 void altaz(const double& alt, const double& az);
71 72 void altaz_deg(const double& alt, const double& az);
72 73 void celvector(const GVector& vector);
... ... @@ -95,6 +96,18 @@ private:
95 96  
96 97  
97 98 /***********************************************************************//**
  99 + * @brief Return class name
  100 + *
  101 + * @return String containing the class name ("GHorizDir").
  102 + ***************************************************************************/
  103 +inline
  104 +std::string GHorizDir::classname(void) const
  105 +{
  106 + return ("GHorizDir");
  107 +}
  108 +
  109 +
  110 +/***********************************************************************//**
98 111 * @brief Return zenith angle in radians
99 112 *
100 113 * @return zenith angle in radians.
... ...
include/GInstDir.hpp
1 1 /***************************************************************************
2 2 * GInstDir.hpp - Abstract instrument direction base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,6 +58,7 @@ public:
58 58 // Pure virtual methods
59 59 virtual void clear(void) = 0;
60 60 virtual GInstDir* clone(void) const = 0;
  61 + virtual std::string classname(void) const = 0;
61 62 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
62 63  
63 64 protected:
... ...
include/GIntegral.hpp
... ... @@ -58,6 +58,7 @@ public:
58 58 // Methods
59 59 void clear(void);
60 60 GIntegral* clone(void) const;
  61 + std::string classname(void) const;
61 62 void max_iter(const int& iter);
62 63 const int& max_iter(void) const;
63 64 void fixed_iter(const int& iter);
... ... @@ -118,6 +119,18 @@ protected:
118 119  
119 120  
120 121 /***********************************************************************//**
  122 + * @brief Return class name
  123 + *
  124 + * @return String containing the class name ("GIntegral").
  125 + ***************************************************************************/
  126 +inline
  127 +std::string GIntegral::classname(void) const
  128 +{
  129 + return ("GIntegral");
  130 +}
  131 +
  132 +
  133 +/***********************************************************************//**
121 134 * @brief Return number of iterations
122 135 *
123 136 * @return Number of iterations.
... ...
include/GLog.hpp
... ... @@ -84,6 +84,7 @@ public:
84 84 // Methods
85 85 void clear(void);
86 86 int size(void) const;
  87 + std::string classname(void) const;
87 88 void open(const std::string& filename, const bool& clobber = false);
88 89 void close(void);
89 90 void flush(const bool& force = false);
... ... @@ -133,6 +134,18 @@ protected:
133 134  
134 135  
135 136 /***********************************************************************//**
  137 + * @brief Return class name
  138 + *
  139 + * @return String containing the class name ("GLog").
  140 + ***************************************************************************/
  141 +inline
  142 +std::string GLog::classname(void) const
  143 +{
  144 + return ("GLog");
  145 +}
  146 +
  147 +
  148 +/***********************************************************************//**
136 149 * @brief Write string as centred header into logger
137 150 *
138 151 * @param[in] arg Header string.
... ...
include/GMatrix.hpp
1 1 /***************************************************************************
2 2 * GMatrix.hpp - General matrix class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2006-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2006-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -108,6 +108,7 @@ public:
108 108 // Implemented pure virtual base class methods
109 109 virtual void clear(void);
110 110 virtual GMatrix* clone(void) const;
  111 + virtual std::string classname(void) const;
111 112 virtual double& at(const int& row, const int& column);
112 113 virtual const double& at(const int& row, const int& column) const;
113 114 virtual GVector row(const int& row) const;
... ... @@ -144,6 +145,18 @@ private:
144 145  
145 146  
146 147 /***********************************************************************//**
  148 + * @brief Return class name
  149 + *
  150 + * @return String containing the class name ("GMatrix").
  151 + ***************************************************************************/
  152 +inline
  153 +std::string GMatrix::classname(void) const
  154 +{
  155 + return ("GMatrix");
  156 +}
  157 +
  158 +
  159 +/***********************************************************************//**
147 160 * @brief Return reference to matrix element
148 161 *
149 162 * @param[in] row Matrix row [0,...,rows()-1].
... ...
include/GMatrixBase.hpp
1 1 /***************************************************************************
2 2 * GMatrixBase.hpp - Abstract matrix base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2006-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2006-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -156,6 +156,7 @@ public:
156 156 // Pure virtual methods
157 157 virtual void clear(void) = 0;
158 158 virtual GMatrixBase* clone(void) const = 0;
  159 + virtual std::string classname(void) const = 0;
159 160 virtual double& at(const int& row, const int& column) = 0;
160 161 virtual const double& at(const int& row, const int& column) const = 0;
161 162 virtual GVector row(const int& row) const = 0;
... ...
include/GMatrixSparse.hpp
1 1 /***************************************************************************
2 2 * GMatrixSparse.hpp - Sparse matrix class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2006-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2006-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -233,6 +233,7 @@ public:
233 233 // Implemented pure virtual base class methods
234 234 virtual void clear(void);
235 235 virtual GMatrixSparse* clone(void) const;
  236 + virtual std::string classname(void) const;
236 237 virtual double& at(const int& row, const int& column);
237 238 virtual const double& at(const int& row, const int& column) const;
238 239 virtual GVector row(const int& row) const;
... ... @@ -313,6 +314,18 @@ private:
313 314  
314 315  
315 316 /***********************************************************************//**
  317 + * @brief Return class name
  318 + *
  319 + * @return String containing the class name ("GMatrixSparse").
  320 + ***************************************************************************/
  321 +inline
  322 +std::string GMatrixSparse::classname(void) const
  323 +{
  324 + return ("GMatrixSparse");
  325 +}
  326 +
  327 +
  328 +/***********************************************************************//**
316 329 * @brief Set memory block size
317 330 *
318 331 * @param[in] block Memory block size.
... ...
include/GMatrixSymmetric.hpp
1 1 /***************************************************************************
2 2 * GMatrixSymmetric.hpp - Symmetric matrix class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2006-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2006-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -99,6 +99,7 @@ public:
99 99 // Implemented pure virtual base class methods
100 100 virtual void clear(void);
101 101 virtual GMatrixSymmetric* clone(void) const;
  102 + virtual std::string classname(void) const;
102 103 virtual double& at(const int& row, const int& column);
103 104 virtual const double& at(const int& row, const int& column) const;
104 105 virtual GVector row(const int& row) const;
... ... @@ -139,6 +140,18 @@ private:
139 140  
140 141  
141 142 /***********************************************************************//**
  143 + * @brief Return class name
  144 + *
  145 + * @return String containing the class name ("GMatrixSymmetric").
  146 + ***************************************************************************/
  147 +inline
  148 +std::string GMatrixSymmetric::classname(void) const
  149 +{
  150 + return ("GMatrixSymmetric");
  151 +}
  152 +
  153 +
  154 +/***********************************************************************//**
142 155 * @brief Return transposed matrix
143 156 *
144 157 * @return Transposed matrix.
... ...
include/GModel.hpp
... ... @@ -114,6 +114,7 @@ public:
114 114 // Pure virtual methods
115 115 virtual void clear(void) = 0;
116 116 virtual GModel* clone(void) const = 0;
  117 + virtual std::string classname(void) const = 0;
117 118 virtual std::string type(void) const = 0;
118 119 virtual bool is_constant(void) const = 0;
119 120 virtual double eval(const GEvent& event,
... ...
include/GModelData.hpp
... ... @@ -65,6 +65,7 @@ public:
65 65 // Pure virtual methods
66 66 virtual void clear(void) = 0;
67 67 virtual GModelData* clone(void) const = 0;
  68 + virtual std::string classname(void) const = 0;
68 69 virtual std::string type(void) const = 0;
69 70 virtual bool is_constant(void) const = 0;
70 71 virtual double eval(const GEvent& event,
... ...
include/GModelPar.hpp
1 1 /***************************************************************************
2 2 * GModelPar.hpp - Model parameter class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -99,9 +99,10 @@ public:
99 99 GModelPar& operator=(const GModelPar& par);
100 100  
101 101 // Methods
102   - GModelPar* clone(void) const;
103   - void read(const GXmlElement& xml);
104   - void write(GXmlElement& xml) const;
  102 + GModelPar* clone(void) const;
  103 + std::string classname(void) const;
  104 + void read(const GXmlElement& xml);
  105 + void write(GXmlElement& xml) const;
105 106  
106 107 protected:
107 108 // Protected methods
... ... @@ -110,4 +111,16 @@ protected:
110 111 void free_members(void);
111 112 };
112 113  
  114 +
  115 +/***********************************************************************//**
  116 + * @brief Return class name
  117 + *
  118 + * @return String containing the class name ("GModelPar").
  119 + ***************************************************************************/
  120 +inline
  121 +std::string GModelPar::classname(void) const
  122 +{
  123 + return ("GModelPar");
  124 +}
  125 +
113 126 #endif /* GMODELPAR_HPP */
... ...
include/GModelRegistry.hpp
1 1 /***************************************************************************
2 2 * GModelRegistry.hpp - Model registry class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 GModelRegistry& operator=(const GModelRegistry& registry);
64 64  
65 65 // Methods
  66 + std::string classname(void) const;
66 67 int size(void) const;
67 68 GModel* alloc(const std::string& name) const;
68 69 std::string name(const int& index) const;
... ... @@ -98,6 +99,18 @@ private:
98 99  
99 100  
100 101 /***********************************************************************//**
  102 + * @brief Return class name
  103 + *
  104 + * @return String containing the class name ("GModelRegistry").
  105 + ***************************************************************************/
  106 +inline
  107 +std::string GModelRegistry::classname(void) const
  108 +{
  109 + return ("GModelRegistry");
  110 +}
  111 +
  112 +
  113 +/***********************************************************************//**
101 114 * @brief Return number of registered models
102 115 *
103 116 * @return Number of registered models.
... ...
include/GModelSky.hpp
... ... @@ -145,6 +145,7 @@ public:
145 145 // Implemented pure virtual base class methods
146 146 virtual void clear(void);
147 147 virtual GModelSky* clone(void) const;
  148 + virtual std::string classname(void) const;
148 149 virtual std::string type(void) const;
149 150 virtual bool is_constant(void) const;
150 151 virtual double eval(const GEvent& event,
... ... @@ -224,6 +225,18 @@ protected:
224 225  
225 226  
226 227 /***********************************************************************//**
  228 + * @brief Return class name
  229 + *
  230 + * @return String containing the class name ("GModelSky").
  231 + ***************************************************************************/
  232 +inline
  233 +std::string GModelSky::classname(void) const
  234 +{
  235 + return ("GModelSky");
  236 +}
  237 +
  238 +
  239 +/***********************************************************************//**
227 240 * @brief Return sky model type
228 241 *
229 242 * @return Sky model type.
... ...
include/GModelSpatial.hpp
... ... @@ -84,6 +84,7 @@ public:
84 84 // Pure virtual methods
85 85 virtual void clear(void) = 0;
86 86 virtual GModelSpatial* clone(void) const = 0;
  87 + virtual std::string classname(void) const = 0;
87 88 virtual std::string type(void) const = 0;
88 89 virtual GClassCode code(void) const = 0;
89 90 virtual double eval(const GPhoton& photon) const = 0;
... ...
include/GModelSpatialDiffuse.hpp
... ... @@ -60,6 +60,7 @@ public:
60 60 // Pure virtual base class methods
61 61 virtual void clear(void) = 0;
62 62 virtual GModelSpatialDiffuse* clone(void) const = 0;
  63 + virtual std::string classname(void) const = 0;
63 64 virtual std::string type(void) const = 0;
64 65 virtual double eval(const GPhoton& photon) const = 0;
65 66 virtual double eval_gradients(const GPhoton& photon) const = 0;
... ...
include/GModelSpatialDiffuseConst.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialDiffuseConst.hpp - Spatial isotropic model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -60,6 +60,7 @@ public:
60 60 // Implemented pure virtual base class methods
61 61 virtual void clear(void);
62 62 virtual GModelSpatialDiffuseConst* clone(void) const;
  63 + virtual std::string classname(void) const;
63 64 virtual std::string type(void) const;
64 65 virtual double eval(const GPhoton& photon) const;
65 66 virtual double eval_gradients(const GPhoton& photon) const;
... ... @@ -88,6 +89,18 @@ protected:
88 89  
89 90  
90 91 /***********************************************************************//**
  92 + * @brief Return class name
  93 + *
  94 + * @return String containing the class name ("GModelSpatialDiffuseConst").
  95 + ***************************************************************************/
  96 +inline
  97 +std::string GModelSpatialDiffuseConst::classname(void) const
  98 +{
  99 + return ("GModelSpatialDiffuseConst");
  100 +}
  101 +
  102 +
  103 +/***********************************************************************//**
91 104 * @brief Return spatial model type
92 105 *
93 106 * @return "ConstantValue".
... ...
include/GModelSpatialDiffuseCube.hpp
... ... @@ -71,6 +71,7 @@ public:
71 71 // Implemented pure virtual methods
72 72 virtual void clear(void);
73 73 virtual GModelSpatialDiffuseCube* clone(void) const;
  74 + virtual std::string classname(void) const;
74 75 virtual std::string type(void) const;
75 76 virtual double eval(const GPhoton& photon) const;
76 77 virtual double eval_gradients(const GPhoton& photon) const;
... ... @@ -123,6 +124,18 @@ protected:
123 124  
124 125  
125 126 /***********************************************************************//**
  127 + * @brief Return class name
  128 + *
  129 + * @return String containing the class name ("GModelSpatialDiffuseCube").
  130 + ***************************************************************************/
  131 +inline
  132 +std::string GModelSpatialDiffuseCube::classname(void) const
  133 +{
  134 + return ("GModelSpatialDiffuseCube");
  135 +}
  136 +
  137 +
  138 +/***********************************************************************//**
126 139 * @brief Return spatial model type
127 140 *
128 141 * @return "MapCubeFunction".
... ...
include/GModelSpatialDiffuseMap.hpp
... ... @@ -66,6 +66,7 @@ public:
66 66 // Implemented pure virtual methods
67 67 virtual void clear(void);
68 68 virtual GModelSpatialDiffuseMap* clone(void) const;
  69 + virtual std::string classname(void) const;
69 70 virtual std::string type(void) const;
70 71 virtual double eval(const GPhoton& photon) const;
71 72 virtual double eval_gradients(const GPhoton& photon) const;
... ... @@ -103,6 +104,19 @@ protected:
103 104 double m_norm; //!< Map normalization
104 105 };
105 106  
  107 +
  108 +/***********************************************************************//**
  109 + * @brief Return class name
  110 + *
  111 + * @return String containing the class name ("GModelSpatialDiffuseMap").
  112 + ***************************************************************************/
  113 +inline
  114 +std::string GModelSpatialDiffuseMap::classname(void) const
  115 +{
  116 + return ("GModelSpatialDiffuseMap");
  117 +}
  118 +
  119 +
106 120 /***********************************************************************//**
107 121 * @brief Return spatial model type
108 122 *
... ...
include/GModelSpatialElliptical.hpp
... ... @@ -64,6 +64,7 @@ public:
64 64 // Pure virtual methods
65 65 virtual void clear(void) = 0;
66 66 virtual GModelSpatialElliptical* clone(void) const = 0;
  67 + virtual std::string classname(void) const = 0;
67 68 virtual std::string type(void) const = 0;
68 69 virtual double eval(const double& theta,
69 70 const double& posangle,
... ...
include/GModelSpatialEllipticalDisk.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialEllipticalDisk.hpp - Elliptical disk source model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Michael Mayer *
  4 + * copyright (C) 2013-2014 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 // Implemented pure virtual base class methods
64 64 virtual void clear(void);
65 65 virtual GModelSpatialEllipticalDisk* clone(void) const;
  66 + virtual std::string classname(void) const;
66 67 virtual std::string type(void) const;
67 68 virtual double eval(const double& theta,
68 69 const double& posangle,
... ... @@ -107,6 +108,18 @@ protected:
107 108  
108 109  
109 110 /***********************************************************************//**
  111 + * @brief Return class name
  112 + *
  113 + * @return String containing the class name ("GModelSpatialEllipticalDisk").
  114 + ***************************************************************************/
  115 +inline
  116 +std::string GModelSpatialEllipticalDisk::classname(void) const
  117 +{
  118 + return ("GModelSpatialEllipticalDisk");
  119 +}
  120 +
  121 +
  122 +/***********************************************************************//**
110 123 * @brief Return model type
111 124 *
112 125 * @return "EllipticalDisk".
... ...
include/GModelSpatialPointSource.hpp
... ... @@ -63,6 +63,7 @@ public:
63 63 // Implemented pure virtual methods
64 64 virtual void clear(void);
65 65 virtual GModelSpatialPointSource* clone(void) const;
  66 + virtual std::string classname(void) const;
66 67 virtual std::string type(void) const;
67 68 virtual GClassCode code(void) const;
68 69 virtual double eval(const GPhoton& photon) const;
... ... @@ -97,6 +98,18 @@ protected:
97 98  
98 99  
99 100 /***********************************************************************//**
  101 + * @brief Return class name
  102 + *
  103 + * @return String containing the class name ("GModelSpatialPointSource").
  104 + ***************************************************************************/
  105 +inline
  106 +std::string GModelSpatialPointSource::classname(void) const
  107 +{
  108 + return ("GModelSpatialPointSource");
  109 +}
  110 +
  111 +
  112 +/***********************************************************************//**
100 113 * @brief Return model type
101 114 *
102 115 * @return "SkyDirFunction".
... ...
include/GModelSpatialRadial.hpp
... ... @@ -64,6 +64,7 @@ public:
64 64 // Pure virtual methods
65 65 virtual void clear(void) = 0;
66 66 virtual GModelSpatialRadial* clone(void) const = 0;
  67 + virtual std::string classname(void) const = 0;
67 68 virtual std::string type(void) const = 0;
68 69 virtual double eval(const double& theta,
69 70 const GEnergy& energy,
... ...
include/GModelSpatialRadialDisk.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialRadialDisk.hpp - Radial disk source model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Christoph Deil *
  4 + * copyright (C) 2011-2014 by Christoph Deil *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -60,6 +60,7 @@ public:
60 60 // Implemented pure virtual base class methods
61 61 virtual void clear(void);
62 62 virtual GModelSpatialRadialDisk* clone(void) const;
  63 + virtual std::string classname(void) const;
63 64 virtual std::string type(void) const;
64 65 virtual double eval(const double& theta,
65 66 const GEnergy& energy,
... ... @@ -97,6 +98,18 @@ protected:
97 98  
98 99  
99 100 /***********************************************************************//**
  101 + * @brief Return class name
  102 + *
  103 + * @return String containing the class name ("GModelSpatialRadialDisk").
  104 + ***************************************************************************/
  105 +inline
  106 +std::string GModelSpatialRadialDisk::classname(void) const
  107 +{
  108 + return ("GModelSpatialRadialDisk");
  109 +}
  110 +
  111 +
  112 +/***********************************************************************//**
100 113 * @brief Return model type
101 114 *
102 115 * @return "DiskFunction".
... ...
include/GModelSpatialRadialGauss.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialRadialGauss.hpp - Radial Gaussian source model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -61,6 +61,7 @@ public:
61 61 // Implemented pure virtual methods
62 62 virtual void clear(void);
63 63 virtual GModelSpatialRadialGauss* clone(void) const;
  64 + virtual std::string classname(void) const;
64 65 virtual std::string type(void) const;
65 66 virtual double eval(const double& theta,
66 67 const GEnergy& energy,
... ... @@ -92,6 +93,18 @@ protected:
92 93  
93 94  
94 95 /***********************************************************************//**
  96 + * @brief Return class name
  97 + *
  98 + * @return String containing the class name ("GModelSpatialRadialGauss").
  99 + ***************************************************************************/
  100 +inline
  101 +std::string GModelSpatialRadialGauss::classname(void) const
  102 +{
  103 + return ("GModelSpatialRadialGauss");
  104 +}
  105 +
  106 +
  107 +/***********************************************************************//**
95 108 * @brief Return model type
96 109 *
97 110 * @return "GaussFunction".
... ...
include/GModelSpatialRadialShell.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialRadialShell.hpp - Radial shell source model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Christoph Deil *
  4 + * copyright (C) 2011-2014 by Christoph Deil *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -73,6 +73,7 @@ public:
73 73 // Implemented pure virtual methods
74 74 virtual void clear(void);
75 75 virtual GModelSpatialRadialShell* clone(void) const;
  76 + virtual std::string classname(void) const;
76 77 virtual std::string type(void) const;
77 78 virtual double eval(const double& theta,
78 79 const GEnergy& energy,
... ... @@ -122,6 +123,18 @@ protected:
122 123  
123 124  
124 125 /***********************************************************************//**
  126 + * @brief Return class name
  127 + *
  128 + * @return String containing the class name ("GModelSpatialRadialShell").
  129 + ***************************************************************************/
  130 +inline
  131 +std::string GModelSpatialRadialShell::classname(void) const
  132 +{
  133 + return ("GModelSpatialRadialShell");
  134 +}
  135 +
  136 +
  137 +/***********************************************************************//**
125 138 * @brief Return model type
126 139 *
127 140 * @return "ShellFunction".
... ...
include/GModelSpatialRegistry.hpp
1 1 /***************************************************************************
2 2 * GModelSpatialRegistry.hpp - Spatial model registry class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 GModelSpatialRegistry& operator=(const GModelSpatialRegistry& registry);
64 64  
65 65 // Methods
  66 + std::string classname(void) const;
66 67 int size(void) const;
67 68 GModelSpatial* alloc(const std::string& name) const;
68 69 std::string name(const int& index) const;
... ... @@ -98,6 +99,18 @@ private:
98 99  
99 100  
100 101 /***********************************************************************//**
  102 + * @brief Return class name
  103 + *
  104 + * @return String containing the class name ("GModelSpatialRegistry").
  105 + ***************************************************************************/
  106 +inline
  107 +std::string GModelSpatialRegistry::classname(void) const
  108 +{
  109 + return ("GModelSpatialRegistry");
  110 +}
  111 +
  112 +
  113 +/***********************************************************************//**
101 114 * @brief Return number of registered models
102 115 *
103 116 * @return Number of registered models.
... ...
include/GModelSpectral.hpp
... ... @@ -81,6 +81,7 @@ public:
81 81 // Pure virtual methods
82 82 virtual void clear(void) = 0;
83 83 virtual GModelSpectral* clone(void) const = 0;
  84 + virtual std::string classname(void) const = 0;
84 85 virtual std::string type(void) const = 0;
85 86 virtual double eval(const GEnergy& srcEng,
86 87 const GTime& srcTime) const = 0;
... ...
include/GModelSpectralBrokenPlaw.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralBrokenPlaw.hpp - Broken power law spectrum class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2013 by Anneli Schulz *
  4 + * copyright (C) 2013-2014 by Anneli Schulz *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -72,6 +72,7 @@ public:
72 72 // Implemented pure virtual methods
73 73 virtual void clear(void);
74 74 virtual GModelSpectralBrokenPlaw* clone(void) const;
  75 + virtual std::string classname(void) const;
75 76 virtual std::string type(void) const;
76 77 virtual double eval(const GEnergy& srcEng,
77 78 const GTime& srcTime) const;
... ... @@ -135,6 +136,18 @@ protected:
135 136  
136 137  
137 138 /***********************************************************************//**
  139 + * @brief Return class name
  140 + *
  141 + * @return String containing the class name ("GModelSpectralBrokenPlaw").
  142 + ***************************************************************************/
  143 +inline
  144 +std::string GModelSpectralBrokenPlaw::classname(void) const
  145 +{
  146 + return ("GModelSpectralBrokenPlaw");
  147 +}
  148 +
  149 +
  150 +/***********************************************************************//**
138 151 * @brief Return model type
139 152 *
140 153 * @return "PowerLaw".
... ...
include/GModelSpectralConst.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralConst.hpp - Spectral constant model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -66,6 +66,7 @@ public:
66 66 // Implemented pure virtual base class methods
67 67 virtual void clear(void);
68 68 virtual GModelSpectralConst* clone(void) const;
  69 + virtual std::string classname(void) const;
69 70 virtual std::string type(void) const;
70 71 virtual double eval(const GEnergy& srcEng,
71 72 const GTime& srcTime) const;
... ... @@ -99,6 +100,18 @@ protected:
99 100  
100 101  
101 102 /***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GModelSpectralConst").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GModelSpectralConst::classname(void) const
  109 +{
  110 + return ("GModelSpectralConst");
  111 +}
  112 +
  113 +
  114 +/***********************************************************************//**
102 115 * @brief Return model type
103 116 *
104 117 * @return "ConstantValue".
... ...
include/GModelSpectralExpPlaw.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralExpPlaw.hpp - Exponential cut off power law model *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -75,6 +75,7 @@ public:
75 75 // Implemented pure virtual methods
76 76 virtual void clear(void);
77 77 virtual GModelSpectralExpPlaw* clone(void) const;
  78 + virtual std::string classname(void) const;
78 79 virtual std::string type(void) const;
79 80 virtual double eval(const GEnergy& srcEng,
80 81 const GTime& srcTime) const;
... ... @@ -171,6 +172,18 @@ protected:
171 172  
172 173  
173 174 /***********************************************************************//**
  175 + * @brief Return class name
  176 + *
  177 + * @return String containing the class name ("GModelSpectralExpPlaw").
  178 + ***************************************************************************/
  179 +inline
  180 +std::string GModelSpectralExpPlaw::classname(void) const
  181 +{
  182 + return ("GModelSpectralExpPlaw");
  183 +}
  184 +
  185 +
  186 +/***********************************************************************//**
174 187 * @brief Return model type
175 188 *
176 189 * @return "ExpCutoff".
... ...
include/GModelSpectralFunc.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralFunc.hpp - Spectral function model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -69,6 +69,7 @@ public:
69 69 // Implemented pure virtual base class methods
70 70 virtual void clear(void);
71 71 virtual GModelSpectralFunc* clone(void) const;
  72 + virtual std::string classname(void) const;
72 73 virtual std::string type(void) const;
73 74 virtual double eval(const GEnergy& srcEng,
74 75 const GTime& srcTime) const;
... ... @@ -127,6 +128,18 @@ protected:
127 128  
128 129  
129 130 /***********************************************************************//**
  131 + * @brief Return class name
  132 + *
  133 + * @return String containing the class name ("GModelSpectralFunc").
  134 + ***************************************************************************/
  135 +inline
  136 +std::string GModelSpectralFunc::classname(void) const
  137 +{
  138 + return ("GModelSpectralFunc");
  139 +}
  140 +
  141 +
  142 +/***********************************************************************//**
130 143 * @brief Return model type
131 144 *
132 145 * @return "FileFunction".
... ...
include/GModelSpectralGauss.hpp
... ... @@ -72,6 +72,7 @@ public:
72 72 // Implemented pure virtual base class methods
73 73 virtual void clear(void);
74 74 virtual GModelSpectralGauss* clone(void) const;
  75 + virtual std::string classname(void) const;
75 76 virtual std::string type(void) const;
76 77 virtual double eval(const GEnergy& srcEng,
77 78 const GTime& srcTime) const;
... ... @@ -128,6 +129,18 @@ protected:
128 129  
129 130  
130 131 /***********************************************************************//**
  132 + * @brief Return class name
  133 + *
  134 + * @return String containing the class name ("GModelSpectralGauss").
  135 + ***************************************************************************/
  136 +inline
  137 +std::string GModelSpectralGauss::classname(void) const
  138 +{
  139 + return ("GModelSpectralGauss");
  140 +}
  141 +
  142 +
  143 +/***********************************************************************//**
131 144 * @brief Return model type
132 145 *
133 146 * @return "ConstantValue".
... ...
include/GModelSpectralLogParabola.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralLogParabola.hpp - Log parabola spectral model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2013 by Michael Mayer *
  4 + * copyright (C) 2012-2014 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -77,6 +77,7 @@ public:
77 77 // Implemented pure virtual base class methods
78 78 virtual void clear(void);
79 79 virtual GModelSpectralLogParabola* clone(void) const;
  80 + virtual std::string classname(void) const;
80 81 virtual std::string type(void) const;
81 82 virtual double eval(const GEnergy& srcEng,
82 83 const GTime& srcTime) const;
... ... @@ -184,6 +185,18 @@ protected:
184 185  
185 186  
186 187 /***********************************************************************//**
  188 + * @brief Return class name
  189 + *
  190 + * @return String containing the class name ("GModelSpectralLogParabola").
  191 + ***************************************************************************/
  192 +inline
  193 +std::string GModelSpectralLogParabola::classname(void) const
  194 +{
  195 + return ("GModelSpectralLogParabola");
  196 +}
  197 +
  198 +
  199 +/***********************************************************************//**
187 200 * @brief Return model type
188 201 *
189 202 * @return "LogParabola".
... ...
include/GModelSpectralNodes.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralNodes.hpp - Spectral nodes model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -91,6 +91,7 @@ public:
91 91 // Implemented pure virtual base class methods
92 92 virtual void clear(void);
93 93 virtual GModelSpectralNodes* clone(void) const;
  94 + virtual std::string classname(void) const;
94 95 virtual std::string type(void) const;
95 96 virtual double eval(const GEnergy& srcEng,
96 97 const GTime& srcTime) const;
... ... @@ -165,6 +166,18 @@ protected:
165 166  
166 167  
167 168 /***********************************************************************//**
  169 + * @brief Return class name
  170 + *
  171 + * @return String containing the class name ("GModelSpectralNodes").
  172 + ***************************************************************************/
  173 +inline
  174 +std::string GModelSpectralNodes::classname(void) const
  175 +{
  176 + return ("GModelSpectralNodes");
  177 +}
  178 +
  179 +
  180 +/***********************************************************************//**
168 181 * @brief Return model type
169 182 *
170 183 * @return "NodeFunction".
... ...
include/GModelSpectralPlaw.hpp
... ... @@ -70,6 +70,7 @@ public:
70 70 // Implemented pure virtual methods
71 71 virtual void clear(void);
72 72 virtual GModelSpectralPlaw* clone(void) const;
  73 + virtual std::string classname(void) const;
73 74 virtual std::string type(void) const;
74 75 virtual double eval(const GEnergy& srcEng,
75 76 const GTime& srcTime) const;
... ... @@ -125,6 +126,18 @@ protected:
125 126  
126 127  
127 128 /***********************************************************************//**
  129 + * @brief Return class name
  130 + *
  131 + * @return String containing the class name ("GModelSpectralPlaw").
  132 + ***************************************************************************/
  133 +inline
  134 +std::string GModelSpectralPlaw::classname(void) const
  135 +{
  136 + return ("GModelSpectralPlaw");
  137 +}
  138 +
  139 +
  140 +/***********************************************************************//**
128 141 * @brief Return model type
129 142 *
130 143 * @return "PowerLaw".
... ...
include/GModelSpectralPlaw2.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralPlaw2.hpp - Spectral power law model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -85,6 +85,7 @@ public:
85 85 // Implemented pure virtual base class methods
86 86 virtual void clear(void);
87 87 virtual GModelSpectralPlaw2* clone(void) const;
  88 + virtual std::string classname(void) const;
88 89 virtual std::string type(void) const;
89 90 virtual double eval(const GEnergy& srcEng,
90 91 const GTime& srcTime) const;
... ... @@ -145,6 +146,18 @@ protected:
145 146  
146 147  
147 148 /***********************************************************************//**
  149 + * @brief Return class name
  150 + *
  151 + * @return String containing the class name ("GModelSpectralPlaw2").
  152 + ***************************************************************************/
  153 +inline
  154 +std::string GModelSpectralPlaw2::classname(void) const
  155 +{
  156 + return ("GModelSpectralPlaw2");
  157 +}
  158 +
  159 +
  160 +/***********************************************************************//**
148 161 * @brief Return model type
149 162 *
150 163 * @return "PowerLaw2".
... ...
include/GModelSpectralRegistry.hpp
1 1 /***************************************************************************
2 2 * GModelSpectralRegistry.hpp - Spectral model registry class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 GModelSpectralRegistry& operator=(const GModelSpectralRegistry& registry);
64 64  
65 65 // Methods
  66 + std::string classname(void) const;
66 67 int size(void) const;
67 68 GModelSpectral* alloc(const std::string& name) const;
68 69 std::string name(const int& index) const;
... ... @@ -98,6 +99,18 @@ private:
98 99  
99 100  
100 101 /***********************************************************************//**
  102 + * @brief Return class name
  103 + *
  104 + * @return String containing the class name ("GModelSpectralRegistry").
  105 + ***************************************************************************/
  106 +inline
  107 +std::string GModelSpectralRegistry::classname(void) const
  108 +{
  109 + return ("GModelSpectralRegistry");
  110 +}
  111 +
  112 +
  113 +/***********************************************************************//**
101 114 * @brief Return number of registered models
102 115 *
103 116 * @return Number of registered models.
... ...
include/GModelSpectralSuperExpPlaw.hpp
... ... @@ -78,6 +78,7 @@ public:
78 78 // Implemented pure virtual methods
79 79 virtual void clear(void);
80 80 virtual GModelSpectralSuperExpPlaw* clone(void) const;
  81 + virtual std::string classname(void) const;
81 82 virtual std::string type(void) const;
82 83 virtual double eval(const GEnergy& srcEng,
83 84 const GTime& srcTime) const;
... ... @@ -185,6 +186,18 @@ protected:
185 186  
186 187  
187 188 /***********************************************************************//**
  189 + * @brief Return class name
  190 + *
  191 + * @return String containing the class name ("GModelSpectralSuperExpPlaw").
  192 + ***************************************************************************/
  193 +inline
  194 +std::string GModelSpectralSuperExpPlaw::classname(void) const
  195 +{
  196 + return ("GModelSpectralSuperExpPlaw");
  197 +}
  198 +
  199 +
  200 +/***********************************************************************//**
188 201 * @brief Return model type
189 202 *
190 203 * @return "SuperExpCutoff".
... ...
include/GModelTemporal.hpp
... ... @@ -66,6 +66,7 @@ public:
66 66 // Virtual methods
67 67 virtual void clear(void) = 0;
68 68 virtual GModelTemporal* clone(void) const = 0;
  69 + virtual std::string classname(void) const = 0;
69 70 virtual std::string type(void) const = 0;
70 71 virtual double eval(const GTime& srcTime) const = 0;
71 72 virtual double eval_gradients(const GTime& srcTime) = 0;
... ...
include/GModelTemporalConst.hpp
1 1 /***************************************************************************
2 2 * GModelTemporalConst.hpp - Temporal constant model class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -67,6 +67,7 @@ public:
67 67 // Implemented virtual base class methods
68 68 virtual void clear(void);
69 69 virtual GModelTemporalConst* clone(void) const;
  70 + virtual std::string classname(void) const;
70 71 virtual std::string type(void) const;
71 72 virtual double eval(const GTime& srcTime) const;
72 73 virtual double eval_gradients(const GTime& srcTime);
... ... @@ -92,6 +93,18 @@ protected:
92 93  
93 94  
94 95 /***********************************************************************//**
  96 + * @brief Return class name
  97 + *
  98 + * @return String containing the class name ("GModelTemporalConst").
  99 + ***************************************************************************/
  100 +inline
  101 +std::string GModelTemporalConst::classname(void) const
  102 +{
  103 + return ("GModelTemporalConst");
  104 +}
  105 +
  106 +
  107 +/***********************************************************************//**
95 108 * @brief Return model type
96 109 *
97 110 * @return "ConstantValue".
... ...
include/GModelTemporalRegistry.hpp
1 1 /***************************************************************************
2 2 * GModelTemporalRegistry.hpp - Temporal model registry class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,6 +63,7 @@ public:
63 63 GModelTemporalRegistry& operator=(const GModelTemporalRegistry& registry);
64 64  
65 65 // Methods
  66 + std::string classname(void) const;
66 67 int size(void) const;
67 68 GModelTemporal* alloc(const std::string& name) const;
68 69 std::string name(const int& index) const;
... ... @@ -98,6 +99,18 @@ private:
98 99  
99 100  
100 101 /***********************************************************************//**
  102 + * @brief Return class name
  103 + *
  104 + * @return String containing the class name ("GModelTemporalRegistry").
  105 + ***************************************************************************/
  106 +inline
  107 +std::string GModelTemporalRegistry::classname(void) const
  108 +{
  109 + return ("GModelTemporalRegistry");
  110 +}
  111 +
  112 +
  113 +/***********************************************************************//**
101 114 * @brief Return number of registered models
102 115 *
103 116 * @return Number of registered models.
... ...
include/GModels.hpp
1 1 /***************************************************************************
2 2 * GModels.hpp - Model container class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -161,6 +161,7 @@ public:
161 161 // Methods
162 162 void clear(void);
163 163 GModels* clone(void) const;
  164 + std::string classname(void) const;
164 165 GModel* at(const int& index);
165 166 const GModel* at(const int& index) const;
166 167 int size(void) const;
... ... @@ -198,6 +199,18 @@ protected:
198 199  
199 200  
200 201 /***********************************************************************//**
  202 + * @brief Return class name
  203 + *
  204 + * @return String containing the class name ("GModels").
  205 + ***************************************************************************/
  206 +inline
  207 +std::string GModels::classname(void) const
  208 +{
  209 + return ("GModels");
  210 +}
  211 +
  212 +
  213 +/***********************************************************************//**
201 214 * @brief Return pointer to model
202 215 *
203 216 * @param[in] index Model index [0,...,size()-1].
... ...
include/GNodeArray.hpp
... ... @@ -73,6 +73,7 @@ public:
73 73 // Methods
74 74 void clear(void);
75 75 GNodeArray* clone(void) const;
  76 + std::string classname(void) const;
76 77 double& at(const int& index);
77 78 const double& at(const int& index) const;
78 79 int size(void) const;
... ... @@ -127,6 +128,18 @@ private:
127 128  
128 129  
129 130 /***********************************************************************//**
  131 + * @brief Return class name
  132 + *
  133 + * @return String containing the class name ("GNodeArray").
  134 + ***************************************************************************/
  135 +inline
  136 +std::string GNodeArray::classname(void) const
  137 +{
  138 + return ("GNodeArray");
  139 +}
  140 +
  141 +
  142 +/***********************************************************************//**
130 143 * @brief Node access operator
131 144 *
132 145 * @param[in] index Node index [0,...,size()-1].
... ...
include/GObservation.hpp
... ... @@ -76,7 +76,7 @@ public:
76 76 // Pure virtual methods
77 77 virtual void clear(void) = 0;
78 78 virtual GObservation* clone(void) const = 0;
79   - virtual std::string type(void) const = 0;
  79 + virtual std::string classname(void) const = 0;
80 80 virtual void response(const GResponse& rsp) = 0;
81 81 virtual const GResponse* response(void) const = 0;
82 82 virtual std::string instrument(void) const = 0;
... ...
include/GObservationRegistry.hpp
1 1 /***************************************************************************
2 2 * GObservationRegistry.hpp - Observation registry class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -64,6 +64,7 @@ public:
64 64 GObservationRegistry& operator= (const GObservationRegistry& registry);
65 65  
66 66 // Methods
  67 + std::string classname(void) const;
67 68 int size(void) const;
68 69 GObservation* alloc(const std::string& name) const;
69 70 std::string name(const int& index) const;
... ... @@ -99,6 +100,18 @@ private:
99 100  
100 101  
101 102 /***********************************************************************//**
  103 + * @brief Return class name
  104 + *
  105 + * @return String containing the class name ("GObservationRegistry").
  106 + ***************************************************************************/
  107 +inline
  108 +std::string GObservationRegistry::classname(void) const
  109 +{
  110 + return ("GObservationRegistry");
  111 +}
  112 +
  113 +
  114 +/***********************************************************************//**
102 115 * @brief Return number of registered observations
103 116 *
104 117 * @return Number of registered observations.
... ...
include/GObservations.hpp
... ... @@ -104,6 +104,7 @@ public:
104 104 // Methods
105 105 void clear(void);
106 106 GObservations* clone(void) const;
  107 + std::string classname(void) const;
107 108 GObservation* at(const int& index);
108 109 const GObservation* at(const int& index) const;
109 110 int size(void) const;
... ... @@ -184,6 +185,18 @@ protected:
184 185  
185 186  
186 187 /***********************************************************************//**
  188 + * @brief Return class name
  189 + *
  190 + * @return String containing the class name ("GObservations").
  191 + ***************************************************************************/
  192 +inline
  193 +std::string GObservations::classname(void) const
  194 +{
  195 + return ("GObservations");
  196 +}
  197 +
  198 +
  199 +/***********************************************************************//**
187 200 * @brief Return pointer to observation
188 201 *
189 202 * @param[in] index Observation index [0,...,size()-1].
... ...
include/GOptimizer.hpp
1 1 /***************************************************************************
2 2 * GOptimizer.hpp - Abstract base class for optimizer *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2009-2013 by Juergen Knoedlseder *
  4 + * copyright (C) 2009-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -65,6 +65,7 @@ public:
65 65 // Pure virtual methods
66 66 virtual void clear(void) = 0;
67 67 virtual GOptimizer* clone(void) const = 0;
  68 + virtual std::string classname(void) const = 0;
68 69 virtual void optimize(GOptimizerFunction& fct, GOptimizerPars& pars) = 0;
69 70 virtual double value(void) const = 0;
70 71 virtual int status(void) const = 0;
... ...