From 6de74a95459f4abda82080fd04dfd1d37c675a32 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Thu, 21 Feb 2013 01:39:06 +0100 Subject: [PATCH] Adapt to new GammaLib-00-08-00 interface. --- src/ctbin/ctbin.cpp | 15 ++++++--------- src/ctbin/ctbin.hpp | 6 +++--- src/ctmodel/ctmodel.cpp | 11 ++++------- src/ctmodel/ctmodel.hpp | 2 +- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index cb431d1..688d729 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctbin - CTA data binning tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2012 by Juergen Knoedlseder * + * copyright (C) 2010-2013 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -21,7 +21,7 @@ /** * @file ctbin.cpp * @brief CTA data binning tool implementation - * @author J. Knoedlseder + * @author Juergen Knoedlseder */ /* __ Includes ___________________________________________________________ */ @@ -92,7 +92,7 @@ ctbin::ctbin(GObservations obs) : GApplication(CTBIN_NAME, CTBIN_VERSION) * @param[in] argv Array of command line arguments. ***************************************************************************/ ctbin::ctbin(int argc, char *argv[]) : - GApplication(CTBIN_NAME, CTBIN_VERSION, argc, argv) + GApplication(CTBIN_NAME, CTBIN_VERSION, argc, argv) { // Initialise members init_members(); @@ -481,12 +481,9 @@ void ctbin::bin_events(GCTAObservation* obs) } // Setup energy range covered by data - GEnergy emin; - GEnergy emax; - GEbounds ebds; - emin.TeV(m_emin); - emax.TeV(m_emax); - ebds.setlog(emin, emax, m_enumbins); + GEnergy emin(m_emin, "TeV"); + GEnergy emax(m_emax, "TeV"); + GEbounds ebds(m_enumbins, emin, emax); // Get Good Time intervals GGti gti = obs->events()->gti(); diff --git a/src/ctbin/ctbin.hpp b/src/ctbin/ctbin.hpp index d0016b6..97cea1a 100644 --- a/src/ctbin/ctbin.hpp +++ b/src/ctbin/ctbin.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctbin - CTA data binning tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2012 by Juergen Knoedlseder * + * copyright (C) 2010-2013 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -21,7 +21,7 @@ /** * @file ctbin.hpp * @brief CTA data binning tool definition - * @author J. Knoedlseder + * @author Juergen Knoedlseder */ #ifndef CTBIN_HPP @@ -33,7 +33,7 @@ /* __Definitions _________________________________________________________ */ #define CTBIN_NAME "ctbin" -#define CTBIN_VERSION "00-03-01" +#define CTBIN_VERSION "00-04-00" /***********************************************************************//** diff --git a/src/ctmodel/ctmodel.cpp b/src/ctmodel/ctmodel.cpp index d9accca..16acc84 100644 --- a/src/ctmodel/ctmodel.cpp +++ b/src/ctmodel/ctmodel.cpp @@ -482,13 +482,10 @@ void ctmodel::setup_obs(void) skydir.radec_deg(m_ra, m_dec); pnt.dir(skydir); - // Setup energy range covered by model - GEnergy emin; - GEnergy emax; - GEbounds ebds; - emin.TeV(m_emin); - emax.TeV(m_emax); - ebds.setlog(emin, emax, m_enumbins); + // Setup energy range covered by data + GEnergy emin(m_emin, "TeV"); + GEnergy emax(m_emax, "TeV"); + GEbounds ebds(m_enumbins, emin, emax); // Setup time interval covered by model GGti gti; diff --git a/src/ctmodel/ctmodel.hpp b/src/ctmodel/ctmodel.hpp index 8a0cd00..e70d7be 100644 --- a/src/ctmodel/ctmodel.hpp +++ b/src/ctmodel/ctmodel.hpp @@ -33,7 +33,7 @@ /* __Definitions _________________________________________________________ */ #define CTMODEL_NAME "ctmodel" -#define CTMODEL_VERSION "00-01-01" +#define CTMODEL_VERSION "00-02-00" /***********************************************************************//** -- libgit2 0.21.4