diff --git a/ChangeLog b/ChangeLog index d5d9222..dae074c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2020-11-07 +2020-11-17 * Version 2.0.0 released ======================== @@ -6,6 +6,7 @@ Add models() method to ctobssim (#3441) Add ctlike results to XML file (#3431) Fix implementation of fix_spat_for_ts parameter in ctlike (#3426) + Replace std::tmpnam() by gammalib::tmpnam() function in ctselect (#3324) 2020-09-04 diff --git a/NEWS b/NEWS index edf6ed2..19c8b01 100755 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in ctools 2.0.0 -7 November 2020 +17 November 2020 Introduction @@ -118,7 +118,7 @@ None ctselect - CTA event selection ------------------------------ -None +Replaced std::tmpnam() by gammalib::tmpnam() function in ctselect (#3324). ctskymap - CTA sky mapping diff --git a/README.md b/README.md index bad16ad..1352f30 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ctools information ================== -* Version: 2.0.0.dev (7 November 2020) +* Version: 2.0.0.dev (17 November 2020) * GammaLib dependency: 2.0.0.dev [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=ctools-integrate-os)](https://cta-jenkins.irap.omp.eu/job/ctools-integrate-os/) diff --git a/configure.ac b/configure.ac index 943544e..a4aadb1 100755 --- a/configure.ac +++ b/configure.ac @@ -31,9 +31,8 @@ AC_INIT([ctools], [2.0.0.dev], [jurgen.knodlseder@irap.omp.eu], [ctools]) AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) AC_CONFIG_MACRO_DIR([m4]) -#AM_INIT_AUTOMAKE([gnu no-dependencies foreign]) -AM_INIT_AUTOMAKE([gnu -Wno-portability foreign]) -#AM_INIT_AUTOMAKE([gnu -Wno-portability foreign serial-tests]) +#AM_INIT_AUTOMAKE([gnu -Wno-portability foreign]) +AM_INIT_AUTOMAKE([gnu -Wno-portability foreign serial-tests]) AC_CONFIG_HEADER([config.h]) diff --git a/doc/source/admin/release_history/2.0.rst b/doc/source/admin/release_history/2.0.rst index dc69fc5..5de4ad7 100644 --- a/doc/source/admin/release_history/2.0.rst +++ b/doc/source/admin/release_history/2.0.rst @@ -1,7 +1,7 @@ .. _2.0: -ctools 2.0 release (7 November 2020) -==================================== +ctools 2.0 release (17 November 2020) +===================================== Overview -------- @@ -28,6 +28,8 @@ Improvements Add ``models()`` method to :ref:`ctobssim` * [`3431 `_] - Add :ref:`ctlike` results to XML file +* [`3324 `_] - + Replace ``std::tmpnam()`` by ``gammalib::tmpnam()`` function in :ref:`ctselect` New features diff --git a/src/ctselect/ctselect.cpp b/src/ctselect/ctselect.cpp index 0a266a9..91f7ad1 100755 --- a/src/ctselect/ctselect.cpp +++ b/src/ctselect/ctselect.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctselect - Data selection tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2018 by Juergen Knoedlseder * + * copyright (C) 2010-2020 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -42,7 +42,6 @@ /* __ Debug definitions __________________________________________________ */ /* __ Coding definitions _________________________________________________ */ -//#define G_USE_MKSTEMP //!< Use mkstemp for temporary filename /*========================================================================== @@ -297,13 +296,7 @@ void ctselect::run(void) } // Get temporary file name - #if G_USE_MKSTEMP - char tpl[] = "ctselectXXXXXX"; - int fileid = mkstemp(tpl); - std::string filename(tpl); - #else - std::string filename = std::tmpnam(NULL); - #endif + std::string filename = gammalib::tmpnam(); // Save observation in temporary file. We add here the events and // GTI extension name so that the GCTAObservation::save method can @@ -330,11 +323,6 @@ void ctselect::run(void) // Load observation from temporary file, including event selection select_events(obs, filename, m_evtname[i], m_gtiname[i]); - // Close temporary file - #if G_USE_MKSTEMP - close(fileid); - #endif - // Remove temporary file std::remove(filename.c_str());