Commit 6de74a95459f4abda82080fd04dfd1d37c675a32

Authored by Jürgen Knödlseder
1 parent 606c112d

Adapt to new GammaLib-00-08-00 interface.

The GEbounds::setlog method has been modified and consequently the code has been adapted to accomodate this change.
src/ctbin/ctbin.cpp
1 1 /***************************************************************************
2 2 * ctbin - CTA data binning tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -21,7 +21,7 @@
21 21 /**
22 22 * @file ctbin.cpp
23 23 * @brief CTA data binning tool implementation
24   - * @author J. Knoedlseder
  24 + * @author Juergen Knoedlseder
25 25 */
26 26  
27 27 /* __ Includes ___________________________________________________________ */
... ... @@ -92,7 +92,7 @@ ctbin::ctbin(GObservations obs) : GApplication(CTBIN_NAME, CTBIN_VERSION)
92 92 * @param[in] argv Array of command line arguments.
93 93 ***************************************************************************/
94 94 ctbin::ctbin(int argc, char *argv[]) :
95   - GApplication(CTBIN_NAME, CTBIN_VERSION, argc, argv)
  95 + GApplication(CTBIN_NAME, CTBIN_VERSION, argc, argv)
96 96 {
97 97 // Initialise members
98 98 init_members();
... ... @@ -481,12 +481,9 @@ void ctbin::bin_events(GCTAObservation* obs)
481 481 }
482 482  
483 483 // Setup energy range covered by data
484   - GEnergy emin;
485   - GEnergy emax;
486   - GEbounds ebds;
487   - emin.TeV(m_emin);
488   - emax.TeV(m_emax);
489   - ebds.setlog(emin, emax, m_enumbins);
  484 + GEnergy emin(m_emin, "TeV");
  485 + GEnergy emax(m_emax, "TeV");
  486 + GEbounds ebds(m_enumbins, emin, emax);
490 487  
491 488 // Get Good Time intervals
492 489 GGti gti = obs->events()->gti();
... ...
src/ctbin/ctbin.hpp
1 1 /***************************************************************************
2 2 * ctbin - CTA data binning tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -21,7 +21,7 @@
21 21 /**
22 22 * @file ctbin.hpp
23 23 * @brief CTA data binning tool definition
24   - * @author J. Knoedlseder
  24 + * @author Juergen Knoedlseder
25 25 */
26 26  
27 27 #ifndef CTBIN_HPP
... ... @@ -33,7 +33,7 @@
33 33  
34 34 /* __Definitions _________________________________________________________ */
35 35 #define CTBIN_NAME "ctbin"
36   -#define CTBIN_VERSION "00-03-01"
  36 +#define CTBIN_VERSION "00-04-00"
37 37  
38 38  
39 39 /***********************************************************************//**
... ...
src/ctmodel/ctmodel.cpp
... ... @@ -482,13 +482,10 @@ void ctmodel::setup_obs(void)
482 482 skydir.radec_deg(m_ra, m_dec);
483 483 pnt.dir(skydir);
484 484  
485   - // Setup energy range covered by model
486   - GEnergy emin;
487   - GEnergy emax;
488   - GEbounds ebds;
489   - emin.TeV(m_emin);
490   - emax.TeV(m_emax);
491   - ebds.setlog(emin, emax, m_enumbins);
  485 + // Setup energy range covered by data
  486 + GEnergy emin(m_emin, "TeV");
  487 + GEnergy emax(m_emax, "TeV");
  488 + GEbounds ebds(m_enumbins, emin, emax);
492 489  
493 490 // Setup time interval covered by model
494 491 GGti gti;
... ...
src/ctmodel/ctmodel.hpp
... ... @@ -33,7 +33,7 @@
33 33  
34 34 /* __Definitions _________________________________________________________ */
35 35 #define CTMODEL_NAME "ctmodel"
36   -#define CTMODEL_VERSION "00-01-01"
  36 +#define CTMODEL_VERSION "00-02-00"
37 37  
38 38  
39 39 /***********************************************************************//**
... ...