From 6c667ebc2fc2f170d589e6906928788a4abe4510 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 10 Sep 2014 11:50:00 +0200 Subject: [PATCH] Add classname() method to all classes and implement full automatic typecasting for the observation Python module. --- ChangeLog | 4 +++- NEWS | 7 ++++++- include/GApplication.hpp | 15 ++++++++++++++- include/GApplicationPar.hpp | 15 ++++++++++++++- include/GApplicationPars.hpp | 13 +++++++++++++ include/GArf.hpp | 15 ++++++++++++++- include/GBase.hpp | 18 +++++++++++++----- include/GCaldb.hpp | 13 +++++++++++++ include/GContainer.hpp | 5 +++-- include/GCsv.hpp | 15 ++++++++++++++- include/GDerivative.hpp | 13 +++++++++++++ include/GEbounds.hpp | 13 +++++++++++++ include/GEnergies.hpp | 15 ++++++++++++++- include/GEnergy.hpp | 14 ++++++++++++++ include/GEvent.hpp | 3 ++- include/GEventAtom.hpp | 3 ++- include/GEventBin.hpp | 3 ++- include/GEventCube.hpp | 3 ++- include/GEventList.hpp | 3 ++- include/GEvents.hpp | 3 ++- include/GFits.hpp | 15 ++++++++++++++- include/GFitsAsciiTable.hpp | 15 ++++++++++++++- include/GFitsBinTable.hpp | 15 ++++++++++++++- include/GFitsHDU.hpp | 3 ++- include/GFitsHeader.hpp | 15 ++++++++++++++- include/GFitsHeaderCard.hpp | 15 ++++++++++++++- include/GFitsImage.hpp | 3 ++- include/GFitsImageByte.hpp | 15 ++++++++++++++- include/GFitsImageDouble.hpp | 15 ++++++++++++++- include/GFitsImageFloat.hpp | 15 ++++++++++++++- include/GFitsImageLong.hpp | 15 ++++++++++++++- include/GFitsImageLongLong.hpp | 15 ++++++++++++++- include/GFitsImageSByte.hpp | 15 ++++++++++++++- include/GFitsImageShort.hpp | 15 ++++++++++++++- include/GFitsImageULong.hpp | 15 ++++++++++++++- include/GFitsImageUShort.hpp | 15 ++++++++++++++- include/GFitsTable.hpp | 3 ++- include/GFitsTableBitCol.hpp | 15 ++++++++++++++- include/GFitsTableBoolCol.hpp | 15 ++++++++++++++- include/GFitsTableByteCol.hpp | 15 ++++++++++++++- include/GFitsTableCDoubleCol.hpp | 15 ++++++++++++++- include/GFitsTableCFloatCol.hpp | 15 ++++++++++++++- include/GFitsTableCol.hpp | 3 ++- include/GFitsTableDoubleCol.hpp | 15 ++++++++++++++- include/GFitsTableFloatCol.hpp | 15 ++++++++++++++- include/GFitsTableLongCol.hpp | 15 ++++++++++++++- include/GFitsTableLongLongCol.hpp | 15 ++++++++++++++- include/GFitsTableShortCol.hpp | 15 ++++++++++++++- include/GFitsTableStringCol.hpp | 15 ++++++++++++++- include/GFitsTableULongCol.hpp | 15 ++++++++++++++- include/GFitsTableUShortCol.hpp | 15 ++++++++++++++- include/GGti.hpp | 15 ++++++++++++++- include/GHealpix.hpp | 13 +++++++++++++ include/GHorizDir.hpp | 13 +++++++++++++ include/GInstDir.hpp | 3 ++- include/GIntegral.hpp | 13 +++++++++++++ include/GLog.hpp | 13 +++++++++++++ include/GMatrix.hpp | 15 ++++++++++++++- include/GMatrixBase.hpp | 3 ++- include/GMatrixSparse.hpp | 15 ++++++++++++++- include/GMatrixSymmetric.hpp | 15 ++++++++++++++- include/GModel.hpp | 1 + include/GModelData.hpp | 1 + include/GModelPar.hpp | 21 +++++++++++++++++---- include/GModelRegistry.hpp | 15 ++++++++++++++- include/GModelSky.hpp | 13 +++++++++++++ include/GModelSpatial.hpp | 1 + include/GModelSpatialDiffuse.hpp | 1 + include/GModelSpatialDiffuseConst.hpp | 15 ++++++++++++++- include/GModelSpatialDiffuseCube.hpp | 13 +++++++++++++ include/GModelSpatialDiffuseMap.hpp | 14 ++++++++++++++ include/GModelSpatialElliptical.hpp | 1 + include/GModelSpatialEllipticalDisk.hpp | 15 ++++++++++++++- include/GModelSpatialPointSource.hpp | 13 +++++++++++++ include/GModelSpatialRadial.hpp | 1 + include/GModelSpatialRadialDisk.hpp | 15 ++++++++++++++- include/GModelSpatialRadialGauss.hpp | 15 ++++++++++++++- include/GModelSpatialRadialShell.hpp | 15 ++++++++++++++- include/GModelSpatialRegistry.hpp | 15 ++++++++++++++- include/GModelSpectral.hpp | 1 + include/GModelSpectralBrokenPlaw.hpp | 15 ++++++++++++++- include/GModelSpectralConst.hpp | 15 ++++++++++++++- include/GModelSpectralExpPlaw.hpp | 15 ++++++++++++++- include/GModelSpectralFunc.hpp | 15 ++++++++++++++- include/GModelSpectralGauss.hpp | 13 +++++++++++++ include/GModelSpectralLogParabola.hpp | 15 ++++++++++++++- include/GModelSpectralNodes.hpp | 15 ++++++++++++++- include/GModelSpectralPlaw.hpp | 13 +++++++++++++ include/GModelSpectralPlaw2.hpp | 15 ++++++++++++++- include/GModelSpectralRegistry.hpp | 15 ++++++++++++++- include/GModelSpectralSuperExpPlaw.hpp | 13 +++++++++++++ include/GModelTemporal.hpp | 1 + include/GModelTemporalConst.hpp | 15 ++++++++++++++- include/GModelTemporalRegistry.hpp | 15 ++++++++++++++- include/GModels.hpp | 15 ++++++++++++++- include/GNodeArray.hpp | 13 +++++++++++++ include/GObservation.hpp | 2 +- include/GObservationRegistry.hpp | 15 ++++++++++++++- include/GObservations.hpp | 13 +++++++++++++ include/GOptimizer.hpp | 3 ++- include/GOptimizerLM.hpp | 15 ++++++++++++++- include/GOptimizerPar.hpp | 13 +++++++++++++ include/GOptimizerPars.hpp | 15 ++++++++++++++- include/GPha.hpp | 15 ++++++++++++++- include/GPhoton.hpp | 15 ++++++++++++++- include/GPhotons.hpp | 15 ++++++++++++++- include/GRan.hpp | 13 +++++++++++++ include/GRegistry.hpp | 10 +++++++++- include/GResponse.hpp | 1 + include/GRmf.hpp | 13 +++++++++++++ include/GRoi.hpp | 3 ++- include/GSkyDir.hpp | 15 ++++++++++++++- include/GSkyPixel.hpp | 15 ++++++++++++++- include/GSkyProjection.hpp | 3 ++- include/GSkyRegion.hpp | 3 ++- include/GSkyRegionCircle.hpp | 15 ++++++++++++++- include/GSkyRegions.hpp | 15 ++++++++++++++- include/GSkymap.hpp | 13 +++++++++++++ include/GSource.hpp | 15 ++++++++++++++- include/GTestCase.hpp | 13 +++++++++++++ include/GTestSuite.hpp | 3 ++- include/GTestSuites.hpp | 15 ++++++++++++++- include/GTime.hpp | 15 ++++++++++++++- include/GTimeReference.hpp | 15 ++++++++++++++- include/GTimes.hpp | 15 ++++++++++++++- include/GUrl.hpp | 3 ++- include/GUrlFile.hpp | 15 ++++++++++++++- include/GUrlString.hpp | 15 ++++++++++++++- include/GVOClient.hpp | 15 ++++++++++++++- include/GVector.hpp | 13 +++++++++++++ include/GWcs.hpp | 3 ++- include/GWcsAIT.hpp | 15 ++++++++++++++- include/GWcsAZP.hpp | 15 ++++++++++++++- include/GWcsCAR.hpp | 15 ++++++++++++++- include/GWcsMER.hpp | 15 ++++++++++++++- include/GWcsRegistry.hpp | 15 ++++++++++++++- include/GWcsSTG.hpp | 15 ++++++++++++++- include/GWcsTAN.hpp | 15 ++++++++++++++- include/GXml.hpp | 15 ++++++++++++++- include/GXmlAttribute.hpp | 15 ++++++++++++++- include/GXmlComment.hpp | 15 ++++++++++++++- include/GXmlDocument.hpp | 27 ++++++++++++++++++++------- include/GXmlElement.hpp | 15 ++++++++++++++- include/GXmlNode.hpp | 3 ++- include/GXmlPI.hpp | 15 ++++++++++++++- include/GXmlText.hpp | 15 ++++++++++++++- inst/com/include/GCOMEventBin.hpp | 15 ++++++++++++++- inst/com/include/GCOMEventCube.hpp | 15 ++++++++++++++- inst/com/include/GCOMInstDir.hpp | 15 ++++++++++++++- inst/com/include/GCOMModelDRBFitting.hpp | 15 ++++++++++++++- inst/com/include/GCOMObservation.hpp | 10 +++++----- inst/com/include/GCOMResponse.hpp | 13 +++++++++++++ inst/com/pyext/GCOMObservation.i | 2 +- inst/com/test/test_COM.hpp | 5 ++++- inst/cta/include/GCTAAeff.hpp | 3 ++- inst/cta/include/GCTAAeff2D.hpp | 15 ++++++++++++++- inst/cta/include/GCTAAeffArf.hpp | 13 +++++++++++++ inst/cta/include/GCTAAeffPerfTable.hpp | 15 ++++++++++++++- inst/cta/include/GCTABackground.hpp | 1 + inst/cta/include/GCTABackground3D.hpp | 13 +++++++++++++ inst/cta/include/GCTABackgroundPerfTable.hpp | 13 +++++++++++++ inst/cta/include/GCTAEdisp.hpp | 3 ++- inst/cta/include/GCTAEdispPerfTable.hpp | 13 +++++++++++++ inst/cta/include/GCTAEdispRmf.hpp | 13 +++++++++++++ inst/cta/include/GCTAEventAtom.hpp | 13 +++++++++++++ inst/cta/include/GCTAEventBin.hpp | 13 +++++++++++++ inst/cta/include/GCTAEventCube.hpp | 15 ++++++++++++++- inst/cta/include/GCTAEventList.hpp | 15 ++++++++++++++- inst/cta/include/GCTAExposure.hpp | 13 +++++++++++++ inst/cta/include/GCTAInstDir.hpp | 13 +++++++++++++ inst/cta/include/GCTAMeanPsf.hpp | 13 +++++++++++++ inst/cta/include/GCTAModelCubeBackground.hpp | 13 +++++++++++++ inst/cta/include/GCTAModelIrfBackground.hpp | 13 +++++++++++++ inst/cta/include/GCTAModelRadial.hpp | 3 ++- inst/cta/include/GCTAModelRadialAcceptance.hpp | 15 ++++++++++++++- inst/cta/include/GCTAModelRadialGauss.hpp | 15 ++++++++++++++- inst/cta/include/GCTAModelRadialPolynom.hpp | 15 ++++++++++++++- inst/cta/include/GCTAModelRadialProfile.hpp | 15 ++++++++++++++- inst/cta/include/GCTAModelRadialRegistry.hpp | 15 ++++++++++++++- inst/cta/include/GCTAObservation.hpp | 12 ++++++------ inst/cta/include/GCTAOnOffObservation.hpp | 15 ++++++++++++++- inst/cta/include/GCTAOnOffObservations.hpp | 15 ++++++++++++++- inst/cta/include/GCTAPointing.hpp | 13 +++++++++++++ inst/cta/include/GCTAPsf.hpp | 1 + inst/cta/include/GCTAPsf2D.hpp | 13 +++++++++++++ inst/cta/include/GCTAPsfKing.hpp | 13 +++++++++++++ inst/cta/include/GCTAPsfPerfTable.hpp | 15 ++++++++++++++- inst/cta/include/GCTAPsfVector.hpp | 15 ++++++++++++++- inst/cta/include/GCTAResponse.hpp | 3 ++- inst/cta/include/GCTAResponseCube.hpp | 17 +++++++++++++++-- inst/cta/include/GCTAResponseIrf.hpp | 17 +++++++++++++++-- inst/cta/include/GCTAResponseTable.hpp | 13 +++++++++++++ inst/cta/include/GCTARoi.hpp | 15 ++++++++++++++- inst/cta/include/GCTASourceCube.hpp | 15 ++++++++------- inst/cta/include/GCTASourceCubeDiffuse.hpp | 15 ++++++++++++++- inst/cta/include/GCTASourceCubePointSource.hpp | 15 ++++++++++++++- inst/cta/pyext/GCTAObservation.i | 2 +- inst/cta/test/test_CTA.hpp | 7 +++++-- inst/lat/include/GLATAeff.hpp | 15 ++++++++++++++- inst/lat/include/GLATEdisp.hpp | 15 ++++++++++++++- inst/lat/include/GLATEfficiency.hpp | 15 ++++++++++++++- inst/lat/include/GLATEventAtom.hpp | 15 ++++++++++++++- inst/lat/include/GLATEventBin.hpp | 15 ++++++++++++++- inst/lat/include/GLATEventCube.hpp | 15 ++++++++++++++- inst/lat/include/GLATEventList.hpp | 15 ++++++++++++++- inst/lat/include/GLATInstDir.hpp | 15 ++++++++++++++- inst/lat/include/GLATLtCube.hpp | 15 ++++++++++++++- inst/lat/include/GLATLtCubeMap.hpp | 13 +++++++++++++ inst/lat/include/GLATMeanPsf.hpp | 15 ++++++++++++++- inst/lat/include/GLATObservation.hpp | 10 +++++----- inst/lat/include/GLATPsf.hpp | 15 ++++++++++++++- inst/lat/include/GLATPsfBase.hpp | 1 + inst/lat/include/GLATPsfV1.hpp | 15 ++++++++++++++- inst/lat/include/GLATPsfV3.hpp | 15 ++++++++++++++- inst/lat/include/GLATResponse.hpp | 15 ++++++++++++++- inst/lat/include/GLATResponseTable.hpp | 15 ++++++++++++++- inst/lat/include/GLATRoi.hpp | 15 ++++++++++++++- inst/lat/pyext/GLATObservation.i | 2 +- inst/lat/test/test_LAT.hpp | 6 +++++- inst/mwl/include/GMWLDatum.hpp | 15 ++++++++++++++- inst/mwl/include/GMWLInstDir.hpp | 15 ++++++++++++++- inst/mwl/include/GMWLObservation.hpp | 10 +++++----- inst/mwl/include/GMWLResponse.hpp | 15 ++++++++++++++- inst/mwl/include/GMWLSpectrum.hpp | 15 ++++++++++++++- inst/mwl/pyext/GMWLObservation.i | 2 +- inst/mwl/test/test_MWL.hpp | 11 ++++++----- pyext/GEvents.i | 15 +-------------- pyext/GObservation.i | 15 +-------------- pyext/GObservations.i | 19 ------------------- pyext/GTestSuite.i | 5 +++++ pyext/gammalib/obs.i | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/test_GApplication.hpp | 1 + test/test_GFits.hpp | 45 +++++++++++++++++++++++---------------------- test/test_GMatrix.hpp | 3 ++- test/test_GMatrixSparse.hpp | 3 ++- test/test_GMatrixSymmetric.hpp | 3 ++- test/test_GModel.hpp | 1 + test/test_GNumerics.hpp | 1 + test/test_GObservation.hpp | 2 ++ test/test_GOptimizer.hpp | 1 + test/test_GSky.hpp | 27 ++++++++++++++------------- test/test_GSupport.hpp | 1 + test/test_GVO.hpp | 9 +++++---- test/test_GVector.hpp | 3 ++- test/test_GXml.hpp | 17 +++++++++-------- test/test_GXspec.hpp | 3 ++- test/testinst/GTestEventAtom.hpp | 1 + test/testinst/GTestEventBin.hpp | 5 +++-- test/testinst/GTestEventCube.hpp | 3 ++- test/testinst/GTestEventList.hpp | 3 ++- test/testinst/GTestInstDir.hpp | 3 ++- test/testinst/GTestModelData.hpp | 3 ++- test/testinst/GTestObservation.hpp | 1 + test/testinst/GTestResponse.hpp | 3 ++- test/testinst/GTestRoi.hpp | 3 ++- 255 files changed, 2703 insertions(+), 323 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf5527f..5770e82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2014-08-05 Juergen Knoedlseder +2014-09-10 Juergen Knoedlseder * Version 0.9.0 released ======================== @@ -12,10 +12,12 @@ Add ts attribute to GModel and use it in GModelSky models Add manipulation methods to GCTAResponseTable Add read(), write() and save() methods to GCTAPsf2D and GCTAPsfKing + Add classname() method to all classes Read/write altitude and azimuth attributes of CTA data Refactor CTA response class, add GCTAResponseCube class Improve CTA response computation for extended models Implement CTA cube-style analysis + Implement full automatic typecasting in Python module Optimize CTA binned and cube-style analysis Rename GCTAModelBackground to GCTAModelCubeBackground Rename GCTAModelInstBackground to GCTAModelIrfBackground diff --git a/NEWS b/NEWS index 4d42605..ff20ac6 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ New Features and Important Changes in GammaLib 00-09-00 Author(s) : Juergen Knoedlseder -5 August 2014 +10 September 2014 1. Introduction @@ -27,6 +27,9 @@ instead of a reference. The GCTAObservation::load(GFits&) and GCTAObservation::save(GFits&) methods have been remaned to read() and write(). +A classname() method has been added to all classes that returns the name +of the GammaLib class. + 3. Configuration ----------------- @@ -113,6 +116,8 @@ quite time consuming (at least for methods that are called very often, such as the response methods). The class code enumerators are defined in GTypemaps. +Full automatic typecasting has been implemented for the Python module. + 11. Optimization module ----------------------- diff --git a/include/GApplication.hpp b/include/GApplication.hpp index 7782223..65cb15f 100644 --- a/include/GApplication.hpp +++ b/include/GApplication.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GApplication.hpp - GammaLib application base class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Methods void clear(void); GApplication* clone(void) const; + std::string classname(void) const; const std::string& name(void) const; const std::string& version(void) const; double telapse(void) const; @@ -108,6 +109,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GApplication"). + ***************************************************************************/ +inline +std::string GApplication::classname(void) const +{ + return ("GApplication"); +} + + +/***********************************************************************//** * @brief Parameter access operator * * @param[in] name Parameter name. diff --git a/include/GApplicationPar.hpp b/include/GApplicationPar.hpp index 8636885..687c08e 100644 --- a/include/GApplicationPar.hpp +++ b/include/GApplicationPar.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GApplicationPar.hpp - Application parameter class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Methods void clear(void); GApplicationPar* clone(void) const; + std::string classname(void) const; void type(const std::string& type); void mode(const std::string& mode); void value(const std::string& value); @@ -129,6 +130,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GApplicationPar"). + ***************************************************************************/ +inline +std::string GApplicationPar::classname(void) const +{ + return ("GApplicationPar"); +} + + +/***********************************************************************//** * @brief Returns parameter name * * @return Parameter name diff --git a/include/GApplicationPars.hpp b/include/GApplicationPars.hpp index 0b99244..54795a2 100644 --- a/include/GApplicationPars.hpp +++ b/include/GApplicationPars.hpp @@ -65,6 +65,7 @@ public: // Methods void clear(void); GApplicationPars* clone(void) const; + std::string classname(void) const; GApplicationPar& at(const int& index); const GApplicationPar& at(const int& index) const; int size(void) const; @@ -110,6 +111,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GApplicationPars"). + ***************************************************************************/ +inline +std::string GApplicationPars::classname(void) const +{ + return ("GApplicationPars"); +} + + +/***********************************************************************//** * @brief Returns reference to parameter * * @param[in] index Parameter index [0,...,size()-1]. diff --git a/include/GArf.hpp b/include/GArf.hpp index af450a6..d934a12 100644 --- a/include/GArf.hpp +++ b/include/GArf.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GArf.hpp - XSPEC Auxiliary Response File class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Methods void clear(void); GArf* clone(void) const; + std::string classname(void) const; int size(void) const; double& at(const int& index); const double& at(const int& index) const; @@ -84,6 +85,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GArf"). + ***************************************************************************/ +inline +std::string GArf::classname(void) const +{ + return ("GArf"); +} + + +/***********************************************************************//** * @brief Return content of spectral bin * * @param[in] index Bin index [0,...,size()-1]. diff --git a/include/GBase.hpp b/include/GBase.hpp index 12428ec..9b9032e 100644 --- a/include/GBase.hpp +++ b/include/GBase.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GBase.hpp - GammaLib base class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -42,12 +42,12 @@ * abstract base class from which all other GammaLib classes will be * derived. The interface class imposes on all GammaLib classes to * implement the following methods: - * - * clear() Sets the object to a clean initial state * - * clone() Creates a deep copy of the object + * clear - Clear container + * clone - Clones container + * class_name - Returns the class name + * print - Print container content * - * print() Print content of object ***************************************************************************/ class GBase { @@ -72,6 +72,14 @@ public: /// object. virtual GBase* clone(void) const = 0; + /// @brief Return class name + /// + /// @return String containing the class name. + /// + /// Returns the class name for non-abstract classes in a human readable + /// way. + virtual std::string classname(void) const = 0; + /// @brief Print content of object /// /// @param[in] chatter Chattiness (defaults to NORMAL). diff --git a/include/GCaldb.hpp b/include/GCaldb.hpp index f136cfe..3c301bf 100644 --- a/include/GCaldb.hpp +++ b/include/GCaldb.hpp @@ -78,6 +78,7 @@ public: // Methods void clear(void); GCaldb* clone(void) const; + std::string classname(void) const; int size(void) const; std::string rootdir(void) const; void rootdir(const std::string& pathname); @@ -111,4 +112,16 @@ protected: GFitsTable* m_cif; //!< Pointer to CIF table }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCaldb"). + ***************************************************************************/ +inline +std::string GCaldb::classname(void) const +{ + return ("GCaldb"); +} + #endif /* GCALDB_HPP */ diff --git a/include/GContainer.hpp b/include/GContainer.hpp index 9a5ecf6..4bcda70 100644 --- a/include/GContainer.hpp +++ b/include/GContainer.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GContainer.hpp - Container interface class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -42,9 +42,10 @@ * * clear - Clear container (inherited from GBase) * clone - Clones container (inherited from GBase) + * classname - Returns the class name (inherited from GBase) * print - Print container content (inherited from GBase) * size - Returns number of objects is container - * is_empty - Checks if container is empty + * is_empty - Checks if container is empty * remove - Removes an object from the container * reserve - Reserves space in the container ***************************************************************************/ diff --git a/include/GCsv.hpp b/include/GCsv.hpp index d7ae90f..b36f7ac 100644 --- a/include/GCsv.hpp +++ b/include/GCsv.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCsv.hpp - Column separated values table class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Methods void clear(void); GCsv* clone(void) const; + std::string classname(void) const; int size(void) const; const int& ncols(void) const; const int& nrows(void) const; @@ -91,6 +92,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCsv"). + ***************************************************************************/ +inline +std::string GCsv::classname(void) const +{ + return ("GCsv"); +} + + +/***********************************************************************//** * @brief Return table size (columns times rows) * * @return Table size. diff --git a/include/GDerivative.hpp b/include/GDerivative.hpp index b16b28f..a89a621 100644 --- a/include/GDerivative.hpp +++ b/include/GDerivative.hpp @@ -58,6 +58,7 @@ public: // Methods void clear(void); GDerivative* clone(void) const; + std::string classname(void) const; void max_iter(const int& max_iter); void eps(const double& eps); void step_frac(const double& fraction); @@ -110,6 +111,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GDerivative"). + ***************************************************************************/ +inline +std::string GDerivative::classname(void) const +{ + return ("GDerivative"); +} + + +/***********************************************************************//** * @brief Return number of iterations * * @return Number of iterations. diff --git a/include/GEbounds.hpp b/include/GEbounds.hpp index 149ccec..0bf2814 100644 --- a/include/GEbounds.hpp +++ b/include/GEbounds.hpp @@ -66,6 +66,7 @@ public: // Methods void clear(void); GEbounds* clone(void) const; + std::string classname(void) const; int size(void) const; bool is_empty(void) const; void append(const GEnergy& emin, const GEnergy& emax); @@ -117,6 +118,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GEbounds"). + ***************************************************************************/ +inline +std::string GEbounds::classname(void) const +{ + return ("GEbounds"); +} + + +/***********************************************************************//** * @brief Return number of energy boundaries * * @return Number of energy boundaries. diff --git a/include/GEnergies.hpp b/include/GEnergies.hpp index 7b8994e..b2c53e5 100644 --- a/include/GEnergies.hpp +++ b/include/GEnergies.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEnergies.hpp - Energy container class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Methods void clear(void); GEnergies* clone(void) const; + std::string classname(void) const; GEnergy& at(const int& index); const GEnergy& at(const int& index) const; int size(void) const; @@ -92,6 +93,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GEnergies"). + ***************************************************************************/ +inline +std::string GEnergies::classname(void) const +{ + return ("GEnergies"); +} + + +/***********************************************************************//** * @brief Return reference to energy * * @param[in] index Energy index [0,...,size()-1]. diff --git a/include/GEnergy.hpp b/include/GEnergy.hpp index f13de22..3bb2c13 100644 --- a/include/GEnergy.hpp +++ b/include/GEnergy.hpp @@ -77,6 +77,7 @@ public: // Methods void clear(void); GEnergy* clone(void) const; + std::string classname(void) const; double erg(void) const; double keV(void) const; double MeV(void) const; @@ -113,6 +114,19 @@ protected: mutable bool m_has_log10; //!< log10 of energy is valid }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GEnergy"). + ***************************************************************************/ +inline +std::string GEnergy::classname(void) const +{ + return ("GEnergy"); +} + + /*************************************************************************** * Inline friends * ***************************************************************************/ diff --git a/include/GEvent.hpp b/include/GEvent.hpp index e43e669..aaa1e75 100644 --- a/include/GEvent.hpp +++ b/include/GEvent.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEvent.hpp - Abstract event base class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -82,6 +82,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEvent* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual double size(void) const = 0; virtual const GInstDir& dir(void) const = 0; virtual const GEnergy& energy(void) const = 0; diff --git a/include/GEventAtom.hpp b/include/GEventAtom.hpp index 50987f9..e20290e 100644 --- a/include/GEventAtom.hpp +++ b/include/GEventAtom.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEventAtom.hpp - Abstract event atom base class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Jurgen Knodlseder * + * copyright (C) 2009-2014 by Jurgen Knodlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -76,6 +76,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEvent* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual double size(void) const; virtual const GInstDir& dir(void) const = 0; virtual const GEnergy& energy(void) const = 0; diff --git a/include/GEventBin.hpp b/include/GEventBin.hpp index c768815..542dcb6 100644 --- a/include/GEventBin.hpp +++ b/include/GEventBin.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEventBin.hpp - Abstract event bin base class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Jurgen Knodlseder * + * copyright (C) 2009-2014 by Jurgen Knodlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -78,6 +78,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEvent* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual double size(void) const = 0; virtual const GInstDir& dir(void) const = 0; virtual const GEnergy& energy(void) const = 0; diff --git a/include/GEventCube.hpp b/include/GEventCube.hpp index 482215e..63550d8 100644 --- a/include/GEventCube.hpp +++ b/include/GEventCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEventCube.hpp - Abstract event bin container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -56,6 +56,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEventCube* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual int size(void) const = 0; virtual int dim(void) const = 0; virtual int naxis(const int& axis) const = 0; diff --git a/include/GEventList.hpp b/include/GEventList.hpp index e0b0f65..a1d94c4 100644 --- a/include/GEventList.hpp +++ b/include/GEventList.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEventList.hpp - Abstract event atom container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEventList* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual int size(void) const = 0; virtual void load(const std::string& filename) = 0; virtual void save(const std::string& filename, diff --git a/include/GEvents.hpp b/include/GEvents.hpp index c3e744c..0c3b9fb 100644 --- a/include/GEvents.hpp +++ b/include/GEvents.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GEvents.hpp - Abstract event container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -76,6 +76,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GEvents* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual int size(void) const = 0; virtual void load(const std::string& filename) = 0; virtual void save(const std::string& filename, diff --git a/include/GFits.hpp b/include/GFits.hpp index b8a0963..72beb3c 100644 --- a/include/GFits.hpp +++ b/include/GFits.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFits.hpp - FITS file class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -78,6 +78,7 @@ public: // Methods void clear(void); GFits* clone(void) const; + std::string classname(void) const; GFitsHDU* at(const int& extno); const GFitsHDU* at(const int& extno) const; GFitsHDU* at(const std::string& extname); @@ -143,6 +144,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFits"). + ***************************************************************************/ +inline +std::string GFits::classname(void) const +{ + return ("GFits"); +} + + +/***********************************************************************//** * @brief Get pointer to HDU * * @param[in] extno Extension number [0,...,size()-1]. diff --git a/include/GFitsAsciiTable.hpp b/include/GFitsAsciiTable.hpp index 5c5ea1c..b3df5b4 100644 --- a/include/GFitsAsciiTable.hpp +++ b/include/GFitsAsciiTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsAsciiTable.hpp - FITS ASCII table class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Methods virtual void clear(void); virtual GFitsAsciiTable* clone(void) const; + virtual std::string classname(void) const; HDUType exttype(void) const; private: @@ -68,6 +69,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsAsciiTable"). + ***************************************************************************/ +inline +std::string GFitsAsciiTable::classname(void) const +{ + return ("GFitsAsciiTable"); +} + + +/***********************************************************************//** * @brief Return extension type * * @return Extension type (HT_ASCII_TABLE). diff --git a/include/GFitsBinTable.hpp b/include/GFitsBinTable.hpp index d4fa41d..076d915 100644 --- a/include/GFitsBinTable.hpp +++ b/include/GFitsBinTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsBinTable.hpp - FITS binary table class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -51,6 +51,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GFitsBinTable* clone(void) const; + virtual std::string classname(void) const; HDUType exttype(void) const; private: @@ -62,6 +63,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsBinTable"). + ***************************************************************************/ +inline +std::string GFitsBinTable::classname(void) const +{ + return ("GFitsBinTable"); +} + + +/***********************************************************************//** * @brief Return extension type * * @return Extension type (HT_BIN_TABLE). diff --git a/include/GFitsHDU.hpp b/include/GFitsHDU.hpp index 200bb08..a3c202d 100644 --- a/include/GFitsHDU.hpp +++ b/include/GFitsHDU.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsHDU.hpp - Abstract FITS extension base class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -72,6 +72,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GFitsHDU* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual HDUType exttype(void) const = 0; virtual std::string print(const GChatter& chatter = NORMAL) const = 0; diff --git a/include/GFitsHeader.hpp b/include/GFitsHeader.hpp index 2eb891b..d469fd6 100644 --- a/include/GFitsHeader.hpp +++ b/include/GFitsHeader.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsHeader.hpp - FITS header cards container class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsHeader* clone(void) const; + std::string classname(void) const; GFitsHeaderCard& at(const int& cardno); const GFitsHeaderCard& at(const int& cardno) const; GFitsHeaderCard& at(const std::string& keyname); @@ -101,6 +102,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsHeader"). + ***************************************************************************/ +inline +std::string GFitsHeader::classname(void) const +{ + return ("GFitsHeader"); +} + + +/***********************************************************************//** * @brief Return header card * * @param[in] cardno Number of card in header [0,...,size()-1] diff --git a/include/GFitsHeaderCard.hpp b/include/GFitsHeaderCard.hpp index dac5b85..5def267 100644 --- a/include/GFitsHeaderCard.hpp +++ b/include/GFitsHeaderCard.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsHeaderCard.hpp - FITS header card class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -66,6 +66,7 @@ public: // Methods void clear(void); GFitsHeaderCard* clone(void) const; + std::string classname(void) const; void keyname(const std::string& keyname); std::string keyname(void) const; void value(const std::string& value); @@ -115,6 +116,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsHeaderCard"). + ***************************************************************************/ +inline +std::string GFitsHeaderCard::classname(void) const +{ + return ("GFitsHeaderCard"); +} + + +/***********************************************************************//** * @brief Set unit of header card value * * @param[in] unit Unit of header card. diff --git a/include/GFitsImage.hpp b/include/GFitsImage.hpp index 36caf13..7cea1a9 100644 --- a/include/GFitsImage.hpp +++ b/include/GFitsImage.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImage.hpp - Abstract FITS image base class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GFitsImage* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void* pixels(void) = 0; virtual double pixel(const int& ix) const = 0; virtual double pixel(const int& ix, const int& iy) const = 0; diff --git a/include/GFitsImageByte.hpp b/include/GFitsImageByte.hpp index 1477120..ca3e919 100644 --- a/include/GFitsImageByte.hpp +++ b/include/GFitsImageByte.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageByte.hpp - FITS Byte image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageByte* clone(void) const; + std::string classname(void) const; unsigned char& at(const int& ix); unsigned char& at(const int& ix, const int& iy); unsigned char& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: unsigned char* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageByte"). + ***************************************************************************/ +inline +std::string GFitsImageByte::classname(void) const +{ + return ("GFitsImageByte"); +} + #endif /* GFITSIMAGEBYTE_HPP */ diff --git a/include/GFitsImageDouble.hpp b/include/GFitsImageDouble.hpp index 34a0b5b..11289df 100644 --- a/include/GFitsImageDouble.hpp +++ b/include/GFitsImageDouble.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageDouble.hpp - Double precision FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageDouble* clone(void) const; + std::string classname(void) const; double& at(const int& ix); double& at(const int& ix, const int& iy); double& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: double* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageDouble"). + ***************************************************************************/ +inline +std::string GFitsImageDouble::classname(void) const +{ + return ("GFitsImageDouble"); +} + #endif /* GFITSIMAGEDOUBLE_HPP */ diff --git a/include/GFitsImageFloat.hpp b/include/GFitsImageFloat.hpp index 00d82eb..84424bf 100644 --- a/include/GFitsImageFloat.hpp +++ b/include/GFitsImageFloat.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageFloat.hpp - Single precision FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageFloat* clone(void) const; + std::string classname(void) const; float& at(const int& ix); float& at(const int& ix, const int& iy); float& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: float* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageFloat"). + ***************************************************************************/ +inline +std::string GFitsImageFloat::classname(void) const +{ + return ("GFitsImageFloat"); +} + #endif /* GFITSIMAGEFLOAT_HPP */ diff --git a/include/GFitsImageLong.hpp b/include/GFitsImageLong.hpp index 726dfb4..6d75a40 100644 --- a/include/GFitsImageLong.hpp +++ b/include/GFitsImageLong.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageLong.hpp - Long integer FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageLong* clone(void) const; + std::string classname(void) const; long& at(const int& ix); long& at(const int& ix, const int& iy); long& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: long* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageLong"). + ***************************************************************************/ +inline +std::string GFitsImageLong::classname(void) const +{ + return ("GFitsImageLong"); +} + #endif /* GFITSIMAGELONG_HPP */ diff --git a/include/GFitsImageLongLong.hpp b/include/GFitsImageLongLong.hpp index d861c74..a3ad12e 100644 --- a/include/GFitsImageLongLong.hpp +++ b/include/GFitsImageLongLong.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageLongLong.hpp - Long long integer FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageLongLong* clone(void) const; + std::string classname(void) const; long long& at(const int& ix); long long& at(const int& ix, const int& iy); long long& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: long long* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageLongLong"). + ***************************************************************************/ +inline +std::string GFitsImageLongLong::classname(void) const +{ + return ("GFitsImageLongLong"); +} + #endif /* GFITSIMAGELONGLONG_HPP */ diff --git a/include/GFitsImageSByte.hpp b/include/GFitsImageSByte.hpp index afad68c..7818df1 100644 --- a/include/GFitsImageSByte.hpp +++ b/include/GFitsImageSByte.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageSByte.hpp - Signed Byte FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageSByte* clone(void) const; + std::string classname(void) const; char& at(const int& ix); char& at(const int& ix, const int& iy); char& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: char* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageSByte"). + ***************************************************************************/ +inline +std::string GFitsImageSByte::classname(void) const +{ + return ("GFitsImageSByte"); +} + #endif /* GFITSIMAGESBYTE_HPP */ diff --git a/include/GFitsImageShort.hpp b/include/GFitsImageShort.hpp index 965fe87..708e2e2 100644 --- a/include/GFitsImageShort.hpp +++ b/include/GFitsImageShort.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageShort.hpp - Short integer FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageShort* clone(void) const; + std::string classname(void) const; short& at(const int& ix); short& at(const int& ix, const int& iy); short& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: short* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageShort"). + ***************************************************************************/ +inline +std::string GFitsImageShort::classname(void) const +{ + return ("GFitsImageShort"); +} + #endif /* GFITSIMAGESHORT_HPP */ diff --git a/include/GFitsImageULong.hpp b/include/GFitsImageULong.hpp index 1ab4b9c..9b86665 100644 --- a/include/GFitsImageULong.hpp +++ b/include/GFitsImageULong.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageULong.hpp - Unsigned long image FITS class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageULong* clone(void) const; + std::string classname(void) const; unsigned long& at(const int& ix); unsigned long& at(const int& ix, const int& iy); unsigned long& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: unsigned long* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageULong"). + ***************************************************************************/ +inline +std::string GFitsImageULong::classname(void) const +{ + return ("GFitsImageULong"); +} + #endif /* GFITSIMAGEULONG_HPP */ diff --git a/include/GFitsImageUShort.hpp b/include/GFitsImageUShort.hpp index 7396c32..f739a33 100644 --- a/include/GFitsImageUShort.hpp +++ b/include/GFitsImageUShort.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsImageUShort.hpp - Unsigned short FITS image class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GFitsImageUShort* clone(void) const; + std::string classname(void) const; unsigned short& at(const int& ix); unsigned short& at(const int& ix, const int& iy); unsigned short& at(const int& ix, const int& iy, const int& iz); @@ -97,4 +98,16 @@ private: unsigned short* m_nulval; //!< NULL value }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsImageUShort"). + ***************************************************************************/ +inline +std::string GFitsImageUShort::classname(void) const +{ + return ("GFitsImageUShort"); +} + #endif /* GFITSIMAGEUSHORT_HPP */ diff --git a/include/GFitsTable.hpp b/include/GFitsTable.hpp index 6c2333f..bdf2f59 100644 --- a/include/GFitsTable.hpp +++ b/include/GFitsTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTable.hpp - FITS table abstract base class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GFitsTable* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual HDUType exttype(void) const = 0; // Implemented Methods diff --git a/include/GFitsTableBitCol.hpp b/include/GFitsTableBitCol.hpp index ca7a4fb..24fac89 100644 --- a/include/GFitsTableBitCol.hpp +++ b/include/GFitsTableBitCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableBitCol.hpp - FITS table bit column class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Implemented virtual methods virtual void clear(void); virtual GFitsTableBitCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -110,6 +111,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableBitCol"). + ***************************************************************************/ +inline +std::string GFitsTableBitCol::classname(void) const +{ + return ("GFitsTableBitCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableBoolCol.hpp b/include/GFitsTableBoolCol.hpp index 911ade9..d078cff 100644 --- a/include/GFitsTableBoolCol.hpp +++ b/include/GFitsTableBoolCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableBoolCol.hpp - FITS table boolean column class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableBoolCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -102,6 +103,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableBoolCol"). + ***************************************************************************/ +inline +std::string GFitsTableBoolCol::classname(void) const +{ + return ("GFitsTableBoolCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableByteCol.hpp b/include/GFitsTableByteCol.hpp index ef71820..9c07ae7 100644 --- a/include/GFitsTableByteCol.hpp +++ b/include/GFitsTableByteCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableByteCol.hpp - FITS table Byte column class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableByteCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableByteCol"). + ***************************************************************************/ +inline +std::string GFitsTableByteCol::classname(void) const +{ + return ("GFitsTableByteCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableCDoubleCol.hpp b/include/GFitsTableCDoubleCol.hpp index c47f27f..cb52bd5 100644 --- a/include/GFitsTableCDoubleCol.hpp +++ b/include/GFitsTableCDoubleCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableCDoubleCol.hpp - FITS table double precision complex column * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableCDoubleCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -94,6 +95,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableCDoubleCol"). + ***************************************************************************/ +inline +std::string GFitsTableCDoubleCol::classname(void) const +{ + return ("GFitsTableCDoubleCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableCFloatCol.hpp b/include/GFitsTableCFloatCol.hpp index 9e0dbaf..97107ea 100644 --- a/include/GFitsTableCFloatCol.hpp +++ b/include/GFitsTableCFloatCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableCFloatCol.hpp - FITS table single precision complex column * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableCFloatCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -94,6 +95,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableCFloatCol"). + ***************************************************************************/ +inline +std::string GFitsTableCFloatCol::classname(void) const +{ + return ("GFitsTableCFloatCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableCol.hpp b/include/GFitsTableCol.hpp index 33344ee..1a4ae46 100644 --- a/include/GFitsTableCol.hpp +++ b/include/GFitsTableCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableCol.hpp - FITS table column abstract base class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GFitsTableCol* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string string(const int& row, const int& inx = 0) const = 0; virtual double real(const int& row, const int& inx = 0) const = 0; virtual int integer(const int& row, const int& inx = 0) const = 0; diff --git a/include/GFitsTableDoubleCol.hpp b/include/GFitsTableDoubleCol.hpp index 357997c..81055cf 100644 --- a/include/GFitsTableDoubleCol.hpp +++ b/include/GFitsTableDoubleCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableDoubleCol.hpp - FITS table double column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableDoubleCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableDoubleCol"). + ***************************************************************************/ +inline +std::string GFitsTableDoubleCol::classname(void) const +{ + return ("GFitsTableDoubleCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableFloatCol.hpp b/include/GFitsTableFloatCol.hpp index 0017c80..6259741 100644 --- a/include/GFitsTableFloatCol.hpp +++ b/include/GFitsTableFloatCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableFloatCol.hpp - FITS table float column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableFloatCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableFloatCol"). + ***************************************************************************/ +inline +std::string GFitsTableFloatCol::classname(void) const +{ + return ("GFitsTableFloatCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableLongCol.hpp b/include/GFitsTableLongCol.hpp index 570921c..66fb359 100644 --- a/include/GFitsTableLongCol.hpp +++ b/include/GFitsTableLongCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableLongCol.hpp - FITS table long column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Jurgen Knodlseder * + * copyright (C) 2010-2014 by Jurgen Knodlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableLongCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableLongCol"). + ***************************************************************************/ +inline +std::string GFitsTableLongCol::classname(void) const +{ + return ("GFitsTableLongCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableLongLongCol.hpp b/include/GFitsTableLongLongCol.hpp index 4f75699..6216f8c 100644 --- a/include/GFitsTableLongLongCol.hpp +++ b/include/GFitsTableLongLongCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableLongLongCol.hpp - FITS table long long column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableLongLongCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableLongLongCol"). + ***************************************************************************/ +inline +std::string GFitsTableLongLongCol::classname(void) const +{ + return ("GFitsTableLongLongCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableShortCol.hpp b/include/GFitsTableShortCol.hpp index 7f19674..ac8b374 100644 --- a/include/GFitsTableShortCol.hpp +++ b/include/GFitsTableShortCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableShortCol.hpp - FITS table short column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableShortCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableShortCol"). + ***************************************************************************/ +inline +std::string GFitsTableShortCol::classname(void) const +{ + return ("GFitsTableShortCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableStringCol.hpp b/include/GFitsTableStringCol.hpp index 263cf56..db24028 100644 --- a/include/GFitsTableStringCol.hpp +++ b/include/GFitsTableStringCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableStringCol.hpp - FITS table string column class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableStringCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -99,6 +100,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableStringCol"). + ***************************************************************************/ +inline +std::string GFitsTableStringCol::classname(void) const +{ + return ("GFitsTableStringCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableULongCol.hpp b/include/GFitsTableULongCol.hpp index 238820e..fec06fb 100644 --- a/include/GFitsTableULongCol.hpp +++ b/include/GFitsTableULongCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableULongCol.hpp - FITS table unsigned long column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableULongCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableULongCol"). + ***************************************************************************/ +inline +std::string GFitsTableULongCol::classname(void) const +{ + return ("GFitsTableULongCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GFitsTableUShortCol.hpp b/include/GFitsTableUShortCol.hpp index 7454113..df6a3cf 100644 --- a/include/GFitsTableUShortCol.hpp +++ b/include/GFitsTableUShortCol.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GFitsTableUShortCol.hpp - FITS table unsigned short column class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implement virtual methods virtual void clear(void); virtual GFitsTableUShortCol* clone(void) const; + virtual std::string classname(void) const; virtual std::string string(const int& row, const int& col = 0) const; virtual double real(const int& row, const int& col = 0) const; virtual int integer(const int& row, const int& col = 0) const; @@ -93,6 +94,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GFitsTableUShortCol"). + ***************************************************************************/ +inline +std::string GFitsTableUShortCol::classname(void) const +{ + return ("GFitsTableUShortCol"); +} + + +/***********************************************************************//** * @brief Checks if column has been loaded * * @return True if column has been loaded, false otherwise diff --git a/include/GGti.hpp b/include/GGti.hpp index 745bb7b..75d91e9 100644 --- a/include/GGti.hpp +++ b/include/GGti.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GGti.hpp - Good time interval class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Methods void clear(void); GGti* clone(void) const; + std::string classname(void) const; int size(void) const; bool is_empty(void) const; void append(const GTime& tstart, const GTime& tstop); @@ -115,6 +116,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GGti"). + ***************************************************************************/ +inline +std::string GGti::classname(void) const +{ + return ("GGti"); +} + + +/***********************************************************************//** * @brief Return number of Good Time Intervals * * @return Number of Good Time Intervals. diff --git a/include/GHealpix.hpp b/include/GHealpix.hpp index c696a2f..9f345b0 100644 --- a/include/GHealpix.hpp +++ b/include/GHealpix.hpp @@ -61,6 +61,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GHealpix* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual std::string code(void) const; virtual std::string name(void) const; @@ -106,6 +107,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GHealpix"). + ***************************************************************************/ +inline +std::string GHealpix::classname(void) const +{ + return ("GHealpix"); +} + + +/***********************************************************************//** * @brief Return dimension of projection * * @return Dimension of projection. diff --git a/include/GHorizDir.hpp b/include/GHorizDir.hpp index 5dd3f88..f769ee2 100644 --- a/include/GHorizDir.hpp +++ b/include/GHorizDir.hpp @@ -67,6 +67,7 @@ public: // Methods void clear(void); GHorizDir* clone(void) const; + std::string classname(void) const; void altaz(const double& alt, const double& az); void altaz_deg(const double& alt, const double& az); void celvector(const GVector& vector); @@ -95,6 +96,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GHorizDir"). + ***************************************************************************/ +inline +std::string GHorizDir::classname(void) const +{ + return ("GHorizDir"); +} + + +/***********************************************************************//** * @brief Return zenith angle in radians * * @return zenith angle in radians. diff --git a/include/GInstDir.hpp b/include/GInstDir.hpp index 2389cb8..bc023a9 100644 --- a/include/GInstDir.hpp +++ b/include/GInstDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GInstDir.hpp - Abstract instrument direction base class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GInstDir* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string print(const GChatter& chatter = NORMAL) const = 0; protected: diff --git a/include/GIntegral.hpp b/include/GIntegral.hpp index 0a12911..3c3f224 100644 --- a/include/GIntegral.hpp +++ b/include/GIntegral.hpp @@ -58,6 +58,7 @@ public: // Methods void clear(void); GIntegral* clone(void) const; + std::string classname(void) const; void max_iter(const int& iter); const int& max_iter(void) const; void fixed_iter(const int& iter); @@ -118,6 +119,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GIntegral"). + ***************************************************************************/ +inline +std::string GIntegral::classname(void) const +{ + return ("GIntegral"); +} + + +/***********************************************************************//** * @brief Return number of iterations * * @return Number of iterations. diff --git a/include/GLog.hpp b/include/GLog.hpp index e2e7627..a2a2136 100644 --- a/include/GLog.hpp +++ b/include/GLog.hpp @@ -84,6 +84,7 @@ public: // Methods void clear(void); int size(void) const; + std::string classname(void) const; void open(const std::string& filename, const bool& clobber = false); void close(void); void flush(const bool& force = false); @@ -133,6 +134,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLog"). + ***************************************************************************/ +inline +std::string GLog::classname(void) const +{ + return ("GLog"); +} + + +/***********************************************************************//** * @brief Write string as centred header into logger * * @param[in] arg Header string. diff --git a/include/GMatrix.hpp b/include/GMatrix.hpp index 836c4a2..3939799 100644 --- a/include/GMatrix.hpp +++ b/include/GMatrix.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMatrix.hpp - General matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2006-2013 by Juergen Knoedlseder * + * copyright (C) 2006-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -108,6 +108,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GMatrix* clone(void) const; + virtual std::string classname(void) const; virtual double& at(const int& row, const int& column); virtual const double& at(const int& row, const int& column) const; virtual GVector row(const int& row) const; @@ -144,6 +145,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMatrix"). + ***************************************************************************/ +inline +std::string GMatrix::classname(void) const +{ + return ("GMatrix"); +} + + +/***********************************************************************//** * @brief Return reference to matrix element * * @param[in] row Matrix row [0,...,rows()-1]. diff --git a/include/GMatrixBase.hpp b/include/GMatrixBase.hpp index f93bf85..55879ed 100644 --- a/include/GMatrixBase.hpp +++ b/include/GMatrixBase.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMatrixBase.hpp - Abstract matrix base class * * ----------------------------------------------------------------------- * - * copyright (C) 2006-2013 by Juergen Knoedlseder * + * copyright (C) 2006-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -156,6 +156,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GMatrixBase* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual double& at(const int& row, const int& column) = 0; virtual const double& at(const int& row, const int& column) const = 0; virtual GVector row(const int& row) const = 0; diff --git a/include/GMatrixSparse.hpp b/include/GMatrixSparse.hpp index 98c43eb..ddb0efa 100644 --- a/include/GMatrixSparse.hpp +++ b/include/GMatrixSparse.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMatrixSparse.hpp - Sparse matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2006-2013 by Juergen Knoedlseder * + * copyright (C) 2006-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -233,6 +233,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GMatrixSparse* clone(void) const; + virtual std::string classname(void) const; virtual double& at(const int& row, const int& column); virtual const double& at(const int& row, const int& column) const; virtual GVector row(const int& row) const; @@ -313,6 +314,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMatrixSparse"). + ***************************************************************************/ +inline +std::string GMatrixSparse::classname(void) const +{ + return ("GMatrixSparse"); +} + + +/***********************************************************************//** * @brief Set memory block size * * @param[in] block Memory block size. diff --git a/include/GMatrixSymmetric.hpp b/include/GMatrixSymmetric.hpp index a5f8ed9..2a6ae83 100644 --- a/include/GMatrixSymmetric.hpp +++ b/include/GMatrixSymmetric.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMatrixSymmetric.hpp - Symmetric matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2006-2013 by Juergen Knoedlseder * + * copyright (C) 2006-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -99,6 +99,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GMatrixSymmetric* clone(void) const; + virtual std::string classname(void) const; virtual double& at(const int& row, const int& column); virtual const double& at(const int& row, const int& column) const; virtual GVector row(const int& row) const; @@ -139,6 +140,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMatrixSymmetric"). + ***************************************************************************/ +inline +std::string GMatrixSymmetric::classname(void) const +{ + return ("GMatrixSymmetric"); +} + + +/***********************************************************************//** * @brief Return transposed matrix * * @return Transposed matrix. diff --git a/include/GModel.hpp b/include/GModel.hpp index 5cf8997..fa7489f 100644 --- a/include/GModel.hpp +++ b/include/GModel.hpp @@ -114,6 +114,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModel* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual bool is_constant(void) const = 0; virtual double eval(const GEvent& event, diff --git a/include/GModelData.hpp b/include/GModelData.hpp index 5626db8..951803e 100644 --- a/include/GModelData.hpp +++ b/include/GModelData.hpp @@ -65,6 +65,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModelData* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual bool is_constant(void) const = 0; virtual double eval(const GEvent& event, diff --git a/include/GModelPar.hpp b/include/GModelPar.hpp index 4c3064b..cd56100 100644 --- a/include/GModelPar.hpp +++ b/include/GModelPar.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelPar.hpp - Model parameter class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -99,9 +99,10 @@ public: GModelPar& operator=(const GModelPar& par); // Methods - GModelPar* clone(void) const; - void read(const GXmlElement& xml); - void write(GXmlElement& xml) const; + GModelPar* clone(void) const; + std::string classname(void) const; + void read(const GXmlElement& xml); + void write(GXmlElement& xml) const; protected: // Protected methods @@ -110,4 +111,16 @@ protected: void free_members(void); }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelPar"). + ***************************************************************************/ +inline +std::string GModelPar::classname(void) const +{ + return ("GModelPar"); +} + #endif /* GMODELPAR_HPP */ diff --git a/include/GModelRegistry.hpp b/include/GModelRegistry.hpp index 5ef0a84..0386147 100644 --- a/include/GModelRegistry.hpp +++ b/include/GModelRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelRegistry.hpp - Model registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GModelRegistry& operator=(const GModelRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GModel* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -98,6 +99,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelRegistry"). + ***************************************************************************/ +inline +std::string GModelRegistry::classname(void) const +{ + return ("GModelRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/include/GModelSky.hpp b/include/GModelSky.hpp index 9386a17..4c1581c 100644 --- a/include/GModelSky.hpp +++ b/include/GModelSky.hpp @@ -145,6 +145,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSky* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual bool is_constant(void) const; virtual double eval(const GEvent& event, @@ -224,6 +225,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSky"). + ***************************************************************************/ +inline +std::string GModelSky::classname(void) const +{ + return ("GModelSky"); +} + + +/***********************************************************************//** * @brief Return sky model type * * @return Sky model type. diff --git a/include/GModelSpatial.hpp b/include/GModelSpatial.hpp index 4e7d62d..d1e375a 100644 --- a/include/GModelSpatial.hpp +++ b/include/GModelSpatial.hpp @@ -84,6 +84,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModelSpatial* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual GClassCode code(void) const = 0; virtual double eval(const GPhoton& photon) const = 0; diff --git a/include/GModelSpatialDiffuse.hpp b/include/GModelSpatialDiffuse.hpp index 88ac50a..2fd00bc 100644 --- a/include/GModelSpatialDiffuse.hpp +++ b/include/GModelSpatialDiffuse.hpp @@ -60,6 +60,7 @@ public: // Pure virtual base class methods virtual void clear(void) = 0; virtual GModelSpatialDiffuse* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const GPhoton& photon) const = 0; virtual double eval_gradients(const GPhoton& photon) const = 0; diff --git a/include/GModelSpatialDiffuseConst.hpp b/include/GModelSpatialDiffuseConst.hpp index 7f34f8a..7d405fb 100644 --- a/include/GModelSpatialDiffuseConst.hpp +++ b/include/GModelSpatialDiffuseConst.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialDiffuseConst.hpp - Spatial isotropic model class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpatialDiffuseConst* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GPhoton& photon) const; virtual double eval_gradients(const GPhoton& photon) const; @@ -88,6 +89,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialDiffuseConst"). + ***************************************************************************/ +inline +std::string GModelSpatialDiffuseConst::classname(void) const +{ + return ("GModelSpatialDiffuseConst"); +} + + +/***********************************************************************//** * @brief Return spatial model type * * @return "ConstantValue". diff --git a/include/GModelSpatialDiffuseCube.hpp b/include/GModelSpatialDiffuseCube.hpp index 6cd4983..ba0001b 100644 --- a/include/GModelSpatialDiffuseCube.hpp +++ b/include/GModelSpatialDiffuseCube.hpp @@ -71,6 +71,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpatialDiffuseCube* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GPhoton& photon) const; virtual double eval_gradients(const GPhoton& photon) const; @@ -123,6 +124,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialDiffuseCube"). + ***************************************************************************/ +inline +std::string GModelSpatialDiffuseCube::classname(void) const +{ + return ("GModelSpatialDiffuseCube"); +} + + +/***********************************************************************//** * @brief Return spatial model type * * @return "MapCubeFunction". diff --git a/include/GModelSpatialDiffuseMap.hpp b/include/GModelSpatialDiffuseMap.hpp index b3add27..508e645 100644 --- a/include/GModelSpatialDiffuseMap.hpp +++ b/include/GModelSpatialDiffuseMap.hpp @@ -66,6 +66,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpatialDiffuseMap* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GPhoton& photon) const; virtual double eval_gradients(const GPhoton& photon) const; @@ -103,6 +104,19 @@ protected: double m_norm; //!< Map normalization }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialDiffuseMap"). + ***************************************************************************/ +inline +std::string GModelSpatialDiffuseMap::classname(void) const +{ + return ("GModelSpatialDiffuseMap"); +} + + /***********************************************************************//** * @brief Return spatial model type * diff --git a/include/GModelSpatialElliptical.hpp b/include/GModelSpatialElliptical.hpp index bee917b..813f6c8 100644 --- a/include/GModelSpatialElliptical.hpp +++ b/include/GModelSpatialElliptical.hpp @@ -64,6 +64,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModelSpatialElliptical* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const double& theta, const double& posangle, diff --git a/include/GModelSpatialEllipticalDisk.hpp b/include/GModelSpatialEllipticalDisk.hpp index 1c7e230..0f67563 100644 --- a/include/GModelSpatialEllipticalDisk.hpp +++ b/include/GModelSpatialEllipticalDisk.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialEllipticalDisk.hpp - Elliptical disk source model class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Michael Mayer * + * copyright (C) 2013-2014 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpatialEllipticalDisk* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& theta, const double& posangle, @@ -107,6 +108,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialEllipticalDisk"). + ***************************************************************************/ +inline +std::string GModelSpatialEllipticalDisk::classname(void) const +{ + return ("GModelSpatialEllipticalDisk"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "EllipticalDisk". diff --git a/include/GModelSpatialPointSource.hpp b/include/GModelSpatialPointSource.hpp index e9ee353..9fa2b3b 100644 --- a/include/GModelSpatialPointSource.hpp +++ b/include/GModelSpatialPointSource.hpp @@ -63,6 +63,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpatialPointSource* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual GClassCode code(void) const; virtual double eval(const GPhoton& photon) const; @@ -97,6 +98,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialPointSource"). + ***************************************************************************/ +inline +std::string GModelSpatialPointSource::classname(void) const +{ + return ("GModelSpatialPointSource"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "SkyDirFunction". diff --git a/include/GModelSpatialRadial.hpp b/include/GModelSpatialRadial.hpp index c397a78..65a1bc9 100644 --- a/include/GModelSpatialRadial.hpp +++ b/include/GModelSpatialRadial.hpp @@ -64,6 +64,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModelSpatialRadial* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const double& theta, const GEnergy& energy, diff --git a/include/GModelSpatialRadialDisk.hpp b/include/GModelSpatialRadialDisk.hpp index c544366..1cbb060 100644 --- a/include/GModelSpatialRadialDisk.hpp +++ b/include/GModelSpatialRadialDisk.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialRadialDisk.hpp - Radial disk source model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Christoph Deil * + * copyright (C) 2011-2014 by Christoph Deil * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpatialRadialDisk* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& theta, const GEnergy& energy, @@ -97,6 +98,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialRadialDisk"). + ***************************************************************************/ +inline +std::string GModelSpatialRadialDisk::classname(void) const +{ + return ("GModelSpatialRadialDisk"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "DiskFunction". diff --git a/include/GModelSpatialRadialGauss.hpp b/include/GModelSpatialRadialGauss.hpp index effafdb..c6aae62 100644 --- a/include/GModelSpatialRadialGauss.hpp +++ b/include/GModelSpatialRadialGauss.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialRadialGauss.hpp - Radial Gaussian source model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -61,6 +61,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpatialRadialGauss* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& theta, const GEnergy& energy, @@ -92,6 +93,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialRadialGauss"). + ***************************************************************************/ +inline +std::string GModelSpatialRadialGauss::classname(void) const +{ + return ("GModelSpatialRadialGauss"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "GaussFunction". diff --git a/include/GModelSpatialRadialShell.hpp b/include/GModelSpatialRadialShell.hpp index 98b90ee..c925edc 100644 --- a/include/GModelSpatialRadialShell.hpp +++ b/include/GModelSpatialRadialShell.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialRadialShell.hpp - Radial shell source model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Christoph Deil * + * copyright (C) 2011-2014 by Christoph Deil * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -73,6 +73,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpatialRadialShell* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& theta, const GEnergy& energy, @@ -122,6 +123,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialRadialShell"). + ***************************************************************************/ +inline +std::string GModelSpatialRadialShell::classname(void) const +{ + return ("GModelSpatialRadialShell"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "ShellFunction". diff --git a/include/GModelSpatialRegistry.hpp b/include/GModelSpatialRegistry.hpp index 802684f..e2073a1 100644 --- a/include/GModelSpatialRegistry.hpp +++ b/include/GModelSpatialRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpatialRegistry.hpp - Spatial model registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GModelSpatialRegistry& operator=(const GModelSpatialRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GModelSpatial* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -98,6 +99,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpatialRegistry"). + ***************************************************************************/ +inline +std::string GModelSpatialRegistry::classname(void) const +{ + return ("GModelSpatialRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/include/GModelSpectral.hpp b/include/GModelSpectral.hpp index 2681124..ee55724 100644 --- a/include/GModelSpectral.hpp +++ b/include/GModelSpectral.hpp @@ -81,6 +81,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GModelSpectral* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const = 0; diff --git a/include/GModelSpectralBrokenPlaw.hpp b/include/GModelSpectralBrokenPlaw.hpp index 523dcbe..e2c800c 100644 --- a/include/GModelSpectralBrokenPlaw.hpp +++ b/include/GModelSpectralBrokenPlaw.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralBrokenPlaw.hpp - Broken power law spectrum class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Anneli Schulz * + * copyright (C) 2013-2014 by Anneli Schulz * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -72,6 +72,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpectralBrokenPlaw* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -135,6 +136,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralBrokenPlaw"). + ***************************************************************************/ +inline +std::string GModelSpectralBrokenPlaw::classname(void) const +{ + return ("GModelSpectralBrokenPlaw"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "PowerLaw". diff --git a/include/GModelSpectralConst.hpp b/include/GModelSpectralConst.hpp index 3854028..0529ebb 100644 --- a/include/GModelSpectralConst.hpp +++ b/include/GModelSpectralConst.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralConst.hpp - Spectral constant model class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -66,6 +66,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralConst* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -99,6 +100,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralConst"). + ***************************************************************************/ +inline +std::string GModelSpectralConst::classname(void) const +{ + return ("GModelSpectralConst"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "ConstantValue". diff --git a/include/GModelSpectralExpPlaw.hpp b/include/GModelSpectralExpPlaw.hpp index c8f4ac5..bcede29 100644 --- a/include/GModelSpectralExpPlaw.hpp +++ b/include/GModelSpectralExpPlaw.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralExpPlaw.hpp - Exponential cut off power law model * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -75,6 +75,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpectralExpPlaw* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -171,6 +172,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralExpPlaw"). + ***************************************************************************/ +inline +std::string GModelSpectralExpPlaw::classname(void) const +{ + return ("GModelSpectralExpPlaw"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "ExpCutoff". diff --git a/include/GModelSpectralFunc.hpp b/include/GModelSpectralFunc.hpp index 0d5dae3..85fa534 100644 --- a/include/GModelSpectralFunc.hpp +++ b/include/GModelSpectralFunc.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralFunc.hpp - Spectral function model class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -69,6 +69,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralFunc* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -127,6 +128,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralFunc"). + ***************************************************************************/ +inline +std::string GModelSpectralFunc::classname(void) const +{ + return ("GModelSpectralFunc"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "FileFunction". diff --git a/include/GModelSpectralGauss.hpp b/include/GModelSpectralGauss.hpp index 8173efe..a3f1fc8 100644 --- a/include/GModelSpectralGauss.hpp +++ b/include/GModelSpectralGauss.hpp @@ -72,6 +72,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralGauss* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -128,6 +129,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralGauss"). + ***************************************************************************/ +inline +std::string GModelSpectralGauss::classname(void) const +{ + return ("GModelSpectralGauss"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "ConstantValue". diff --git a/include/GModelSpectralLogParabola.hpp b/include/GModelSpectralLogParabola.hpp index 2586404..3adc0d8 100644 --- a/include/GModelSpectralLogParabola.hpp +++ b/include/GModelSpectralLogParabola.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralLogParabola.hpp - Log parabola spectral model class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Michael Mayer * + * copyright (C) 2012-2014 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -77,6 +77,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralLogParabola* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -184,6 +185,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralLogParabola"). + ***************************************************************************/ +inline +std::string GModelSpectralLogParabola::classname(void) const +{ + return ("GModelSpectralLogParabola"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "LogParabola". diff --git a/include/GModelSpectralNodes.hpp b/include/GModelSpectralNodes.hpp index bf9ae71..4d84f6c 100644 --- a/include/GModelSpectralNodes.hpp +++ b/include/GModelSpectralNodes.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralNodes.hpp - Spectral nodes model class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -91,6 +91,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralNodes* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -165,6 +166,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralNodes"). + ***************************************************************************/ +inline +std::string GModelSpectralNodes::classname(void) const +{ + return ("GModelSpectralNodes"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "NodeFunction". diff --git a/include/GModelSpectralPlaw.hpp b/include/GModelSpectralPlaw.hpp index f59a9e2..45254df 100644 --- a/include/GModelSpectralPlaw.hpp +++ b/include/GModelSpectralPlaw.hpp @@ -70,6 +70,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpectralPlaw* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -125,6 +126,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralPlaw"). + ***************************************************************************/ +inline +std::string GModelSpectralPlaw::classname(void) const +{ + return ("GModelSpectralPlaw"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "PowerLaw". diff --git a/include/GModelSpectralPlaw2.hpp b/include/GModelSpectralPlaw2.hpp index 5625610..99fdc85 100644 --- a/include/GModelSpectralPlaw2.hpp +++ b/include/GModelSpectralPlaw2.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralPlaw2.hpp - Spectral power law model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -85,6 +85,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GModelSpectralPlaw2* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -145,6 +146,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralPlaw2"). + ***************************************************************************/ +inline +std::string GModelSpectralPlaw2::classname(void) const +{ + return ("GModelSpectralPlaw2"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "PowerLaw2". diff --git a/include/GModelSpectralRegistry.hpp b/include/GModelSpectralRegistry.hpp index dae0fcd..a7e6577 100644 --- a/include/GModelSpectralRegistry.hpp +++ b/include/GModelSpectralRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelSpectralRegistry.hpp - Spectral model registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GModelSpectralRegistry& operator=(const GModelSpectralRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GModelSpectral* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -98,6 +99,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralRegistry"). + ***************************************************************************/ +inline +std::string GModelSpectralRegistry::classname(void) const +{ + return ("GModelSpectralRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/include/GModelSpectralSuperExpPlaw.hpp b/include/GModelSpectralSuperExpPlaw.hpp index 3b90ae5..6081626 100644 --- a/include/GModelSpectralSuperExpPlaw.hpp +++ b/include/GModelSpectralSuperExpPlaw.hpp @@ -78,6 +78,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GModelSpectralSuperExpPlaw* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GEnergy& srcEng, const GTime& srcTime) const; @@ -185,6 +186,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelSpectralSuperExpPlaw"). + ***************************************************************************/ +inline +std::string GModelSpectralSuperExpPlaw::classname(void) const +{ + return ("GModelSpectralSuperExpPlaw"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "SuperExpCutoff". diff --git a/include/GModelTemporal.hpp b/include/GModelTemporal.hpp index 33b3a07..9800a63 100644 --- a/include/GModelTemporal.hpp +++ b/include/GModelTemporal.hpp @@ -66,6 +66,7 @@ public: // Virtual methods virtual void clear(void) = 0; virtual GModelTemporal* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const GTime& srcTime) const = 0; virtual double eval_gradients(const GTime& srcTime) = 0; diff --git a/include/GModelTemporalConst.hpp b/include/GModelTemporalConst.hpp index 3004e85..5e4dd49 100644 --- a/include/GModelTemporalConst.hpp +++ b/include/GModelTemporalConst.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelTemporalConst.hpp - Temporal constant model class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -67,6 +67,7 @@ public: // Implemented virtual base class methods virtual void clear(void); virtual GModelTemporalConst* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const GTime& srcTime) const; virtual double eval_gradients(const GTime& srcTime); @@ -92,6 +93,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelTemporalConst"). + ***************************************************************************/ +inline +std::string GModelTemporalConst::classname(void) const +{ + return ("GModelTemporalConst"); +} + + +/***********************************************************************//** * @brief Return model type * * @return "ConstantValue". diff --git a/include/GModelTemporalRegistry.hpp b/include/GModelTemporalRegistry.hpp index 0d71579..a1247d9 100644 --- a/include/GModelTemporalRegistry.hpp +++ b/include/GModelTemporalRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModelTemporalRegistry.hpp - Temporal model registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GModelTemporalRegistry& operator=(const GModelTemporalRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GModelTemporal* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -98,6 +99,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModelTemporalRegistry"). + ***************************************************************************/ +inline +std::string GModelTemporalRegistry::classname(void) const +{ + return ("GModelTemporalRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/include/GModels.hpp b/include/GModels.hpp index fd0b2a9..dc248c7 100644 --- a/include/GModels.hpp +++ b/include/GModels.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GModels.hpp - Model container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -161,6 +161,7 @@ public: // Methods void clear(void); GModels* clone(void) const; + std::string classname(void) const; GModel* at(const int& index); const GModel* at(const int& index) const; int size(void) const; @@ -198,6 +199,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GModels"). + ***************************************************************************/ +inline +std::string GModels::classname(void) const +{ + return ("GModels"); +} + + +/***********************************************************************//** * @brief Return pointer to model * * @param[in] index Model index [0,...,size()-1]. diff --git a/include/GNodeArray.hpp b/include/GNodeArray.hpp index 548589f..43191fc 100644 --- a/include/GNodeArray.hpp +++ b/include/GNodeArray.hpp @@ -73,6 +73,7 @@ public: // Methods void clear(void); GNodeArray* clone(void) const; + std::string classname(void) const; double& at(const int& index); const double& at(const int& index) const; int size(void) const; @@ -127,6 +128,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GNodeArray"). + ***************************************************************************/ +inline +std::string GNodeArray::classname(void) const +{ + return ("GNodeArray"); +} + + +/***********************************************************************//** * @brief Node access operator * * @param[in] index Node index [0,...,size()-1]. diff --git a/include/GObservation.hpp b/include/GObservation.hpp index b875086..319bfe2 100644 --- a/include/GObservation.hpp +++ b/include/GObservation.hpp @@ -76,7 +76,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GObservation* clone(void) const = 0; - virtual std::string type(void) const = 0; + virtual std::string classname(void) const = 0; virtual void response(const GResponse& rsp) = 0; virtual const GResponse* response(void) const = 0; virtual std::string instrument(void) const = 0; diff --git a/include/GObservationRegistry.hpp b/include/GObservationRegistry.hpp index 46f9d30..ae7d6e9 100644 --- a/include/GObservationRegistry.hpp +++ b/include/GObservationRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GObservationRegistry.hpp - Observation registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -64,6 +64,7 @@ public: GObservationRegistry& operator= (const GObservationRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GObservation* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -99,6 +100,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GObservationRegistry"). + ***************************************************************************/ +inline +std::string GObservationRegistry::classname(void) const +{ + return ("GObservationRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered observations * * @return Number of registered observations. diff --git a/include/GObservations.hpp b/include/GObservations.hpp index 03ac448..c7f5185 100644 --- a/include/GObservations.hpp +++ b/include/GObservations.hpp @@ -104,6 +104,7 @@ public: // Methods void clear(void); GObservations* clone(void) const; + std::string classname(void) const; GObservation* at(const int& index); const GObservation* at(const int& index) const; int size(void) const; @@ -184,6 +185,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GObservations"). + ***************************************************************************/ +inline +std::string GObservations::classname(void) const +{ + return ("GObservations"); +} + + +/***********************************************************************//** * @brief Return pointer to observation * * @param[in] index Observation index [0,...,size()-1]. diff --git a/include/GOptimizer.hpp b/include/GOptimizer.hpp index b8a6f77..892b964 100644 --- a/include/GOptimizer.hpp +++ b/include/GOptimizer.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GOptimizer.hpp - Abstract base class for optimizer * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GOptimizer* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void optimize(GOptimizerFunction& fct, GOptimizerPars& pars) = 0; virtual double value(void) const = 0; virtual int status(void) const = 0; diff --git a/include/GOptimizerLM.hpp b/include/GOptimizerLM.hpp index d2be463..09a86e7 100644 --- a/include/GOptimizerLM.hpp +++ b/include/GOptimizerLM.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GOptimizerLM.hpp - Levenberg Marquardt optimizer * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -64,6 +64,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GOptimizerLM* clone(void) const; + virtual std::string classname(void) const; virtual void optimize(GOptimizerFunction& fct, GOptimizerPars& pars); virtual double value(void) const { return m_value; } //!< @brief Return function value virtual int status(void) const { return m_status; } //!< @brief Return optimization status @@ -121,4 +122,16 @@ protected: }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GOptimizerLM"). + ***************************************************************************/ +inline +std::string GOptimizerLM::classname(void) const +{ + return ("GOptimizerLM"); +} + #endif /* GOPTIMIZERLM_HPP */ diff --git a/include/GOptimizerPar.hpp b/include/GOptimizerPar.hpp index 77ceab8..e374e6b 100644 --- a/include/GOptimizerPar.hpp +++ b/include/GOptimizerPar.hpp @@ -147,6 +147,7 @@ public: // Other methods void clear(void); GOptimizerPar* clone(void) const; + std::string classname(void) const; const std::string& name(void) const; const std::string& unit(void) const; void name(const std::string& name); @@ -177,6 +178,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GOptimizerPar"). + ***************************************************************************/ +inline +std::string GOptimizerPar::classname(void) const +{ + return ("GOptimizerPar"); +} + + +/***********************************************************************//** * @brief Return parameter value * * @return Parameter value. diff --git a/include/GOptimizerPars.hpp b/include/GOptimizerPars.hpp index ac8f51f..16f066a 100644 --- a/include/GOptimizerPars.hpp +++ b/include/GOptimizerPars.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GOptimizerPars.hpp - Optimizer parameter container class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -67,6 +67,7 @@ public: // Methods void clear(void); GOptimizerPars* clone(void) const; + std::string classname(void) const; GOptimizerPar* at(const int& index); const GOptimizerPar* at(const int& index) const; int size(void) const; @@ -100,6 +101,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GOptimizerPars"). + ***************************************************************************/ +inline +std::string GOptimizerPars::classname(void) const +{ + return ("GOptimizerPars"); +} + + +/***********************************************************************//** * @brief Return pointer to parameter * * @param[in] index Parameter index [0,...,size()-1]. diff --git a/include/GPha.hpp b/include/GPha.hpp index 28ce207..7c7657e 100644 --- a/include/GPha.hpp +++ b/include/GPha.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GPha.hpp - XSPEC Pulse Height Analyzer class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -70,6 +70,7 @@ public: // Methods void clear(void); GPha* clone(void) const; + std::string classname(void) const; int size(void) const; double& at(const int& index); const double& at(const int& index) const; @@ -104,6 +105,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GPha"). + ***************************************************************************/ +inline +std::string GPha::classname(void) const +{ + return ("GPha"); +} + + +/***********************************************************************//** * @brief Return content of spectral bin * * @param[in] index Bin index [0,...,size()-1]. diff --git a/include/GPhoton.hpp b/include/GPhoton.hpp index c34640d..c8e120e 100644 --- a/include/GPhoton.hpp +++ b/include/GPhoton.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GPhoton.hpp - Photon class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -64,6 +64,7 @@ public: // Methods void clear(void); GPhoton* clone(void) const; + std::string classname(void) const; const GSkyDir& dir(void) const; const GEnergy& energy(void) const; const GTime& time(void) const; @@ -89,6 +90,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GPhoton"). + ***************************************************************************/ +inline +std::string GPhoton::classname(void) const +{ + return ("GPhoton"); +} + + +/***********************************************************************//** * @brief Return photon sky direction * * @return Sky direction of photon. diff --git a/include/GPhotons.hpp b/include/GPhotons.hpp index 8cc63d2..dc68323 100644 --- a/include/GPhotons.hpp +++ b/include/GPhotons.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GPhotons.hpp - Photon container class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Methods void clear(void); GPhotons* clone(void) const; + std::string classname(void) const; int size(void) const; bool is_empty(void) const; void append(const GPhoton& photon); @@ -79,6 +80,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GPhotons"). + ***************************************************************************/ +inline +std::string GPhotons::classname(void) const +{ + return ("GPhotons"); +} + + +/***********************************************************************//** * @brief Return number of photons * * @return Number of photons. diff --git a/include/GRan.hpp b/include/GRan.hpp index 800d607..a354da8 100644 --- a/include/GRan.hpp +++ b/include/GRan.hpp @@ -56,6 +56,7 @@ public: // Methods void clear(void); GRan* clone(void) const; + std::string classname(void) const; void seed(unsigned long long int seed); unsigned long long int seed(void) const; unsigned long int int32(void); @@ -90,6 +91,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GRan"). + ***************************************************************************/ +inline +std::string GRan::classname(void) const +{ + return ("GRan"); +} + + +/***********************************************************************//** * @brief Return seed value * * @return Seed value. diff --git a/include/GRegistry.hpp b/include/GRegistry.hpp index 7dd0160..8bcf57b 100644 --- a/include/GRegistry.hpp +++ b/include/GRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GRegistry.hpp - Interface class for registries * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -106,6 +106,14 @@ public: /// Destroys class. virtual ~GRegistry(void) {} + /// @brief Return class name + /// + /// @return String containing the class name. + /// + /// Returns the class name for non-abstract classes in a human readable + /// way. + virtual std::string classname(void) const = 0; + /// @brief Return number of classes in registry /// /// Returns the number of classes that have been registered in the diff --git a/include/GResponse.hpp b/include/GResponse.hpp index 9c1dd75..1f66533 100644 --- a/include/GResponse.hpp +++ b/include/GResponse.hpp @@ -73,6 +73,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GResponse* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual bool use_edisp(void) const = 0; virtual bool use_tdisp(void) const = 0; virtual double irf(const GEvent& event, diff --git a/include/GRmf.hpp b/include/GRmf.hpp index 5f959a9..e7d1fdf 100644 --- a/include/GRmf.hpp +++ b/include/GRmf.hpp @@ -61,6 +61,7 @@ public: // Methods void clear(void); GRmf* clone(void) const; + std::string classname(void) const; int size(void) const; int ntrue(void) const; int nmeasured(void) const; @@ -97,6 +98,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GRmf"). + ***************************************************************************/ +inline +std::string GRmf::classname(void) const +{ + return ("GRmf"); +} + + +/***********************************************************************//** * @brief Return content of redistribution matrix bin * * @param[in] itrue True energy index [0,...,ntrue()-1]. diff --git a/include/GRoi.hpp b/include/GRoi.hpp index d42b5a1..9902305 100644 --- a/include/GRoi.hpp +++ b/include/GRoi.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GRoi.hpp - Abstract Region of interest base class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GRoi* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual bool contains(const GEvent& event) const = 0; virtual std::string print(const GChatter& chatter = NORMAL) const = 0; diff --git a/include/GSkyDir.hpp b/include/GSkyDir.hpp index c584083..8127284 100644 --- a/include/GSkyDir.hpp +++ b/include/GSkyDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyDir.hpp - Sky direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Methods void clear(void); GSkyDir* clone(void) const; + std::string classname(void) const; void radec(const double& ra, const double& dec); void radec_deg(const double& ra, const double& dec); void lb(const double& l, const double& b); @@ -120,6 +121,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSkyDir"). + ***************************************************************************/ +inline +std::string GSkyDir::classname(void) const +{ + return ("GSkyDir"); +} + + +/***********************************************************************//** * @brief Return galactic longitude in radians * * @return Galactic longitude in radians. diff --git a/include/GSkyPixel.hpp b/include/GSkyPixel.hpp index 17ab468..b649412 100644 --- a/include/GSkyPixel.hpp +++ b/include/GSkyPixel.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyPixel.hpp - Sky map pixel class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -91,6 +91,7 @@ public: // Methods void clear(void); GSkyPixel* clone(void) const; + std::string classname(void) const; int size(void) const; bool is_1D(void) const; bool is_2D(void) const; @@ -117,6 +118,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSkyPixel"). + ***************************************************************************/ +inline +std::string GSkyPixel::classname(void) const +{ + return ("GSkyPixel"); +} + + +/***********************************************************************//** * @brief Return pixel dimension * * @return Pixel dimension [0,1,2]. diff --git a/include/GSkyProjection.hpp b/include/GSkyProjection.hpp index 8f4131d..49e8821 100644 --- a/include/GSkyProjection.hpp +++ b/include/GSkyProjection.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyProjection.hpp - Abstract sky projection base class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GSkyProjection* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual int size(void) const = 0; virtual std::string code(void) const = 0; virtual std::string name(void) const = 0; diff --git a/include/GSkyRegion.hpp b/include/GSkyRegion.hpp index db5c5ab..652f91d 100644 --- a/include/GSkyRegion.hpp +++ b/include/GSkyRegion.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyRegion.hpp - Abstract virtual sky region base class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Pierrick Martin * + * copyright (C) 2013-2014 by Pierrick Martin * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GSkyRegion* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void read(const std::string& regstring) = 0; virtual std::string write(void) const = 0; virtual bool contains(const GSkyDir& dir) const = 0; diff --git a/include/GSkyRegionCircle.hpp b/include/GSkyRegionCircle.hpp index 3da9413..41de91d 100644 --- a/include/GSkyRegionCircle.hpp +++ b/include/GSkyRegionCircle.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyRegionCircle.hpp - circular sky region class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Michael Mayer * + * copyright (C) 2013-2014 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -72,6 +72,7 @@ public: // Implemented methods void clear(void); GSkyRegionCircle* clone(void) const; + std::string classname(void) const; const double& radius(void) const; void radius(const double& radius); const GSkyDir& centre(void) const; @@ -100,6 +101,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSkyRegionCircle"). + ***************************************************************************/ +inline +std::string GSkyRegionCircle::classname(void) const +{ + return ("GSkyRegionCircle"); +} + + +/***********************************************************************//** * @brief Return circular region radius (in degrees) * * @return Region radius [deg]. diff --git a/include/GSkyRegions.hpp b/include/GSkyRegions.hpp index 813ce58..d99ae2c 100644 --- a/include/GSkyRegions.hpp +++ b/include/GSkyRegions.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSkyRegions.hpp - Sky region container class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Pierrick Martin * + * copyright (C) 2013-2014 by Pierrick Martin * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -69,6 +69,7 @@ public: // Methods void clear(void); GSkyRegions* clone(void) const; + std::string classname(void) const; GSkyRegion* at(const int& index); const GSkyRegion* at(const int& index) const; int size(void) const; @@ -104,6 +105,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSkyRegions"). + ***************************************************************************/ +inline +std::string GSkyRegions::classname(void) const +{ + return ("GSkyRegions"); +} + + +/***********************************************************************//** * @brief Return pointer to region * * @param[in] index region index [0,...,size()-1]. diff --git a/include/GSkymap.hpp b/include/GSkymap.hpp index ecd0dc3..0ee8ea7 100644 --- a/include/GSkymap.hpp +++ b/include/GSkymap.hpp @@ -116,6 +116,7 @@ public: // Methods void clear(void); GSkymap* clone(void) const; + std::string classname(void) const; const int& npix(void) const; const int& nx(void) const; const int& ny(void) const; @@ -180,6 +181,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSkymap"). + ***************************************************************************/ +inline +std::string GSkymap::classname(void) const +{ + return ("GSkymap"); +} + + +/***********************************************************************//** * @brief Returns number of pixels * * @return Number of pixels in one sky map. diff --git a/include/GSource.hpp b/include/GSource.hpp index 76744b9..eecf947 100644 --- a/include/GSource.hpp +++ b/include/GSource.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GSource.hpp - Source class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Methods void clear(void); GSource* clone(void) const; + std::string classname(void) const; const std::string& name(void) const; const GModelSpatial* model(void) const; const GEnergy& energy(void) const; @@ -93,6 +94,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GSource"). + ***************************************************************************/ +inline +std::string GSource::classname(void) const +{ + return ("GSource"); +} + + +/***********************************************************************//** * @brief Return model name * * @return Model name. diff --git a/include/GTestCase.hpp b/include/GTestCase.hpp index 9905d6d..94b4d9e 100644 --- a/include/GTestCase.hpp +++ b/include/GTestCase.hpp @@ -65,6 +65,7 @@ public: // Methods void clear(void); GTestCase* clone(void) const; + std::string classname(void) const; const std::string& name(void) const; void name(const std::string& name); const std::string& message(void) const; @@ -96,6 +97,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GTestCase"). + ***************************************************************************/ +inline +std::string GTestCase::classname(void) const +{ + return ("GTestCase"); +} + + +/***********************************************************************//** * @brief Return test case name * * @return Test case name. diff --git a/include/GTestSuite.hpp b/include/GTestSuite.hpp index 38dc142..fb2f45a 100644 --- a/include/GTestSuite.hpp +++ b/include/GTestSuite.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestSuite.hpp - Abstract test suite base class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Pure virtual methods virtual GTestSuite* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void set(void) = 0; // Other methods diff --git a/include/GTestSuites.hpp b/include/GTestSuites.hpp index b1b66da..cdf06bd 100644 --- a/include/GTestSuites.hpp +++ b/include/GTestSuites.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestSuites.hpp - Test suite container class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -64,6 +64,7 @@ public: // Methods void clear(void); GTestSuites* clone(void) const; + std::string classname(void) const; GTestSuite* at(const int& index); const GTestSuite* at(const int& index) const; int size(void) const; @@ -101,6 +102,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GTestSuites"). + ***************************************************************************/ +inline +std::string GTestSuites::classname(void) const +{ + return ("GTestSuites"); +} + + +/***********************************************************************//** * @brief Returns pointer to test suite * * @param[in] index Test suite index [0,...,size()-1]. diff --git a/include/GTime.hpp b/include/GTime.hpp index 9f8b71a..0b2a389 100644 --- a/include/GTime.hpp +++ b/include/GTime.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTime.hpp - Time class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -78,6 +78,7 @@ public: // Methods void clear(void); GTime* clone(void) const; + std::string classname(void) const; double jd(void) const; double mjd(void) const; const double& secs(void) const; @@ -103,6 +104,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GTime"). + ***************************************************************************/ +inline +std::string GTime::classname(void) const +{ + return ("GTime"); +} + + +/***********************************************************************//** * @brief Return time in native reference (TT) (unit: seconds) * * @return Time in native reference [seconds]. diff --git a/include/GTimeReference.hpp b/include/GTimeReference.hpp index 31dd75d..6f3a52a 100644 --- a/include/GTimeReference.hpp +++ b/include/GTimeReference.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTimeReference.hpp - Time reference class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -74,6 +74,7 @@ public: // Methods void clear(void); GTimeReference* clone(void) const; + std::string classname(void) const; void read(const GFitsHDU& hdu); void write(GFitsHDU& hdu) const; void set(const double& mrdref, @@ -108,4 +109,16 @@ protected: bool m_unit_sec; //!< True: unit is seconds, False: unit is days }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GTimeReference"). + ***************************************************************************/ +inline +std::string GTimeReference::classname(void) const +{ + return ("GTimeReference"); +} + #endif /* GTIMEREFERENCE_HPP */ diff --git a/include/GTimes.hpp b/include/GTimes.hpp index 4501898..c3ce558 100644 --- a/include/GTimes.hpp +++ b/include/GTimes.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTimes.hpp - Time container class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Methods void clear(void); GTimes* clone(void) const; + std::string classname(void) const; int size(void) const; bool is_empty(void) const; void append(const GTime& time); @@ -79,6 +80,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GTimes"). + ***************************************************************************/ +inline +std::string GTimes::classname(void) const +{ + return ("GTimes"); +} + + +/***********************************************************************//** * @brief Return number of times * * @return Number of times. diff --git a/include/GUrl.hpp b/include/GUrl.hpp index 8b7b52d..c3173b7 100644 --- a/include/GUrl.hpp +++ b/include/GUrl.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GUrl.hpp - Abstract URL base class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -55,6 +55,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GUrl* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void open(const std::string& url, const std::string& mode) = 0; virtual void close(void) = 0; virtual int read(void* buffer, const int& nbyte) = 0; diff --git a/include/GUrlFile.hpp b/include/GUrlFile.hpp index ee54ed3..d7c1b46 100644 --- a/include/GUrlFile.hpp +++ b/include/GUrlFile.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GUrlFile.hpp - File URL class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -53,6 +53,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GUrlFile* clone(void) const; + virtual std::string classname(void) const; virtual void open(const std::string& url, const std::string& mode); virtual void close(void); virtual int read(void* buffer, const int& nbyte); @@ -75,4 +76,16 @@ protected: FILE* m_fptr; //!< File pointer }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GUrlFile"). + ***************************************************************************/ +inline +std::string GUrlFile::classname(void) const +{ + return ("GUrlFile"); +} + #endif /* GURLFILE_HPP */ diff --git a/include/GUrlString.hpp b/include/GUrlString.hpp index efde294..17c773a 100644 --- a/include/GUrlString.hpp +++ b/include/GUrlString.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GUrlString.hpp - String URL class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -54,6 +54,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GUrlString* clone(void) const; + virtual std::string classname(void) const; virtual void open(const std::string& string, const std::string& mode = ""); virtual void close(void); virtual int read(void* buffer, const int& nbyte); @@ -79,4 +80,16 @@ protected: std::string m_buffer; //!< Text string }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GUrlString"). + ***************************************************************************/ +inline +std::string GUrlString::classname(void) const +{ + return ("GUrlString"); +} + #endif /* GURLSTRING_HPP */ diff --git a/include/GVOClient.hpp b/include/GVOClient.hpp index a7d3cf8..f115a44 100644 --- a/include/GVOClient.hpp +++ b/include/GVOClient.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GVOClient.hpp - VO client class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Methods void clear(void); GVOClient* clone(void) const; + std::string classname(void) const; void connect(void); void disconnect(void); bool has_hub(void) const; @@ -101,4 +102,16 @@ protected: int m_socket; //!< Hub socket }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GVOClient"). + ***************************************************************************/ +inline +std::string GVOClient::classname(void) const +{ + return ("GVOClient"); +} + #endif /* GVOCLIENT_HPP */ diff --git a/include/GVector.hpp b/include/GVector.hpp index 1566aa6..a640c21 100644 --- a/include/GVector.hpp +++ b/include/GVector.hpp @@ -104,6 +104,7 @@ public: // Vector methods void clear(void); GVector* clone(void) const; + std::string classname(void) const; const int& size(void) const; double& at(const int& index); const double& at(const int& index) const; @@ -129,6 +130,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GVector"). + ***************************************************************************/ +inline +std::string GVector::classname(void) const +{ + return ("GVector"); +} + + +/***********************************************************************//** * @brief Vector element access operator * * @param[in] index Element index [0,...,size()-1] diff --git a/include/GWcs.hpp b/include/GWcs.hpp index 1935a6d..47b6e8b 100644 --- a/include/GWcs.hpp +++ b/include/GWcs.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcs.hpp - Abstract world coordinate system base class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual base class methods virtual void clear(void) = 0; virtual GWcs* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string code(void) const = 0; virtual std::string name(void) const = 0; virtual std::string print(const GChatter& chatter = NORMAL) const = 0; diff --git a/include/GWcsAIT.hpp b/include/GWcsAIT.hpp index fd8c314..53ac5ea 100644 --- a/include/GWcsAIT.hpp +++ b/include/GWcsAIT.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsAIT.hpp - Aitoff (AIT) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsAIT* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsAIT"). + ***************************************************************************/ +inline +std::string GWcsAIT::classname(void) const +{ + return ("GWcsAIT"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GWcsAZP.hpp b/include/GWcsAZP.hpp index 3c7034f..9d18f54 100644 --- a/include/GWcsAZP.hpp +++ b/include/GWcsAZP.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsAZP.hpp - Zenithal/azimuthal perspective (AZP) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsAZP* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsAZP"). + ***************************************************************************/ +inline +std::string GWcsAZP::classname(void) const +{ + return ("GWcsAZP"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GWcsCAR.hpp b/include/GWcsCAR.hpp index 50df004..b7ed4af 100644 --- a/include/GWcsCAR.hpp +++ b/include/GWcsCAR.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsCAR.hpp - Plate carree (CAR) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsCAR* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsCAR"). + ***************************************************************************/ +inline +std::string GWcsCAR::classname(void) const +{ + return ("GWcsCAR"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GWcsMER.hpp b/include/GWcsMER.hpp index 1de50a3..96e5032 100644 --- a/include/GWcsMER.hpp +++ b/include/GWcsMER.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsMER.hpp - Mercator's (MER) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsMER* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsMER"). + ***************************************************************************/ +inline +std::string GWcsMER::classname(void) const +{ + return ("GWcsMER"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GWcsRegistry.hpp b/include/GWcsRegistry.hpp index 5b73aae..5de7715 100644 --- a/include/GWcsRegistry.hpp +++ b/include/GWcsRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsRegistry.hpp - World Coordinate Projection registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GWcsRegistry& operator=(const GWcsRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GWcs* alloc(const std::string& code) const; std::string code(const int& index) const; @@ -105,6 +106,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsRegistry"). + ***************************************************************************/ +inline +std::string GWcsRegistry::classname(void) const +{ + return ("GWcsRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/include/GWcsSTG.hpp b/include/GWcsSTG.hpp index e638d8a..3c6a58a 100644 --- a/include/GWcsSTG.hpp +++ b/include/GWcsSTG.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsSTG.hpp - Stereographic (STG) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsSTG* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsSTG"). + ***************************************************************************/ +inline +std::string GWcsSTG::classname(void) const +{ + return ("GWcsSTG"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GWcsTAN.hpp b/include/GWcsTAN.hpp index f0f99ba..1382d8b 100644 --- a/include/GWcsTAN.hpp +++ b/include/GWcsTAN.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GWcsTAN.hpp - Gnomonic (TAN) projection class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GWcsTAN* clone(void) const; + virtual std::string classname(void) const; virtual std::string code(void) const; virtual std::string name(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -78,6 +79,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GWcsTAN"). + ***************************************************************************/ +inline +std::string GWcsTAN::classname(void) const +{ + return ("GWcsTAN"); +} + + +/***********************************************************************//** * @brief Return projection code * * @return Projection code. diff --git a/include/GXml.hpp b/include/GXml.hpp index 3367513..2d9211a 100644 --- a/include/GXml.hpp +++ b/include/GXml.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXml.hpp - XML class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -190,6 +190,7 @@ public: // Methods void clear(void); GXml* clone(void) const; + std::string classname(void) const; int size(void) const { return m_root.size(); } bool is_empty(void) const { return m_root.is_empty(); } GXmlNode* set(const int& index, const GXmlNode& node); @@ -238,4 +239,16 @@ protected: GXmlDocument m_root; //!< Root document node }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXml"). + ***************************************************************************/ +inline +std::string GXml::classname(void) const +{ + return ("GXml"); +} + #endif /* GXML_HPP */ diff --git a/include/GXmlAttribute.hpp b/include/GXmlAttribute.hpp index cfd55be..a53e2fa 100644 --- a/include/GXmlAttribute.hpp +++ b/include/GXmlAttribute.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlAttribute.hpp - XML attribute class definition * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -66,6 +66,7 @@ public: // Methods void clear(void); GXmlAttribute* clone(void) const; + std::string classname(void) const; void write(GUrl& url) const; const std::string& name(void) const { return m_name; } std::string value(void) const; @@ -84,4 +85,16 @@ protected: std::string m_value; //!< Attribute value including hyphens }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlAttribute"). + ***************************************************************************/ +inline +std::string GXmlAttribute::classname(void) const +{ + return ("GXmlAttribute"); +} + #endif /* GXMLATTRIBUTE_HPP */ diff --git a/include/GXmlComment.hpp b/include/GXmlComment.hpp index 95ab0eb..5bd2d01 100644 --- a/include/GXmlComment.hpp +++ b/include/GXmlComment.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlComment.hpp - XML comment node class definition * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -56,6 +56,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GXmlComment* clone(void) const; + virtual std::string classname(void) const; virtual void write(GUrl& url, const int& indent = 0) const; virtual NodeType type(void) const { return NT_COMMENT; } virtual std::string print(const GChatter& chatter = NORMAL, @@ -76,4 +77,16 @@ protected: std::string m_comment; //!< Comment (excluding brackets) }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlComment"). + ***************************************************************************/ +inline +std::string GXmlComment::classname(void) const +{ + return ("GXmlComment"); +} + #endif /* GXMLCOMMENT_HPP */ diff --git a/include/GXmlDocument.hpp b/include/GXmlDocument.hpp index ac373e1..c255d3c 100644 --- a/include/GXmlDocument.hpp +++ b/include/GXmlDocument.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlDocument.hpp - XML document node class definition * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,12 +59,13 @@ public: GXmlDocument& operator=(const GXmlDocument& node); // Implemented pure virtual base class methods - void clear(void); - GXmlDocument* clone(void) const; - void write(GUrl& url, const int& indent = 0) const; - NodeType type(void) const { return NT_DOCUMENT; } - std::string print(const GChatter& chatter = NORMAL, - const int& indent = 0) const; + virtual void clear(void); + virtual GXmlDocument* clone(void) const; + virtual std::string classname(void) const; + virtual void write(GUrl& url, const int& indent = 0) const; + virtual NodeType type(void) const { return NT_DOCUMENT; } + virtual std::string print(const GChatter& chatter = NORMAL, + const int& indent = 0) const; // Methods std::string version(void) const { return m_version.value(); } @@ -86,4 +87,16 @@ protected: GXmlAttribute m_standalone; //!< Standalone ("yes", "no") }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlDocument"). + ***************************************************************************/ +inline +std::string GXmlDocument::classname(void) const +{ + return ("GXmlDocument"); +} + #endif /* GXMLDOCUMENT_HPP */ diff --git a/include/GXmlElement.hpp b/include/GXmlElement.hpp index c630147..6311a78 100644 --- a/include/GXmlElement.hpp +++ b/include/GXmlElement.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlElement.hpp - XML element node class definition * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Methods virtual void clear(void); virtual GXmlElement* clone(void) const; + virtual std::string classname(void) const; const std::string& name(void) const { return m_name; } void name(const std::string& name) { m_name=name; } std::string attribute(const std::string& name) const; @@ -87,4 +88,16 @@ protected: std::vector m_attr; //!< Attributes }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlElement"). + ***************************************************************************/ +inline +std::string GXmlElement::classname(void) const +{ + return ("GXmlElement"); +} + #endif /* GXMLELEMENT_HPP */ diff --git a/include/GXmlNode.hpp b/include/GXmlNode.hpp index 544137c..0b67768 100644 --- a/include/GXmlNode.hpp +++ b/include/GXmlNode.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlNode.hpp - Abstract XML node base class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -81,6 +81,7 @@ public: // Methods virtual void clear(void) = 0; virtual GXmlNode* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual int size(void) const { return m_nodes.size(); } virtual bool is_empty(void) const { return m_nodes.empty(); } virtual GXmlNode* set(const int& index, const GXmlNode& node); diff --git a/include/GXmlPI.hpp b/include/GXmlPI.hpp index ebc4e81..59bfb05 100644 --- a/include/GXmlPI.hpp +++ b/include/GXmlPI.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlPI.hpp - XML PI node class definition * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -55,6 +55,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GXmlPI* clone(void) const; + virtual std::string classname(void) const; virtual void write(GUrl& url, const int& indent = 0) const; virtual NodeType type(void) const { return NT_PI; } virtual std::string print(const GChatter& chatter = NORMAL, @@ -75,4 +76,16 @@ protected: std::string m_pi; //!< Processing instruction (without brackets) }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlPI"). + ***************************************************************************/ +inline +std::string GXmlPI::classname(void) const +{ + return ("GXmlPI"); +} + #endif /* GXMLPI_HPP */ diff --git a/include/GXmlText.hpp b/include/GXmlText.hpp index 5f5cc4a..0976b16 100644 --- a/include/GXmlText.hpp +++ b/include/GXmlText.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GXmlText.hpp - XML text node class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -55,6 +55,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GXmlText* clone(void) const; + virtual std::string classname(void) const; virtual void write(GUrl& url, const int& indent = 0) const; virtual NodeType type(void) const { return NT_TEXT; } virtual std::string print(const GChatter& chatter = NORMAL, @@ -74,4 +75,16 @@ protected: std::string m_text; //!< Text }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GXmlText"). + ***************************************************************************/ +inline +std::string GXmlText::classname(void) const +{ + return ("GXmlText"); +} + #endif /* GXMLTEXT_HPP */ diff --git a/inst/com/include/GCOMEventBin.hpp b/inst/com/include/GCOMEventBin.hpp index c51ebdb..a35c96c 100644 --- a/inst/com/include/GCOMEventBin.hpp +++ b/inst/com/include/GCOMEventBin.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCOMEventBin.hpp - COMPTEL event bin class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCOMEventBin* clone(void) const; + virtual std::string classname(void) const; virtual double size(void) const; virtual const GCOMInstDir& dir(void) const { return *m_dir; } virtual const GEnergy& energy(void) const { return *m_energy; } @@ -96,4 +97,16 @@ protected: GEnergy* m_ewidth; //!< Pointer to energy width of bin }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCOMEventBin"). + ***************************************************************************/ +inline +std::string GCOMEventBin::classname(void) const +{ + return ("GCOMEventBin"); +} + #endif /* GCOMEVENTBIN_HPP */ diff --git a/inst/com/include/GCOMEventCube.hpp b/inst/com/include/GCOMEventCube.hpp index 4ef33b0..f0b5e1b 100644 --- a/inst/com/include/GCOMEventCube.hpp +++ b/inst/com/include/GCOMEventCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCOMEventCube.hpp - COMPTEL event bin container class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCOMEventCube* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual int dim(void) const; virtual int naxis(const int& axis) const; @@ -114,4 +115,16 @@ protected: std::vector m_dphi; //!< Array of event scatter angles widths }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCOMEventCube"). + ***************************************************************************/ +inline +std::string GCOMEventCube::classname(void) const +{ + return ("GCOMEventCube"); +} + #endif /* GCOMEVENTCUBE_HPP */ diff --git a/inst/com/include/GCOMInstDir.hpp b/inst/com/include/GCOMInstDir.hpp index 2bc146b..4fba07b 100644 --- a/inst/com/include/GCOMInstDir.hpp +++ b/inst/com/include/GCOMInstDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCOMInstDir.hpp - COMPTEL instrument direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -52,6 +52,7 @@ public: // Methods virtual void clear(void); virtual GCOMInstDir* clone(void) const; + virtual std::string classname(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; // Other methods @@ -71,4 +72,16 @@ protected: double m_phibar; //!< Observed scatter angle of event }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCOMInstDir"). + ***************************************************************************/ +inline +std::string GCOMInstDir::classname(void) const +{ + return ("GCOMInstDir"); +} + #endif /* GCOMINSTDIR_HPP */ diff --git a/inst/com/include/GCOMModelDRBFitting.hpp b/inst/com/include/GCOMModelDRBFitting.hpp index b42653a..66d39c9 100644 --- a/inst/com/include/GCOMModelDRBFitting.hpp +++ b/inst/com/include/GCOMModelDRBFitting.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCOMModelDRBFitting.hpp - COMPTEL DRB model fitting class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCOMModelDRBFitting* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual bool is_constant(void) const; virtual double eval(const GEvent& event, @@ -98,6 +99,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCOMModelDRBFitting"). + ***************************************************************************/ +inline +std::string GCOMModelDRBFitting::classname(void) const +{ + return ("GCOMModelDRBFitting"); +} + + +/***********************************************************************//** * @brief Return model type * * @return Model type. diff --git a/inst/com/include/GCOMObservation.hpp b/inst/com/include/GCOMObservation.hpp index 783b849..6da4500 100644 --- a/inst/com/include/GCOMObservation.hpp +++ b/inst/com/include/GCOMObservation.hpp @@ -63,7 +63,7 @@ public: // Implement pure virtual methods virtual void clear(void); virtual GCOMObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GCOMResponse* response(void) const; virtual std::string instrument(void) const { return m_instrument; } @@ -124,14 +124,14 @@ protected: /***********************************************************************//** - * @brief Return class type + * @brief Return class name * - * @return Returns "GCOMObservation". + * @return String containing the class name ("GCOMObservation"). ***************************************************************************/ inline -std::string GCOMObservation::type(void) const +std::string GCOMObservation::classname(void) const { - return "GCOMObservation"; + return ("GCOMObservation"); } diff --git a/inst/com/include/GCOMResponse.hpp b/inst/com/include/GCOMResponse.hpp index e60a0ab..fe26df8 100644 --- a/inst/com/include/GCOMResponse.hpp +++ b/inst/com/include/GCOMResponse.hpp @@ -60,6 +60,7 @@ public: // Implement pure virtual base class methods virtual void clear(void); virtual GCOMResponse* clone(void) const; + virtual std::string classname(void) const; virtual bool use_edisp(void) const; virtual bool use_tdisp(void) const; virtual double irf(const GEvent& event, @@ -100,6 +101,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCOMResponse"). + ***************************************************************************/ +inline +std::string GCOMResponse::classname(void) const +{ + return ("GCOMResponse"); +} + + +/***********************************************************************//** * @brief Signal if energy dispersion will be used * * @return False. diff --git a/inst/com/pyext/GCOMObservation.i b/inst/com/pyext/GCOMObservation.i index c3cd83c..90f8613 100644 --- a/inst/com/pyext/GCOMObservation.i +++ b/inst/com/pyext/GCOMObservation.i @@ -48,7 +48,7 @@ public: // Implement pure virtual methods virtual void clear(void); virtual GCOMObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GCOMResponse* response(void) const; virtual std::string instrument(void) const; diff --git a/inst/com/test/test_COM.hpp b/inst/com/test/test_COM.hpp index bf33b9d..cd9e8c6 100644 --- a/inst/com/test/test_COM.hpp +++ b/inst/com/test/test_COM.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_COM.hpp - Test COMPTEL classes * * ----------------------------------------------------------------------- * - * copyright (C) 2012 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -48,6 +48,7 @@ public: // Methods virtual void set(void); virtual TestGCOMResponse* clone(void) const; + virtual std::string classname(void) const { return "TestGCOMResponse"; } void test_inst_dir(void); void test_response(void); }; @@ -69,6 +70,7 @@ public: // Methods virtual void set(void); virtual TestGCOMObservation* clone(void) const; + virtual std::string classname(void) const { return "TestGCOMObservation"; } void test_binned_obs(void); void test_event_bin(void); void test_event_cube(void); @@ -91,6 +93,7 @@ public: // Methods virtual void set(void); virtual TestGCOMOptimize* clone(void) const; + virtual std::string classname(void) const { return "TestGCOMOptimize"; } void test_binned_optimizer(void); }; diff --git a/inst/cta/include/GCTAAeff.hpp b/inst/cta/include/GCTAAeff.hpp index 61c430b..58f219a 100644 --- a/inst/cta/include/GCTAAeff.hpp +++ b/inst/cta/include/GCTAAeff.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAAeff.hpp - CTA effective area base class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -69,6 +69,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTAAeff* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void load(const std::string& filename) = 0; virtual std::string filename(void) const = 0; virtual std::string print(const GChatter& chatter = NORMAL) const = 0; diff --git a/inst/cta/include/GCTAAeff2D.hpp b/inst/cta/include/GCTAAeff2D.hpp index 88166c9..2aa1348 100644 --- a/inst/cta/include/GCTAAeff2D.hpp +++ b/inst/cta/include/GCTAAeff2D.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAAeff2D.hpp - CTA 2D effective area class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAAeff2D* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; std::string print(const GChatter& chatter = NORMAL) const; @@ -81,4 +82,16 @@ private: GCTAResponseTable m_aeff; //!< Aeff response table }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAAeff2D"). + ***************************************************************************/ +inline +std::string GCTAAeff2D::classname(void) const +{ + return ("GCTAAeff2D"); +} + #endif /* GCTAAEFF2D_HPP */ diff --git a/inst/cta/include/GCTAAeffArf.hpp b/inst/cta/include/GCTAAeffArf.hpp index b70c8fb..a860200 100644 --- a/inst/cta/include/GCTAAeffArf.hpp +++ b/inst/cta/include/GCTAAeffArf.hpp @@ -68,6 +68,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAAeffArf* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; std::string print(const GChatter& chatter = NORMAL) const; @@ -100,6 +101,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAAeffArf"). + ***************************************************************************/ +inline +std::string GCTAAeffArf::classname(void) const +{ + return ("GCTAAeffArf"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which effective area was loaded. diff --git a/inst/cta/include/GCTAAeffPerfTable.hpp b/inst/cta/include/GCTAAeffPerfTable.hpp index 7c4024d..efea3b9 100644 --- a/inst/cta/include/GCTAAeffPerfTable.hpp +++ b/inst/cta/include/GCTAAeffPerfTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAAeffPerfTable.hpp - CTA performance table effective area class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAAeffPerfTable* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; std::string print(const GChatter& chatter = NORMAL) const; @@ -89,6 +90,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAAeffPerfTable"). + ***************************************************************************/ +inline +std::string GCTAAeffPerfTable::classname(void) const +{ + return ("GCTAAeffPerfTable"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which effective area was loaded. diff --git a/inst/cta/include/GCTABackground.hpp b/inst/cta/include/GCTABackground.hpp index f3789c6..74c69ba 100644 --- a/inst/cta/include/GCTABackground.hpp +++ b/inst/cta/include/GCTABackground.hpp @@ -61,6 +61,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTABackground* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void load(const std::string& filename) = 0; virtual std::string filename(void) const = 0; virtual GCTAInstDir mc(const GEnergy& energy, diff --git a/inst/cta/include/GCTABackground3D.hpp b/inst/cta/include/GCTABackground3D.hpp index a2317e7..e847825 100644 --- a/inst/cta/include/GCTABackground3D.hpp +++ b/inst/cta/include/GCTABackground3D.hpp @@ -63,6 +63,7 @@ public: // Implemented pure virtual methods void clear(void); GCTABackground3D* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; GCTAInstDir mc(const GEnergy& energy, @@ -112,6 +113,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTABackground3D"). + ***************************************************************************/ +inline +std::string GCTABackground3D::classname(void) const +{ + return ("GCTABackground3D"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which the background was loaded. diff --git a/inst/cta/include/GCTABackgroundPerfTable.hpp b/inst/cta/include/GCTABackgroundPerfTable.hpp index fd3d316..064db8a 100644 --- a/inst/cta/include/GCTABackgroundPerfTable.hpp +++ b/inst/cta/include/GCTABackgroundPerfTable.hpp @@ -62,6 +62,7 @@ public: // Implemented pure virtual methods void clear(void); GCTABackgroundPerfTable* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; GCTAInstDir mc(const GEnergy& energy, @@ -110,6 +111,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTABackgroundPerfTable"). + ***************************************************************************/ +inline +std::string GCTABackgroundPerfTable::classname(void) const +{ + return ("GCTABackgroundPerfTable"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which the background was loaded. diff --git a/inst/cta/include/GCTAEdisp.hpp b/inst/cta/include/GCTAEdisp.hpp index 31451dc..93809a0 100644 --- a/inst/cta/include/GCTAEdisp.hpp +++ b/inst/cta/include/GCTAEdisp.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAEdisp.hpp - Abstract CTA energy dispersion base class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTAEdisp* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void load(const std::string& filename) = 0; virtual std::string filename(void) const = 0; virtual GEnergy mc(GRan& ran, diff --git a/inst/cta/include/GCTAEdispPerfTable.hpp b/inst/cta/include/GCTAEdispPerfTable.hpp index 5667546..ed7cfa3 100644 --- a/inst/cta/include/GCTAEdispPerfTable.hpp +++ b/inst/cta/include/GCTAEdispPerfTable.hpp @@ -66,6 +66,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAEdispPerfTable* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; GEnergy mc(GRan& ran, @@ -107,6 +108,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEdispPerfTable"). + ***************************************************************************/ +inline +std::string GCTAEdispPerfTable::classname(void) const +{ + return ("GCTAEdispPerfTable"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which the energy resolution was loaded diff --git a/inst/cta/include/GCTAEdispRmf.hpp b/inst/cta/include/GCTAEdispRmf.hpp index 071aa10..f649800 100644 --- a/inst/cta/include/GCTAEdispRmf.hpp +++ b/inst/cta/include/GCTAEdispRmf.hpp @@ -66,6 +66,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAEdispRmf* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; GEnergy mc(GRan& ran, @@ -108,6 +109,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEdispRmf"). + ***************************************************************************/ +inline +std::string GCTAEdispRmf::classname(void) const +{ + return ("GCTAEdispRmf"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which the Redistribution Matrix was loaded. diff --git a/inst/cta/include/GCTAEventAtom.hpp b/inst/cta/include/GCTAEventAtom.hpp index 7c948e3..81408d4 100644 --- a/inst/cta/include/GCTAEventAtom.hpp +++ b/inst/cta/include/GCTAEventAtom.hpp @@ -60,6 +60,7 @@ public: // Implemented pure virtual base class methods void clear(void); GCTAEventAtom* clone(void) const; + std::string classname(void) const; const GCTAInstDir& dir(void) const; const GEnergy& energy(void) const; const GTime& time(void) const; @@ -109,6 +110,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEventAtom"). + ***************************************************************************/ +inline +std::string GCTAEventAtom::classname(void) const +{ + return ("GCTAEventAtom"); +} + + +/***********************************************************************//** * @brief Return instrument direction * * @return Instrument direction. diff --git a/inst/cta/include/GCTAEventBin.hpp b/inst/cta/include/GCTAEventBin.hpp index f26fcfa..1654239 100644 --- a/inst/cta/include/GCTAEventBin.hpp +++ b/inst/cta/include/GCTAEventBin.hpp @@ -66,6 +66,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAEventBin* clone(void) const; + virtual std::string classname(void) const; virtual double size(void) const; virtual const GCTAInstDir& dir(void) const; virtual const GEnergy& energy(void) const; @@ -102,6 +103,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEventBin"). + ***************************************************************************/ +inline +std::string GCTAEventBin::classname(void) const +{ + return ("GCTAEventBin"); +} + + +/***********************************************************************//** * @brief Return the spatial pixel index * * @return Spatial pixel index. diff --git a/inst/cta/include/GCTAEventCube.hpp b/inst/cta/include/GCTAEventCube.hpp index c04142e..b16c3c6 100644 --- a/inst/cta/include/GCTAEventCube.hpp +++ b/inst/cta/include/GCTAEventCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAEventCube.hpp - CTA event bin container class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -66,6 +66,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAEventCube* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual int dim(void) const; virtual int naxis(const int& axis) const; @@ -113,6 +114,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEventCube"). + ***************************************************************************/ +inline +std::string GCTAEventCube::classname(void) const +{ + return ("GCTAEventCube"); +} + + +/***********************************************************************//** * @brief Return event cube sky map * * @return Event cube sky map. diff --git a/inst/cta/include/GCTAEventList.hpp b/inst/cta/include/GCTAEventList.hpp index e800a0c..8b717d7 100644 --- a/inst/cta/include/GCTAEventList.hpp +++ b/inst/cta/include/GCTAEventList.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAEventList.hpp - CTA event atom container class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -61,6 +61,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAEventList* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual void load(const std::string& filename); virtual void save(const std::string& filename, @@ -108,6 +109,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAEventList"). + ***************************************************************************/ +inline +std::string GCTAEventList::classname(void) const +{ + return ("GCTAEventList"); +} + + +/***********************************************************************//** * @brief Return number of events in list * * @return Number of events in list. diff --git a/inst/cta/include/GCTAExposure.hpp b/inst/cta/include/GCTAExposure.hpp index 2e52803..3a8496f 100644 --- a/inst/cta/include/GCTAExposure.hpp +++ b/inst/cta/include/GCTAExposure.hpp @@ -71,6 +71,7 @@ public: // Methods void clear(void); GCTAExposure* clone(void) const; + std::string classname(void) const; void set(const GCTAObservation& obs); void fill(const GObservations& obs); const GSkymap& cube(void) const; @@ -109,6 +110,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAExposure"). + ***************************************************************************/ +inline +std::string GCTAExposure::classname(void) const +{ + return ("GCTAExposure"); +} + + +/***********************************************************************//** * @brief Return exposure cube * * @return Exposure cube. diff --git a/inst/cta/include/GCTAInstDir.hpp b/inst/cta/include/GCTAInstDir.hpp index 73613d2..0f5e435 100644 --- a/inst/cta/include/GCTAInstDir.hpp +++ b/inst/cta/include/GCTAInstDir.hpp @@ -56,6 +56,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAInstDir* clone(void) const; + virtual std::string classname(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; // Other methods @@ -81,6 +82,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAInstDir"). + ***************************************************************************/ +inline +std::string GCTAInstDir::classname(void) const +{ + return ("GCTAInstDir"); +} + + +/***********************************************************************//** * @brief Return reference to sky direction * * @return Reference to sky direction. diff --git a/inst/cta/include/GCTAMeanPsf.hpp b/inst/cta/include/GCTAMeanPsf.hpp index 9f0e06f..cbb481b 100644 --- a/inst/cta/include/GCTAMeanPsf.hpp +++ b/inst/cta/include/GCTAMeanPsf.hpp @@ -77,6 +77,7 @@ public: // Methods void clear(void); GCTAMeanPsf* clone(void) const; + std::string classname(void) const; void set(const GCTAObservation& obs); void fill(const GObservations& obs); const GSkymap& map(void) const; @@ -123,6 +124,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAMeanPsf"). + ***************************************************************************/ +inline +std::string GCTAMeanPsf::classname(void) const +{ + return ("GCTAMeanPsf"); +} + + +/***********************************************************************//** * @brief Return psf cube sky map * * @return psf cube sky map. diff --git a/inst/cta/include/GCTAModelCubeBackground.hpp b/inst/cta/include/GCTAModelCubeBackground.hpp index e9c4be9..e9a7fda 100644 --- a/inst/cta/include/GCTAModelCubeBackground.hpp +++ b/inst/cta/include/GCTAModelCubeBackground.hpp @@ -73,6 +73,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelCubeBackground* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual bool is_constant(void) const; virtual double eval(const GEvent& event, @@ -181,6 +182,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelCubeBackground"). + ***************************************************************************/ +inline +std::string GCTAModelCubeBackground::classname(void) const +{ + return ("GCTAModelCubeBackground"); +} + + +/***********************************************************************//** * @brief Return data model type * * @return Data model type. diff --git a/inst/cta/include/GCTAModelIrfBackground.hpp b/inst/cta/include/GCTAModelIrfBackground.hpp index a9e88d0..68cfd61 100644 --- a/inst/cta/include/GCTAModelIrfBackground.hpp +++ b/inst/cta/include/GCTAModelIrfBackground.hpp @@ -60,6 +60,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelIrfBackground* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual bool is_constant(void) const; virtual double eval(const GEvent& event, @@ -130,6 +131,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelIrfBackground"). + ***************************************************************************/ +inline +std::string GCTAModelIrfBackground::classname(void) const +{ + return ("GCTAModelIrfBackground"); +} + + +/***********************************************************************//** * @brief Return data model type * * @return Data model type. diff --git a/inst/cta/include/GCTAModelRadial.hpp b/inst/cta/include/GCTAModelRadial.hpp index bce7b39..f5b5afd 100644 --- a/inst/cta/include/GCTAModelRadial.hpp +++ b/inst/cta/include/GCTAModelRadial.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadial.hpp - Radial model abstract base class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTAModelRadial* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual std::string type(void) const = 0; virtual double eval(const double& offset) const = 0; virtual double eval_gradients(const double& offset) const = 0; diff --git a/inst/cta/include/GCTAModelRadialAcceptance.hpp b/inst/cta/include/GCTAModelRadialAcceptance.hpp index a1a4f72..d94095e 100644 --- a/inst/cta/include/GCTAModelRadialAcceptance.hpp +++ b/inst/cta/include/GCTAModelRadialAcceptance.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadialAcceptance.hpp - Radial acceptance model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -66,6 +66,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelRadialAcceptance* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual bool is_constant(void) const; virtual double eval(const GEvent& event, @@ -123,6 +124,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelRadialAcceptance"). + ***************************************************************************/ +inline +std::string GCTAModelRadialAcceptance::classname(void) const +{ + return ("GCTAModelRadialAcceptance"); +} + + +/***********************************************************************//** * @brief Return model type * * @return Model type. diff --git a/inst/cta/include/GCTAModelRadialGauss.hpp b/inst/cta/include/GCTAModelRadialGauss.hpp index 27918bd..74ec039 100644 --- a/inst/cta/include/GCTAModelRadialGauss.hpp +++ b/inst/cta/include/GCTAModelRadialGauss.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadialGauss.hpp - Radial Gaussian CTA model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -67,6 +67,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelRadialGauss* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& offset) const; virtual double eval_gradients(const double& offset) const; @@ -107,6 +108,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelRadialGauss"). + ***************************************************************************/ +inline +std::string GCTAModelRadialGauss::classname(void) const +{ + return ("GCTAModelRadialGauss"); +} + + +/***********************************************************************//** * @brief Return model type * * @return Model type "Gaussian". diff --git a/inst/cta/include/GCTAModelRadialPolynom.hpp b/inst/cta/include/GCTAModelRadialPolynom.hpp index be0657b..eab3775 100644 --- a/inst/cta/include/GCTAModelRadialPolynom.hpp +++ b/inst/cta/include/GCTAModelRadialPolynom.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadialPolynom.hpp - Radial Polynom CTA model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -68,6 +68,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelRadialPolynom* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& offset) const; virtual double eval_gradients(const double& offset) const; @@ -107,6 +108,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelRadialPolynom"). + ***************************************************************************/ +inline +std::string GCTAModelRadialPolynom::classname(void) const +{ + return ("GCTAModelRadialPolynom"); +} + + +/***********************************************************************//** * @brief Return model type * * @return Model type "Polynom". diff --git a/inst/cta/include/GCTAModelRadialProfile.hpp b/inst/cta/include/GCTAModelRadialProfile.hpp index 6c47e9f..e2729b1 100644 --- a/inst/cta/include/GCTAModelRadialProfile.hpp +++ b/inst/cta/include/GCTAModelRadialProfile.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadialProfile.hpp - Radial Profile CTA model class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -69,6 +69,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAModelRadialProfile* clone(void) const; + virtual std::string classname(void) const; virtual std::string type(void) const; virtual double eval(const double& offset) const; virtual double eval_gradients(const double& offset) const; @@ -112,6 +113,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelRadialProfile"). + ***************************************************************************/ +inline +std::string GCTAModelRadialProfile::classname(void) const +{ + return ("GCTAModelRadialProfile"); +} + + +/***********************************************************************//** * @brief Return model type * * @return Model type "Profile". diff --git a/inst/cta/include/GCTAModelRadialRegistry.hpp b/inst/cta/include/GCTAModelRadialRegistry.hpp index 4112a6b..d1d2c6d 100644 --- a/inst/cta/include/GCTAModelRadialRegistry.hpp +++ b/inst/cta/include/GCTAModelRadialRegistry.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelRadialRegistry.hpp - CTA Radial model registry class * * ----------------------------------------------------------------------- * - * copyright (C) 2011-2013 by Juergen Knoedlseder * + * copyright (C) 2011-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: GCTAModelRadialRegistry& operator=(const GCTAModelRadialRegistry& registry); // Methods + std::string classname(void) const; int size(void) const; GCTAModelRadial* alloc(const std::string& name) const; std::string name(const int& index) const; @@ -98,6 +99,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAModelRadialRegistry"). + ***************************************************************************/ +inline +std::string GCTAModelRadialRegistry::classname(void) const +{ + return ("GCTAModelRadialRegistry"); +} + + +/***********************************************************************//** * @brief Return number of registered models * * @return Number of registered models. diff --git a/inst/cta/include/GCTAObservation.hpp b/inst/cta/include/GCTAObservation.hpp index 3656443..5a27358 100644 --- a/inst/cta/include/GCTAObservation.hpp +++ b/inst/cta/include/GCTAObservation.hpp @@ -72,7 +72,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GCTAResponse* response(void) const; virtual std::string instrument(void) const; @@ -137,14 +137,14 @@ protected: /***********************************************************************//** - * @brief Return class type + * @brief Return class name * - * @return Returns "GCTAObservation". + * @return String containing the class name ("GCTAObservation"). ***************************************************************************/ inline -std::string GCTAObservation::type(void) const +std::string GCTAObservation::classname(void) const { - return "GCTAObservation"; + return ("GCTAObservation"); } @@ -208,7 +208,7 @@ double GCTAObservation::deadc(const GTime& time) const inline bool GCTAObservation::has_response(void) const { - return ((m_response != NULL) && (m_response->isvalid())); + return ((m_response != NULL) && (m_response->is_valid())); } diff --git a/inst/cta/include/GCTAOnOffObservation.hpp b/inst/cta/include/GCTAOnOffObservation.hpp index 8a13b65..5f3d498 100644 --- a/inst/cta/include/GCTAOnOffObservation.hpp +++ b/inst/cta/include/GCTAOnOffObservation.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAOnOffObservation.hpp - CTA on-off observation class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Chia-Chun Lu & Christoph Deil * + * copyright (C) 2013-2014 by Chia-Chun Lu & Christoph Deil * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Methods void clear(void); GCTAOnOffObservation* clone(void) const; + std::string classname(void) const; void name(const std::string& name); void instrument(const std::string& instrument); void id(const std::string& id); @@ -101,6 +102,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAOnOffObservation"). + ***************************************************************************/ +inline +std::string GCTAOnOffObservation::classname(void) const +{ + return ("GCTAOnOffObservation"); +} + + +/***********************************************************************//** * @brief Set name of observation * * @param[in] name Observation name. diff --git a/inst/cta/include/GCTAOnOffObservations.hpp b/inst/cta/include/GCTAOnOffObservations.hpp index 198ede5..4de9d99 100644 --- a/inst/cta/include/GCTAOnOffObservations.hpp +++ b/inst/cta/include/GCTAOnOffObservations.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAOnOffObservations.hpp - CTA on-off observation container class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Pierrick Martin * + * copyright (C) 2013-2014 by Pierrick Martin * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Methods void clear(void); GCTAOnOffObservations* clone(void) const; + std::string classname(void) const; GCTAOnOffObservation* at(const int& index); const GCTAOnOffObservation* at(const int& index) const; int size(void) const; @@ -107,6 +108,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAOnOffObservations"). + ***************************************************************************/ +inline +std::string GCTAOnOffObservations::classname(void) const +{ + return ("GCTAOnOffObservations"); +} + + +/***********************************************************************//** * @brief Return pointer to observation * * @param[in] index Observation index [0,...,size()-1]. diff --git a/inst/cta/include/GCTAPointing.hpp b/inst/cta/include/GCTAPointing.hpp index 5027b88..d7cd2ff 100644 --- a/inst/cta/include/GCTAPointing.hpp +++ b/inst/cta/include/GCTAPointing.hpp @@ -68,6 +68,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GCTAPointing* clone(void) const; + virtual std::string classname(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; // Other methods @@ -111,6 +112,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAPointing"). + ***************************************************************************/ +inline +std::string GCTAPointing::classname(void) const +{ + return ("GCTAPointing"); +} + + +/***********************************************************************//** * @brief Return pointing sky direction * * @return Pointing sky direction. diff --git a/inst/cta/include/GCTAPsf.hpp b/inst/cta/include/GCTAPsf.hpp index dd62802..ede899a 100644 --- a/inst/cta/include/GCTAPsf.hpp +++ b/inst/cta/include/GCTAPsf.hpp @@ -65,6 +65,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTAPsf* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void load(const std::string& filename) = 0; virtual std::string filename(void) const = 0; virtual double mc(GRan& ran, diff --git a/inst/cta/include/GCTAPsf2D.hpp b/inst/cta/include/GCTAPsf2D.hpp index 394978a..6050ab5 100644 --- a/inst/cta/include/GCTAPsf2D.hpp +++ b/inst/cta/include/GCTAPsf2D.hpp @@ -68,6 +68,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAPsf2D* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; double mc(GRan& ran, @@ -121,6 +122,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAPsf2D"). + ***************************************************************************/ +inline +std::string GCTAPsf2D::classname(void) const +{ + return ("GCTAPsf2D"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which point spread function was loaded diff --git a/inst/cta/include/GCTAPsfKing.hpp b/inst/cta/include/GCTAPsfKing.hpp index fe2a401..6665104 100644 --- a/inst/cta/include/GCTAPsfKing.hpp +++ b/inst/cta/include/GCTAPsfKing.hpp @@ -65,6 +65,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAPsfKing* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; double mc(GRan& ran, @@ -114,6 +115,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAPsfKing"). + ***************************************************************************/ +inline +std::string GCTAPsfKing::classname(void) const +{ + return ("GCTAPsfKing"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Filename from which point spread function was loaded. diff --git a/inst/cta/include/GCTAPsfPerfTable.hpp b/inst/cta/include/GCTAPsfPerfTable.hpp index fc95e14..b6451c0 100644 --- a/inst/cta/include/GCTAPsfPerfTable.hpp +++ b/inst/cta/include/GCTAPsfPerfTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAPsfPerfTable.hpp - CTA performance table PSF class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -67,6 +67,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAPsfPerfTable* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; double mc(GRan& ran, @@ -107,6 +108,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAPsfPerfTable"). + ***************************************************************************/ +inline +std::string GCTAPsfPerfTable::classname(void) const +{ + return ("GCTAPsfPerfTable"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which point spread function was loaded diff --git a/inst/cta/include/GCTAPsfVector.hpp b/inst/cta/include/GCTAPsfVector.hpp index e89f7e8..9b8664f 100644 --- a/inst/cta/include/GCTAPsfVector.hpp +++ b/inst/cta/include/GCTAPsfVector.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAPsfVector.hpp - CTA point spread function vector class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -65,6 +65,7 @@ public: // Implemented pure virtual methods void clear(void); GCTAPsfVector* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); std::string filename(void) const; double mc(GRan& ran, @@ -107,6 +108,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAPsfVector"). + ***************************************************************************/ +inline +std::string GCTAPsfVector::classname(void) const +{ + return ("GCTAPsfVector"); +} + + +/***********************************************************************//** * @brief Return filename * * @return Returns filename from which point spread function was loaded diff --git a/inst/cta/include/GCTAResponse.hpp b/inst/cta/include/GCTAResponse.hpp index e5c66a0..3329420 100644 --- a/inst/cta/include/GCTAResponse.hpp +++ b/inst/cta/include/GCTAResponse.hpp @@ -65,7 +65,8 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GCTAResponse* clone(void) const = 0; - virtual bool isvalid(void) const = 0; + virtual std::string classname(void) const = 0; + virtual bool is_valid(void) const = 0; virtual bool use_edisp(void) const = 0; virtual bool use_tdisp(void) const = 0; virtual bool apply_edisp(void) const = 0; diff --git a/inst/cta/include/GCTAResponseCube.hpp b/inst/cta/include/GCTAResponseCube.hpp index 535f1ad..7b763dc 100644 --- a/inst/cta/include/GCTAResponseCube.hpp +++ b/inst/cta/include/GCTAResponseCube.hpp @@ -67,7 +67,8 @@ public: // Implement pure virtual base class methods virtual void clear(void); virtual GCTAResponseCube* clone(void) const; - virtual bool isvalid(void) const; + virtual std::string classname(void) const; + virtual bool is_valid(void) const; virtual bool use_edisp(void) const; virtual bool use_tdisp(void) const; virtual bool apply_edisp(void) const; @@ -133,6 +134,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAResponseCube"). + ***************************************************************************/ +inline +std::string GCTAResponseCube::classname(void) const +{ + return ("GCTAResponseCube"); +} + + +/***********************************************************************//** * @brief Signal if response is valid * * @return True if response is valid @@ -140,7 +153,7 @@ private: * @todo: To be implemented (check if GCTAExposure and GCTAMeanPsf is loaded) ***************************************************************************/ inline -bool GCTAResponseCube::isvalid(void) const +bool GCTAResponseCube::is_valid(void) const { return (true); } diff --git a/inst/cta/include/GCTAResponseIrf.hpp b/inst/cta/include/GCTAResponseIrf.hpp index 0010cfa..0850b96 100644 --- a/inst/cta/include/GCTAResponseIrf.hpp +++ b/inst/cta/include/GCTAResponseIrf.hpp @@ -74,7 +74,8 @@ public: // Implement pure virtual base class methods virtual void clear(void); virtual GCTAResponseIrf* clone(void) const; - virtual bool isvalid(void) const; + virtual std::string classname(void) const; + virtual bool is_valid(void) const; virtual bool use_edisp(void) const; virtual bool use_tdisp(void) const; virtual bool apply_edisp(void) const; @@ -194,12 +195,24 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAResponseIrf"). + ***************************************************************************/ +inline +std::string GCTAResponseIrf::classname(void) const +{ + return ("GCTAResponseIrf"); +} + + +/***********************************************************************//** * @brief Signal if response is valid * * @return True if response is valid ***************************************************************************/ inline -bool GCTAResponseIrf::isvalid(void) const +bool GCTAResponseIrf::is_valid(void) const { return ((m_aeff != NULL) && (m_psf != NULL)); } diff --git a/inst/cta/include/GCTAResponseTable.hpp b/inst/cta/include/GCTAResponseTable.hpp index 956bbcb..09052df 100644 --- a/inst/cta/include/GCTAResponseTable.hpp +++ b/inst/cta/include/GCTAResponseTable.hpp @@ -71,6 +71,7 @@ public: // Methods void clear(void); GCTAResponseTable* clone(void) const; + std::string classname(void) const; int size(void) const; const int& elements(void) const; const int& axes(void) const; @@ -154,6 +155,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTAResponseTable"). + ***************************************************************************/ +inline +std::string GCTAResponseTable::classname(void) const +{ + return ("GCTAResponseTable"); +} + + +/***********************************************************************//** * @brief Return number of parameters in response table * * @return Number of parameters in response table. diff --git a/inst/cta/include/GCTARoi.hpp b/inst/cta/include/GCTARoi.hpp index a85e586..d1350d4 100644 --- a/inst/cta/include/GCTARoi.hpp +++ b/inst/cta/include/GCTARoi.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTARoi.hpp - CTA region of interest class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -60,6 +60,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTARoi* clone(void) const; + virtual std::string classname(void) const; virtual bool contains(const GEvent& event) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -82,6 +83,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTARoi"). + ***************************************************************************/ +inline +std::string GCTARoi::classname(void) const +{ + return ("GCTARoi"); +} + + +/***********************************************************************//** * @brief Returns region of interest centre * * @return Region of interest centre sky direction. diff --git a/inst/cta/include/GCTASourceCube.hpp b/inst/cta/include/GCTASourceCube.hpp index 35d3106..760ba51 100644 --- a/inst/cta/include/GCTASourceCube.hpp +++ b/inst/cta/include/GCTASourceCube.hpp @@ -59,13 +59,14 @@ public: virtual GCTASourceCube& operator=(const GCTASourceCube & cube); // Pure virtual methods - virtual void clear(void) = 0; - virtual GCTASourceCube* clone(void) const = 0; - virtual GCTAClassCode code(void) const = 0; - virtual void set(const std::string& name, - const GModelSpatial& model, - const GObservation& obs) = 0; - virtual std::string print(const GChatter& chatter = NORMAL) const = 0; + virtual void clear(void) = 0; + virtual GCTASourceCube* clone(void) const = 0; + virtual std::string classname(void) const = 0; + virtual GCTAClassCode code(void) const = 0; + virtual void set(const std::string& name, + const GModelSpatial& model, + const GObservation& obs) = 0; + virtual std::string print(const GChatter& chatter = NORMAL) const = 0; // Implemented methods virtual const std::string& name(void) const; diff --git a/inst/cta/include/GCTASourceCubeDiffuse.hpp b/inst/cta/include/GCTASourceCubeDiffuse.hpp index 26291f3..2f9b1b2 100644 --- a/inst/cta/include/GCTASourceCubeDiffuse.hpp +++ b/inst/cta/include/GCTASourceCubeDiffuse.hpp @@ -69,7 +69,8 @@ public: // Implemented pure virtual methods void clear(void); GCTASourceCubeDiffuse* clone(void) const; - virtual GCTAClassCode code(void) const; + std::string classname(void) const; + GCTAClassCode code(void) const; void set(const std::string& name, const GModelSpatial& model, const GObservation& obs); @@ -96,6 +97,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTASourceCubeDiffuse"). + ***************************************************************************/ +inline +std::string GCTASourceCubeDiffuse::classname(void) const +{ + return ("GCTASourceCubeDiffuse"); +} + + +/***********************************************************************//** * @brief Return class type code * * @return GCTA_SOURCE_CUBE_DIFFUSE. diff --git a/inst/cta/include/GCTASourceCubePointSource.hpp b/inst/cta/include/GCTASourceCubePointSource.hpp index 8f42953..7fb03c5 100644 --- a/inst/cta/include/GCTASourceCubePointSource.hpp +++ b/inst/cta/include/GCTASourceCubePointSource.hpp @@ -64,7 +64,8 @@ public: // Implemented pure virtual methods void clear(void); GCTASourceCubePointSource* clone(void) const; - virtual GCTAClassCode code(void) const; + std::string classname(void) const; + GCTAClassCode code(void) const; void set(const std::string& name, const GModelSpatial& model, const GObservation& obs); @@ -92,6 +93,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GCTASourceCubePointSource"). + ***************************************************************************/ +inline +std::string GCTASourceCubePointSource::classname(void) const +{ + return ("GCTASourceCubePointSource"); +} + + +/***********************************************************************//** * @brief Return class type code * * @return GCTA_SOURCE_CUBE_POINT_SOURCE. diff --git a/inst/cta/pyext/GCTAObservation.i b/inst/cta/pyext/GCTAObservation.i index e0332e1..f59be33 100644 --- a/inst/cta/pyext/GCTAObservation.i +++ b/inst/cta/pyext/GCTAObservation.i @@ -62,7 +62,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GCTAObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GCTAResponse* response(void) const; virtual std::string instrument(void) const; diff --git a/inst/cta/test/test_CTA.hpp b/inst/cta/test/test_CTA.hpp index 0ae4192..7cdfe83 100644 --- a/inst/cta/test/test_CTA.hpp +++ b/inst/cta/test/test_CTA.hpp @@ -47,6 +47,7 @@ public: // Methods virtual void set(void); virtual TestGCTAResponse* clone(void) const; + virtual std::string classname(void) const { return "TestGCTAResponse"; } void test_response(void); void test_response_aeff(void); void test_response_psf(void); @@ -78,6 +79,7 @@ public: // Methods virtual void set(void); virtual TestGCTAModel* clone(void) const; + virtual std::string classname(void) const { return "TestGCTAModel"; } void test_model_cube_bgd(void); void test_model_irf_bgd(void); }; @@ -99,6 +101,7 @@ public: // Methods virtual void set(void); virtual TestGCTAObservation* clone(void) const; + virtual std::string classname(void) const { return "TestGCTAObservation"; } void test_unbinned_obs(void); void test_binned_obs(void); void test_cube_obs(void); @@ -121,6 +124,7 @@ public: // Methods virtual void set(void); virtual TestGCTAOptimize* clone(void) const; + virtual std::string classname(void) const { return "TestGCTAOptimize"; } void test_unbinned_optimizer(void); void test_binned_optimizer(void); void test_cube_optimizer(void); @@ -143,10 +147,9 @@ public: // Methods virtual void set(void); virtual TestGCTAPointing* clone(void) const; + virtual std::string classname(void) const { return "TestGCTAPointing"; } void test_load_table(void); void test_interpolate_altaz(void); }; - - #endif /* TEST_CTA_HPP */ diff --git a/inst/lat/include/GLATAeff.hpp b/inst/lat/include/GLATAeff.hpp index 0ac8585..7a21b90 100644 --- a/inst/lat/include/GLATAeff.hpp +++ b/inst/lat/include/GLATAeff.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATAeff.hpp - Fermi/LAT effective area * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -67,6 +67,7 @@ public: // Methods void clear(void); GLATAeff* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); void save(const std::string& filename, const bool &clobber = false); @@ -105,6 +106,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATAeff"). + ***************************************************************************/ +inline +std::string GLATAeff::classname(void) const +{ + return ("GLATAeff"); +} + + +/***********************************************************************//** * @brief Return number of bins in effective area response * * @return Number of bins in effective area response. diff --git a/inst/lat/include/GLATEdisp.hpp b/inst/lat/include/GLATEdisp.hpp index 5e117bf..777674c 100644 --- a/inst/lat/include/GLATEdisp.hpp +++ b/inst/lat/include/GLATEdisp.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEdisp.hpp - Fermi LAT energy dispersion * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -61,6 +61,7 @@ public: // Methods void clear(void); GLATEdisp* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); void save(const std::string& filename, const bool& clobber = false); @@ -91,6 +92,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEdisp"). + ***************************************************************************/ +inline +std::string GLATEdisp::classname(void) const +{ + return ("GLATEdisp"); +} + + +/***********************************************************************//** * @brief Return number of bins in energy dispersion response * * @return Number of bins in energy dispersion response. diff --git a/inst/lat/include/GLATEfficiency.hpp b/inst/lat/include/GLATEfficiency.hpp index e8204c4..92ee2a1 100644 --- a/inst/lat/include/GLATEfficiency.hpp +++ b/inst/lat/include/GLATEfficiency.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEfficiency.hpp - Fermi/LAT IRF efficiency factor functor * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -54,6 +54,7 @@ public: // Methods void clear(void); GLATEfficiency* clone(void) const; + std::string classname(void) const; std::string print(const GChatter& chatter = NORMAL) const; private: @@ -73,4 +74,16 @@ private: double m_logEb2; //!< Separation of energy domains 2/3 }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEfficiency"). + ***************************************************************************/ +inline +std::string GLATEfficiency::classname(void) const +{ + return ("GLATEfficiency"); +} + #endif /* GLATEFFICIENCY_HPP */ diff --git a/inst/lat/include/GLATEventAtom.hpp b/inst/lat/include/GLATEventAtom.hpp index aae070d..2200e6a 100644 --- a/inst/lat/include/GLATEventAtom.hpp +++ b/inst/lat/include/GLATEventAtom.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEventAtom.hpp - Fermi/LAT event atom class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implemented pure virtual base class methods void clear(void); GLATEventAtom* clone(void) const; + std::string classname(void) const; const GLATInstDir& dir(void) const; const GEnergy& energy(void) const; const GTime& time(void) const; @@ -89,6 +90,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEventAtom"). + ***************************************************************************/ +inline +std::string GLATEventAtom::classname(void) const +{ + return ("GLATEventAtom"); +} + + +/***********************************************************************//** * @brief Return event instrument direction * * @return Event instrument direction. diff --git a/inst/lat/include/GLATEventBin.hpp b/inst/lat/include/GLATEventBin.hpp index 3c477d3..ca07b94 100644 --- a/inst/lat/include/GLATEventBin.hpp +++ b/inst/lat/include/GLATEventBin.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEventBin.hpp - Fermi/LAT event bin class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATEventBin* clone(void) const; + virtual std::string classname(void) const; virtual double size(void) const; virtual const GLATInstDir& dir(void) const; virtual const GEnergy& energy(void) const; @@ -103,6 +104,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEventBin"). + ***************************************************************************/ +inline +std::string GLATEventBin::classname(void) const +{ + return ("GLATEventBin"); +} + + +/***********************************************************************//** * @brief Return event bin index in cube * * @return Event bin index in cube. diff --git a/inst/lat/include/GLATEventCube.hpp b/inst/lat/include/GLATEventCube.hpp index 77790ae..08188bb 100644 --- a/inst/lat/include/GLATEventCube.hpp +++ b/inst/lat/include/GLATEventCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEventCube.hpp - Fermi/LAT event cube class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -63,6 +63,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATEventCube* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual int dim(void) const; virtual int naxis(const int& axis) const; @@ -122,6 +123,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEventCube"). + ***************************************************************************/ +inline +std::string GLATEventCube::classname(void) const +{ + return ("GLATEventCube"); +} + + +/***********************************************************************//** * @brief Set event cube mean time * * @param[in] time Event cube mean time. diff --git a/inst/lat/include/GLATEventList.hpp b/inst/lat/include/GLATEventList.hpp index 599a334..23cd89e 100644 --- a/inst/lat/include/GLATEventList.hpp +++ b/inst/lat/include/GLATEventList.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEventList.hpp - Fermi/LAT event list class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2013 by Juergen Knoedlseder * + * copyright (C) 2009-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATEventList* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual void load(const std::string& filename); virtual void save(const std::string& filename, @@ -94,6 +95,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATEventList"). + ***************************************************************************/ +inline +std::string GLATEventList::classname(void) const +{ + return ("GLATEventList"); +} + + +/***********************************************************************//** * @brief Return number of events in list * * @return Number of events in list. diff --git a/inst/lat/include/GLATInstDir.hpp b/inst/lat/include/GLATInstDir.hpp index fb712cb..fb616a4 100644 --- a/inst/lat/include/GLATInstDir.hpp +++ b/inst/lat/include/GLATInstDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATInstDir.hpp - Fermi/LAT instrument direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -56,6 +56,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATInstDir* clone(void) const; + virtual std::string classname(void) const; virtual std::string print(const GChatter& chatter = NORMAL) const; // Other methods @@ -75,6 +76,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATInstDir"). + ***************************************************************************/ +inline +std::string GLATInstDir::classname(void) const +{ + return ("GLATInstDir"); +} + + +/***********************************************************************//** * @brief Returns reference to sky direction * * @return Reference to sky direction. diff --git a/inst/lat/include/GLATLtCube.hpp b/inst/lat/include/GLATLtCube.hpp index de9b230..32cf1dd 100644 --- a/inst/lat/include/GLATLtCube.hpp +++ b/inst/lat/include/GLATLtCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATLtCube.hpp - Fermi/LAT livetime cube class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -70,6 +70,7 @@ public: // Methods void clear(void); GLATLtCube* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); void save(const std::string& filename, const bool& clobber=false) const; @@ -87,4 +88,16 @@ private: GGti m_gti; }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATLtCube"). + ***************************************************************************/ +inline +std::string GLATLtCube::classname(void) const +{ + return ("GLATLtCube"); +} + #endif /* GLATLTCUBE_HPP */ diff --git a/inst/lat/include/GLATLtCubeMap.hpp b/inst/lat/include/GLATLtCubeMap.hpp index ea49c15..c839a8f 100644 --- a/inst/lat/include/GLATLtCubeMap.hpp +++ b/inst/lat/include/GLATLtCubeMap.hpp @@ -70,6 +70,7 @@ public: // Methods void clear(void); GLATLtCubeMap* clone(void) const; + std::string classname(void) const; void read(const GFitsTable& table); void write(GFits& file) const; const int& ncostheta(void) const; @@ -97,6 +98,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATLtCubeMap"). + ***************************************************************************/ +inline +std::string GLATLtCubeMap::classname(void) const +{ + return ("GLATLtCubeMap"); +} + + +/***********************************************************************//** * @brief Return number of cosine theta bins * * @return Number of cosine theta bins. diff --git a/inst/lat/include/GLATMeanPsf.hpp b/inst/lat/include/GLATMeanPsf.hpp index c802111..b7dbfb3 100644 --- a/inst/lat/include/GLATMeanPsf.hpp +++ b/inst/lat/include/GLATMeanPsf.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATMeanPsf.hpp - Fermi/LAT mean PSF class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -64,6 +64,7 @@ public: // Methods void clear(void); GLATMeanPsf* clone(void) const; + std::string classname(void) const; int size(void) const; void set(const GSkyDir& dir, const GLATObservation& obs); int noffsets(void) const; @@ -115,6 +116,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATMeanPsf"). + ***************************************************************************/ +inline +std::string GLATMeanPsf::classname(void) const +{ + return ("GLATMeanPsf"); +} + + +/***********************************************************************//** * @brief Return number of bins in mean PSF * * @return Number of bins in mean PSF diff --git a/inst/lat/include/GLATObservation.hpp b/inst/lat/include/GLATObservation.hpp index 8907cd9..66a4ce7 100644 --- a/inst/lat/include/GLATObservation.hpp +++ b/inst/lat/include/GLATObservation.hpp @@ -58,7 +58,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GLATResponse* response(void) const; virtual std::string instrument(void) const; @@ -98,14 +98,14 @@ protected: /***********************************************************************//** - * @brief Return class type + * @brief Return class name * - * @return Returns "GLATObservation". + * @return String containing the class name ("GLATObservation"). ***************************************************************************/ inline -std::string GLATObservation::type(void) const +std::string GLATObservation::classname(void) const { - return "GLATObservation"; + return ("GLATObservation"); } diff --git a/inst/lat/include/GLATPsf.hpp b/inst/lat/include/GLATPsf.hpp index 2b95545..ce93970 100644 --- a/inst/lat/include/GLATPsf.hpp +++ b/inst/lat/include/GLATPsf.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATPsf.hpp - Fermi LAT point spread function * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -70,6 +70,7 @@ public: // Methods void clear(void); GLATPsf* clone(void) const; + std::string classname(void) const; void load(const std::string& filename); void save(const std::string& filename, const bool& clobber = false); @@ -96,4 +97,16 @@ private: GLATPsfBase* m_psf; //!< Pointer to versioned point spread function }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATPsf"). + ***************************************************************************/ +inline +std::string GLATPsf::classname(void) const +{ + return ("GLATPsf"); +} + #endif /* GLATPSF_HPP */ diff --git a/inst/lat/include/GLATPsfBase.hpp b/inst/lat/include/GLATPsfBase.hpp index 02578ee..1c62d97 100644 --- a/inst/lat/include/GLATPsfBase.hpp +++ b/inst/lat/include/GLATPsfBase.hpp @@ -58,6 +58,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GLATPsfBase* clone(void) const = 0; + virtual std::string classname(void) const = 0; virtual void read(const GFitsTable& table) = 0; virtual void write(GFits& file) const = 0; virtual double psf(const double& offset, const double& logE, diff --git a/inst/lat/include/GLATPsfV1.hpp b/inst/lat/include/GLATPsfV1.hpp index 6006e80..c7c0e92 100644 --- a/inst/lat/include/GLATPsfV1.hpp +++ b/inst/lat/include/GLATPsfV1.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATPsfV1.hpp - Fermi/LAT point spread function version 1 class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -58,6 +58,7 @@ public: // Methods void clear(void); GLATPsfV1* clone(void) const; + std::string classname(void) const; void read(const GFitsTable& table); void write(GFits& file) const; double psf(const double& offset, const double& logE, @@ -106,6 +107,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATPsfV1"). + ***************************************************************************/ +inline +std::string GLATPsfV1::classname(void) const +{ + return ("GLATPsfV1"); +} + + +/***********************************************************************//** * @brief Return point spread function version number * * @return Point spread function version number (1). diff --git a/inst/lat/include/GLATPsfV3.hpp b/inst/lat/include/GLATPsfV3.hpp index 63834fd..bdf31cb 100644 --- a/inst/lat/include/GLATPsfV3.hpp +++ b/inst/lat/include/GLATPsfV3.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATPsfV3.hpp - Fermi/LAT point spread function version 3 class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -62,6 +62,7 @@ public: // Methods void clear(void); GLATPsfV3* clone(void) const; + std::string classname(void) const; void read(const GFitsTable& table); void write(GFits& file) const; double psf(const double& offset, const double& logE, @@ -121,6 +122,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATPsfV3"). + ***************************************************************************/ +inline +std::string GLATPsfV3::classname(void) const +{ + return ("GLATPsfV3"); +} + + +/***********************************************************************//** * @brief Return point spread function version number * * @return Point spread function version number (3). diff --git a/inst/lat/include/GLATResponse.hpp b/inst/lat/include/GLATResponse.hpp index 8e4d714..8976665 100644 --- a/inst/lat/include/GLATResponse.hpp +++ b/inst/lat/include/GLATResponse.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATResponse.hpp - Fermi/LAT Response class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -61,6 +61,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GLATResponse* clone(void) const; + virtual std::string classname(void) const; virtual bool use_edisp(void) const; virtual bool use_tdisp(void) const; virtual double irf(const GEvent& event, @@ -116,6 +117,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATResponse"). + ***************************************************************************/ +inline +std::string GLATResponse::classname(void) const +{ + return ("GLATResponse"); +} + + +/***********************************************************************//** * @brief Signal if response uses energy dispersion * * @return True if response uses energy dispersion. diff --git a/inst/lat/include/GLATResponseTable.hpp b/inst/lat/include/GLATResponseTable.hpp index c0d7bac..d1b522d 100644 --- a/inst/lat/include/GLATResponseTable.hpp +++ b/inst/lat/include/GLATResponseTable.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATResponseTable.hpp - Fermi-LAT Response table class * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2013 by Juergen Knoedlseder * + * copyright (C) 2008-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Methods void clear(void); GLATResponseTable* clone(void) const; + std::string classname(void) const; void read(const GFitsTable& hdu); void write(GFitsTable& hdu) const; int index(const int& ie, const int& ic) const; @@ -113,6 +114,18 @@ private: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATResponseTable"). + ***************************************************************************/ +inline +std::string GLATResponseTable::classname(void) const +{ + return ("GLATResponseTable"); +} + + +/***********************************************************************//** * @brief Return number of bins in response table * * @return Number of bins in response table. diff --git a/inst/lat/include/GLATRoi.hpp b/inst/lat/include/GLATRoi.hpp index 97f887c..66f7f0e 100644 --- a/inst/lat/include/GLATRoi.hpp +++ b/inst/lat/include/GLATRoi.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATRoi.hpp - Fermi/LAT region of interest class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATRoi* clone(void) const; + virtual std::string classname(void) const; virtual bool contains(const GEvent& event) const; virtual std::string print(const GChatter& chatter = NORMAL) const; @@ -79,6 +80,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GLATRoi"). + ***************************************************************************/ +inline +std::string GLATRoi::classname(void) const +{ + return ("GLATRoi"); +} + + +/***********************************************************************//** * @brief Returns region of interest centre * * @return Region of interest centre sky direction. diff --git a/inst/lat/pyext/GLATObservation.i b/inst/lat/pyext/GLATObservation.i index a2f917e..4fd3eb1 100644 --- a/inst/lat/pyext/GLATObservation.i +++ b/inst/lat/pyext/GLATObservation.i @@ -44,7 +44,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GLATObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GLATResponse* response(void) const; virtual std::string instrument(void) const; diff --git a/inst/lat/test/test_LAT.hpp b/inst/lat/test/test_LAT.hpp index 19eef6c..6e498cd 100644 --- a/inst/lat/test/test_LAT.hpp +++ b/inst/lat/test/test_LAT.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_LAT.hpp - Test LAT classes * * ----------------------------------------------------------------------- * - * copyright (C) 2012 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -47,6 +47,7 @@ public: // Methods virtual void set(void); virtual TestGLATResponse* clone(void) const; + virtual std::string classname(void) const { return "TestGLATResponse"; } void test_response_p6(void); void test_response_p7(void); void test_one_response(const std::string& irf); @@ -67,6 +68,7 @@ public: // Methods virtual void set(void); virtual TestGLATLtCube* clone(void) const; + virtual std::string classname(void) const { return "TestGLATLtCube"; } void test_ltcube_p6(void); void test_ltcube_p7(void); void test_one_ltcube(const std::string& datadir, const double& reference); @@ -89,6 +91,7 @@ public: // Methods virtual void set(void); virtual TestGLATObservation* clone(void) const; + virtual std::string classname(void) const { return "TestGLATObservation"; } void test_unbinned_obs_p6(void); void test_unbinned_obs_p7(void); void test_binned_obs_p6(void); @@ -115,6 +118,7 @@ public: // Methods virtual void set(void); virtual TestGLATOptimize* clone(void) const; + virtual std::string classname(void) const { return "TestGLATOptimize"; } void test_binned_optimizer_p6(void); void test_binned_optimizer_p7(void); void test_one_binned_optimizer(const std::string& datadir, diff --git a/inst/mwl/include/GMWLDatum.hpp b/inst/mwl/include/GMWLDatum.hpp index f1ccbf6..e8397f4 100644 --- a/inst/mwl/include/GMWLDatum.hpp +++ b/inst/mwl/include/GMWLDatum.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMWLDatum.hpp - Multi-wavelength spectral point class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -59,6 +59,7 @@ public: // Implemented pure virtual base class methods virtual void clear(void); virtual GMWLDatum* clone(void) const; + virtual std::string classname(void) const; virtual double size(void) const; virtual const GMWLInstDir& dir(void) const; virtual const GEnergy& energy(void) const; @@ -93,6 +94,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMWLDatum"). + ***************************************************************************/ +inline +std::string GMWLDatum::classname(void) const +{ + return ("GMWLDatum"); +} + + +/***********************************************************************//** * @brief Return size of spectral bins * * @return Size of spectrl bin (always 1). diff --git a/inst/mwl/include/GMWLInstDir.hpp b/inst/mwl/include/GMWLInstDir.hpp index 5e62d70..fd141d6 100644 --- a/inst/mwl/include/GMWLInstDir.hpp +++ b/inst/mwl/include/GMWLInstDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMWLInstDir.hpp - Multi-wavelength instrument direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -55,6 +55,7 @@ public: // Methods void clear(void); GMWLInstDir* clone(void) const; + std::string classname(void) const; std::string print(const GChatter& chatter = NORMAL) const; protected: @@ -64,4 +65,16 @@ protected: void free_members(void); }; + +/***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMWLInstDir"). + ***************************************************************************/ +inline +std::string GMWLInstDir::classname(void) const +{ + return ("GMWLInstDir"); +} + #endif /* GMWLINSTDIR_HPP */ diff --git a/inst/mwl/include/GMWLObservation.hpp b/inst/mwl/include/GMWLObservation.hpp index 347678a..e08822c 100644 --- a/inst/mwl/include/GMWLObservation.hpp +++ b/inst/mwl/include/GMWLObservation.hpp @@ -60,7 +60,7 @@ public: // Implement pure virtual methods virtual void clear(void); virtual GMWLObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GMWLResponse* response(void) const; virtual std::string instrument(void) const; @@ -98,14 +98,14 @@ protected: /***********************************************************************//** - * @brief Return class type + * @brief Return class name * - * @return Returns "GMWLObservation". + * @return String containing the class name ("GMWLObservation"). ***************************************************************************/ inline -std::string GMWLObservation::type(void) const +std::string GMWLObservation::classname(void) const { - return "GMWLObservation"; + return ("GMWLObservation"); } diff --git a/inst/mwl/include/GMWLResponse.hpp b/inst/mwl/include/GMWLResponse.hpp index 61b2b70..65ee259 100644 --- a/inst/mwl/include/GMWLResponse.hpp +++ b/inst/mwl/include/GMWLResponse.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMWLResponse.hpp - Multi-wavelength response class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -57,6 +57,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GMWLResponse* clone(void) const; + virtual std::string classname(void) const; virtual bool use_edisp(void) const; virtual bool use_tdisp(void) const; virtual double irf(const GEvent& event, @@ -75,6 +76,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMWLResponse"). + ***************************************************************************/ +inline +std::string GMWLResponse::classname(void) const +{ + return ("GMWLResponse"); +} + + +/***********************************************************************//** * @brief Signal if response uses energy dispersion * * @return True if response uses energy dispersion. diff --git a/inst/mwl/include/GMWLSpectrum.hpp b/inst/mwl/include/GMWLSpectrum.hpp index 38eed72..5a818d9 100644 --- a/inst/mwl/include/GMWLSpectrum.hpp +++ b/inst/mwl/include/GMWLSpectrum.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GMWLSpectrum.hpp - Multi-wavelength spectrum class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -61,6 +61,7 @@ public: // Implemented pure virtual methods virtual void clear(void); virtual GMWLSpectrum* clone(void) const; + virtual std::string classname(void) const; virtual int size(void) const; virtual int dim(void) const; virtual int naxis(const int& axis) const; @@ -99,6 +100,18 @@ protected: /***********************************************************************//** + * @brief Return class name + * + * @return String containing the class name ("GMWLSpectrum"). + ***************************************************************************/ +inline +std::string GMWLSpectrum::classname(void) const +{ + return ("GMWLSpectrum"); +} + + +/***********************************************************************//** * @brief Return number of spectral bins * * @return Number of bins in spectrum. diff --git a/inst/mwl/pyext/GMWLObservation.i b/inst/mwl/pyext/GMWLObservation.i index 13e137e..da6c7da 100644 --- a/inst/mwl/pyext/GMWLObservation.i +++ b/inst/mwl/pyext/GMWLObservation.i @@ -51,7 +51,7 @@ public: // Implement pure virtual methods virtual void clear(void); virtual GMWLObservation* clone(void) const; - virtual std::string type(void) const; + virtual std::string classname(void) const; virtual void response(const GResponse& rsp); virtual const GMWLResponse* response(void) const; virtual std::string instrument(void) const; diff --git a/inst/mwl/test/test_MWL.hpp b/inst/mwl/test/test_MWL.hpp index bd30be4..700f66b 100644 --- a/inst/mwl/test/test_MWL.hpp +++ b/inst/mwl/test/test_MWL.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_MWL.hpp - Test multi-wavelength classes * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -46,10 +46,11 @@ public: virtual ~TestGMWL(void) {} // Methods - virtual void set(void); - virtual TestGMWL* clone(void) const; - void test_obs(void); - void test_optimizer(void); + virtual void set(void); + virtual TestGMWL* clone(void) const; + virtual std::string classname(void) const { return "TestGMWL"; } + void test_obs(void); + void test_optimizer(void); }; #endif /* TEST_MWL_HPP */ diff --git a/pyext/GEvents.i b/pyext/GEvents.i index 3ae468a..9e4a8e0 100644 --- a/pyext/GEvents.i +++ b/pyext/GEvents.i @@ -1,7 +1,7 @@ /*************************************************************************** * GEvents.i - Abstract event container class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2013 by Juergen Knoedlseder * + * copyright (C) 2010-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -32,19 +32,6 @@ #include "GTools.hpp" %} -/* __ Typemaps ___________________________________________________________ */ -%typemap(out) GEvent* { - if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEventBin, 0 | 0 ); - } - else if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEventAtom, 0 | 0 ); - } - else { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEvent, 0 | 0 ); - } -} - /***********************************************************************//** * @class GEvents diff --git a/pyext/GObservation.i b/pyext/GObservation.i index 41f36f9..6ed1575 100644 --- a/pyext/GObservation.i +++ b/pyext/GObservation.i @@ -32,19 +32,6 @@ #include "GTools.hpp" %} -/* __ Typemaps ___________________________________________________________ */ -%typemap(out) GEvents* { - if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEventList, 0 | 0 ); - } - else if (dynamic_cast($1) != NULL) { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEventCube, 0 | 0 ); - } - else { - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GEvents, 0 | 0 ); - } -} - /***********************************************************************//** * @class GObservation @@ -61,7 +48,7 @@ public: // Pure virtual methods virtual void clear(void) = 0; virtual GObservation* clone(void) const = 0; - virtual std::string type(void) const = 0; + virtual std::string classname(void) const = 0; virtual void response(const GResponse& rsp) = 0; virtual const GResponse* response(void) const = 0; virtual std::string instrument(void) const = 0; diff --git a/pyext/GObservations.i b/pyext/GObservations.i index 9fe5db5..391cc74 100644 --- a/pyext/GObservations.i +++ b/pyext/GObservations.i @@ -30,25 +30,6 @@ %} -/* __ Typemaps ___________________________________________________________ */ -%typemap(out) GObservation* { - char classname[80]; - strcpy(classname, "_p_"); - strcat(classname, result->type().c_str()); - swig_type_info *myinfo = SWIGTYPE_p_GObservation; - swig_cast_info *mycast = 0; - mycast = myinfo->cast; - while (mycast != 0) { - if (strcmp(classname, mycast->type->name) == 0) { - myinfo = mycast->type; - break; - } - mycast = mycast->next; - } - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); -} - - /***********************************************************************//** * @class GObservations * diff --git a/pyext/GTestSuite.i b/pyext/GTestSuite.i index 2cc04aa..396537f 100644 --- a/pyext/GTestSuite.i +++ b/pyext/GTestSuite.i @@ -114,6 +114,11 @@ public: return new GPythonTestSuite(*this); } + // Classname method (implementation makes this class non-abstract) + std::string classname(void) const { + return ("GPythonTestSuite"); + } + // Generic test function for Python callback void test(void) { diff --git a/pyext/gammalib/obs.i b/pyext/gammalib/obs.i index 07b9730..6d68c01 100644 --- a/pyext/gammalib/obs.i +++ b/pyext/gammalib/obs.i @@ -50,6 +50,104 @@ /* __ Make sure that exceptions are catched ______________________________ */ %import(module="gammalib.support") "GException.i"; +/* __ Typemaps ___________________________________________________________ */ +%typemap(out) GObservation* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GObservation; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} +%typemap(out) GEvents* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GEvents; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} +%typemap(out) GEvent* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GEvent; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} +%typemap(out) GInstDir* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GInstDir; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} +%typemap(out) GRoi* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GRoi; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} +%typemap(out) GResponse* { + char classname[80]; + strcpy(classname, "_p_"); + strcat(classname, result->classname().c_str()); + swig_type_info *myinfo = SWIGTYPE_p_GResponse; + swig_cast_info *mycast = 0; + mycast = myinfo->cast; + while (mycast != 0) { + if (strcmp(classname, mycast->type->name) == 0) { + myinfo = mycast->type; + break; + } + mycast = mycast->next; + } + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); +} + /* __ Observation handling _______________________________________________ */ %include "GEnergy.i" %include "GEnergies.i" diff --git a/test/test_GApplication.hpp b/test/test_GApplication.hpp index 2cff9fd..0015c0d 100644 --- a/test/test_GApplication.hpp +++ b/test/test_GApplication.hpp @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGApplication* clone(void) const; + virtual std::string classname(void) const { return "TestGApplication"; } void test_constructor(void); void test_stream_logger(void); void test_C_logger(void); diff --git a/test/test_GFits.hpp b/test/test_GFits.hpp index 0e48754..52ad821 100644 --- a/test/test_GFits.hpp +++ b/test/test_GFits.hpp @@ -44,28 +44,29 @@ public: virtual ~TestGFits(void){ } // Methods - virtual void set(void); - virtual TestGFits* clone(void) const; - void test_create(void); - void test_file_manipulation(void); - void test_image_byte(void); - void test_image_ushort(void); - void test_image_short(void); - void test_image_ulong(void); - void test_image_long(void); - void test_image_longlong(void); - void test_image_float(void); - void test_image_double(void); - void test_bintable_bit(void); - void test_bintable_logical(void); - void test_bintable_string(void); - void test_bintable_double(void); - void test_bintable_float(void); - void test_bintable_ushort(void); - void test_bintable_short(void); - void test_bintable_ulong(void); - void test_bintable_long(void); - void test_bintable_longlong(void); + virtual void set(void); + virtual TestGFits* clone(void) const; + virtual std::string classname(void) const { return "TestGFits"; } + void test_create(void); + void test_file_manipulation(void); + void test_image_byte(void); + void test_image_ushort(void); + void test_image_short(void); + void test_image_ulong(void); + void test_image_long(void); + void test_image_longlong(void); + void test_image_float(void); + void test_image_double(void); + void test_bintable_bit(void); + void test_bintable_logical(void); + void test_bintable_string(void); + void test_bintable_double(void); + void test_bintable_float(void); + void test_bintable_ushort(void); + void test_bintable_short(void); + void test_bintable_ulong(void); + void test_bintable_long(void); + void test_bintable_longlong(void); }; #endif /* TEST_GFITS_HPP */ diff --git a/test/test_GMatrix.hpp b/test/test_GMatrix.hpp index d76f936..e15f7d1 100644 --- a/test/test_GMatrix.hpp +++ b/test/test_GMatrix.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GMatrix.hpp - Test generic matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -50,6 +50,7 @@ public: // Methods virtual void set(void); virtual TestGMatrix* clone(void) const; + virtual std::string classname(void) const { return "TestGMatrix"; } void alloc_matrix(void); void assign_values(void); void copy_matrix(void); diff --git a/test/test_GMatrixSparse.hpp b/test/test_GMatrixSparse.hpp index 9c758db..e03ea82 100644 --- a/test/test_GMatrixSparse.hpp +++ b/test/test_GMatrixSparse.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GMatrixSparse.hpp - Test sparse matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -50,6 +50,7 @@ public: // Methods virtual void set(void); virtual TestGMatrixSparse* clone(void) const; + virtual std::string classname(void) const { return "TestGMatrixSparse"; } void alloc_matrix(void); void assign_values(void); void copy_matrix(void); diff --git a/test/test_GMatrixSymmetric.hpp b/test/test_GMatrixSymmetric.hpp index 2d08eb3..09aa2f9 100644 --- a/test/test_GMatrixSymmetric.hpp +++ b/test/test_GMatrixSymmetric.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GMatrixSymmetric.hpp - Test symmetric matrix class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Juergen Knoedlseder * + * copyright (C) 2012-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -50,6 +50,7 @@ public: // Methods virtual void set(void); virtual TestGMatrixSymmetric* clone(void) const; + virtual std::string classname(void) const { return "TestGMatrixSymmetric"; } void alloc_matrix(void); void assign_values(void); void copy_matrix(void); diff --git a/test/test_GModel.hpp b/test/test_GModel.hpp index 14e4530..01155f0 100644 --- a/test/test_GModel.hpp +++ b/test/test_GModel.hpp @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGModel* clone(void) const; + virtual std::string classname(void) const { return "TestGModel"; } void test_model_par(void); void test_sky_model(void); void test_point_source(void); diff --git a/test/test_GNumerics.hpp b/test/test_GNumerics.hpp index 26e1aad..e348782 100644 --- a/test/test_GNumerics.hpp +++ b/test/test_GNumerics.hpp @@ -67,6 +67,7 @@ public: // Methods virtual void set(void); virtual TestGNumerics* clone(void) const; + virtual std::string classname(void) const { return "TestGNumerics"; } void test_integral(void); void test_romberg_integration(void); void test_adaptive_simpson_integration(void); diff --git a/test/test_GObservation.hpp b/test/test_GObservation.hpp index 9890209..9101e1c 100644 --- a/test/test_GObservation.hpp +++ b/test/test_GObservation.hpp @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGObservation* clone(void) const; + virtual std::string classname(void) const { return "TestGObservation"; } void test_ebounds(void); void test_gti(void); void test_photons(void); @@ -73,6 +74,7 @@ public: // Methods virtual void set(void); virtual TestOpenMP* clone(void) const; + virtual std::string classname(void) const { return "TestOpenMP"; } void test_observations_optimizer_unbinned_1(); void test_observations_optimizer_unbinned_10(); void test_observations_optimizer_binned_1(); diff --git a/test/test_GOptimizer.hpp b/test/test_GOptimizer.hpp index 28cd7a7..55b642a 100644 --- a/test/test_GOptimizer.hpp +++ b/test/test_GOptimizer.hpp @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGOptimizer* clone(void) const; + virtual std::string classname(void) const { return "TestGOptimizer"; } void test_unbinned_optimizer(void); void test_binned_optimizer(void); void test_optimizer(const int& mode); diff --git a/test/test_GSky.hpp b/test/test_GSky.hpp index 89fa6c1..c5add6e 100644 --- a/test/test_GSky.hpp +++ b/test/test_GSky.hpp @@ -38,19 +38,20 @@ public: virtual ~TestGSky(void) { } // Methods - virtual void set(void); - virtual TestGSky* clone(void) const; - void test_GWcs(void); - void test_GSkyPixel(void); - void test_GSkymap_healpix_construct(void); - void test_GSkymap_healpix_io(void); - void test_GSkymap_wcs_construct(void); - void test_GSkymap_wcs_io(void); - void test_GSkymap(void); - void test_GSkyRegions_io(void); - void test_GSkyRegionCircle_construct(void); - void test_GSkyRegionCircle_logic(void); - void test_GHorizDir(void); + virtual void set(void); + virtual TestGSky* clone(void) const; + virtual std::string classname(void) const { return "TestGSky"; } + void test_GWcs(void); + void test_GSkyPixel(void); + void test_GSkymap_healpix_construct(void); + void test_GSkymap_healpix_io(void); + void test_GSkymap_wcs_construct(void); + void test_GSkymap_wcs_io(void); + void test_GSkymap(void); + void test_GSkyRegions_io(void); + void test_GSkyRegionCircle_construct(void); + void test_GSkyRegionCircle_logic(void); + void test_GHorizDir(void); // Private methods private: diff --git a/test/test_GSupport.hpp b/test/test_GSupport.hpp index af53369..e150f0c 100644 --- a/test/test_GSupport.hpp +++ b/test/test_GSupport.hpp @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGSupport* clone(void) const; + virtual std::string classname(void) const { return "TestGSupport"; } void test_expand_env(void); void test_node_array(void); void test_url_file(void); diff --git a/test/test_GVO.hpp b/test/test_GVO.hpp index e6fe93a..33ea6d7 100644 --- a/test/test_GVO.hpp +++ b/test/test_GVO.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GVO.hpp - Test VO module * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -44,9 +44,10 @@ public: virtual ~TestGVO(void) {} // Methods - virtual void set(void); - virtual TestGVO* clone(void) const; - void test_GVOClient(void); + virtual void set(void); + virtual TestGVO* clone(void) const; + virtual std::string classname(void) const { return "TestGVO"; } + void test_GVOClient(void); private: // Private members diff --git a/test/test_GVector.hpp b/test/test_GVector.hpp index 963275f..6fd92da 100644 --- a/test/test_GVector.hpp +++ b/test/test_GVector.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GVector.hpp - Test vector class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGVector* clone(void) const; + virtual std::string classname(void) const { return "TestGVector"; } void define_vectors(void); void allocation(void); void assign(void); diff --git a/test/test_GXml.hpp b/test/test_GXml.hpp index 094b0b5..f7ddaec 100644 --- a/test/test_GXml.hpp +++ b/test/test_GXml.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GXml.hpp - Test xml module * * ----------------------------------------------------------------------- * - * copyright (C) 2012 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -44,13 +44,14 @@ public: virtual ~TestGXml(void) {} // Methods - virtual void set(void); - virtual TestGXml* clone(void) const; - void test_GXml_attributes(void); - void test_GXml_elements(void); - void test_GXml_construct(void); - void test_GXml_load(void); - void test_GXml_access(void); + virtual void set(void); + virtual TestGXml* clone(void) const; + virtual std::string classname(void) const { return "TestGXml"; } + void test_GXml_attributes(void); + void test_GXml_elements(void); + void test_GXml_construct(void); + void test_GXml_load(void); + void test_GXml_access(void); private: // Private members diff --git a/test/test_GXspec.hpp b/test/test_GXspec.hpp index 08a306f..6e9d335 100644 --- a/test/test_GXspec.hpp +++ b/test/test_GXspec.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GXspec.hpp - Test Xspec module * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Juergen Knoedlseder * + * copyright (C) 2013-2014 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -46,6 +46,7 @@ public: // Methods virtual void set(void); virtual TestGXspec* clone(void) const; + virtual std::string classname(void) const { return "TestGXspec"; } void test_GPha(void); void test_GArf(void); void test_GRmf(void); diff --git a/test/testinst/GTestEventAtom.hpp b/test/testinst/GTestEventAtom.hpp index d39b3cb..eb6988c 100644 --- a/test/testinst/GTestEventAtom.hpp +++ b/test/testinst/GTestEventAtom.hpp @@ -96,6 +96,7 @@ class GTestEventAtom : public GEventAtom { } GTestEventAtom* clone(void) const{ return new GTestEventAtom(*this);} + std::string classname(void) const { return "GTestEventAtom"; } const GTestInstDir& dir(void) const { return m_dir; } const GEnergy& energy(void) const { return m_energy; } const GTime& time(void) const { return m_time; } diff --git a/test/testinst/GTestEventBin.hpp b/test/testinst/GTestEventBin.hpp index a3fd7cd..de78bda 100644 --- a/test/testinst/GTestEventBin.hpp +++ b/test/testinst/GTestEventBin.hpp @@ -89,8 +89,9 @@ public: // Return return; } - virtual GTestEventBin* clone(void) const{ return new GTestEventBin(*this); } - virtual double size(void) const{ + virtual GTestEventBin* clone(void) const{ return new GTestEventBin(*this); } + virtual std::string classname(void) const { return "GTestEventBin"; } + virtual double size(void) const{ // Compute bin size double size = ewidth().MeV() * ontime(); diff --git a/test/testinst/GTestEventCube.hpp b/test/testinst/GTestEventCube.hpp index 1a5eea7..c98d5fa 100644 --- a/test/testinst/GTestEventCube.hpp +++ b/test/testinst/GTestEventCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestEventCube.hpp - Test event bin container class * * ----------------------------------------------------------------------- * - * copyright (C) 2013 by Jean-Baptiste Cayrou * + * copyright (C) 2013-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -97,6 +97,7 @@ public: return; } virtual GTestEventCube* clone(void) const { return new GTestEventCube(*this);} + virtual std::string classname(void) const { return "GTestEventCube"; } virtual int size(void) const { return m_bins.size(); } virtual int dim(void) const { return 1; } virtual int naxis(const int& axis) const { return 1;} diff --git a/test/testinst/GTestEventList.hpp b/test/testinst/GTestEventList.hpp index c057ec3..33d01ae 100644 --- a/test/testinst/GTestEventList.hpp +++ b/test/testinst/GTestEventList.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestEventList.hpp - Test event atom container class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -93,6 +93,7 @@ public: virtual GTestEventList* clone(void) const{ return new GTestEventList(*this); } + virtual std::string classname(void) const { return "GTestEventList"; } virtual int size(void) const { return m_events.size(); } virtual void load(const std::string& filename) {} virtual void save(const std::string& filename, diff --git a/test/testinst/GTestInstDir.hpp b/test/testinst/GTestInstDir.hpp index 2f06411..3e19acc 100644 --- a/test/testinst/GTestInstDir.hpp +++ b/test/testinst/GTestInstDir.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestInstDir.hpp - Test instrument direction class * * ----------------------------------------------------------------------- * - * copyright (C) 2012 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -85,6 +85,7 @@ public: } GTestInstDir* clone(void) const{ return new GTestInstDir(*this); } + std::string classname(void) const { return "GTestInstDir"; } std::string print(const GChatter& chatter = NORMAL) const{ std::string result = "=== GTestInstDir ==="; diff --git a/test/testinst/GTestModelData.hpp b/test/testinst/GTestModelData.hpp index b988f1a..19db91e 100644 --- a/test/testinst/GTestModelData.hpp +++ b/test/testinst/GTestModelData.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestModelData.hpp - Test data model class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -87,6 +87,7 @@ public: return; } virtual GTestModelData* clone(void) const { return new GTestModelData(*this); } + virtual std::string classname(void) const { return "GTestModelData"; } virtual std::string type(void) const {return "=== GTestModelData ===";} virtual bool is_constant(void) const {return true;} virtual double eval(const GEvent& event, diff --git a/test/testinst/GTestObservation.hpp b/test/testinst/GTestObservation.hpp index 5e3b30f..71acf29 100644 --- a/test/testinst/GTestObservation.hpp +++ b/test/testinst/GTestObservation.hpp @@ -70,6 +70,7 @@ public: virtual GTestObservation* clone(void) const { return new GTestObservation(*this); } + virtual std::string classname(void) const { return "GTestObservation"; } virtual void response(const GResponse& rsp) { const GTestResponse* testrsp = dynamic_cast(&rsp); if (testrsp == NULL) { diff --git a/test/testinst/GTestResponse.hpp b/test/testinst/GTestResponse.hpp index 647b309..984ad29 100644 --- a/test/testinst/GTestResponse.hpp +++ b/test/testinst/GTestResponse.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestResponse.hpp - Test response class * * ----------------------------------------------------------------------- * - * copyright (C) 2012 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -98,6 +98,7 @@ public: virtual GTestResponse* clone(void) const{ return new GTestResponse(*this); } + virtual std::string classname(void) const { return "GTestResponse"; } virtual bool use_edisp(void) const { return false; } virtual bool use_tdisp(void) const { return false; } diff --git a/test/testinst/GTestRoi.hpp b/test/testinst/GTestRoi.hpp index 8960608..82aeb52 100644 --- a/test/testinst/GTestRoi.hpp +++ b/test/testinst/GTestRoi.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GTestRoi.hpp - Test region of interest class * * ----------------------------------------------------------------------- * - * copyright (C) 2012-2013 by Jean-Baptiste Cayrou * + * copyright (C) 2012-2014 by Jean-Baptiste Cayrou * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -69,6 +69,7 @@ public: virtual GTestRoi* clone(void) const{ return new GTestRoi(*this); } + virtual std::string classname(void) const { return "GTestRoi"; } virtual bool contains(const GEvent& event) const { return true; } -- libgit2 0.21.4