From 0fedf698ee2286b3e0cdf671dfece2fa63a328c8 Mon Sep 17 00:00:00 2001 From: knodlseder <> Date: Sun, 16 May 2010 03:22:09 +0000 Subject: [PATCH] update for testing --- configure.ac | 7 +++++-- src/ctselect/Makefile.am | 4 +++- src/ctselect/ctselect.cpp | 28 ++++++++++++++++++++++------ src/ctselect/ctselect.hpp | 23 +++++++++++++++++++---- 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 661dc45..25183b1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,18 +1,21 @@ # Process this file with autoconf to produce a configure script. -#AC_PREREQ([2.64]) AC_INIT([ctatools], [0.1.0], [knodlseder@cesr.fr]) AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE +# Set prefix +AC_PREFIX_DEFAULT([/usr/local/gamma]) +AC_DEFINE([PREFIX], [$prefix], 'Installation prefix') + # Checks for programs. AC_PROG_CXX AC_PROG_INSTALL # Checks for libraries. if test "x$prefix" = xNONE; then - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/gamma/lib/pkgconfig" else export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig" fi diff --git a/src/ctselect/Makefile.am b/src/ctselect/Makefile.am index 6ce670b..257a9dd 100644 --- a/src/ctselect/Makefile.am +++ b/src/ctselect/Makefile.am @@ -11,6 +11,8 @@ INCLUDES = -I$(top_srcdir)/include \ bin_PROGRAMS = ctselect ctselect_SOURCES = ctselect.cpp -#ctselect_LDADD = libgamma.la ctselect_LDFLAGS = @LDFLAGS@ ctselect_CPPFLAGS = @CPPFLAGS@ + +pfilesdir = $(prefix)/syspfiles +pfiles_DATA = ctselect.par \ No newline at end of file diff --git a/src/ctselect/ctselect.cpp b/src/ctselect/ctselect.cpp index 2007344..156a6cc 100644 --- a/src/ctselect/ctselect.cpp +++ b/src/ctselect/ctselect.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * ctselect * + * ctselect - CTA data selection tool * * ----------------------------------------------------------------------- * * copyright (C) 2010 by Jurgen Knodlseder * * ----------------------------------------------------------------------- * @@ -12,7 +12,7 @@ ***************************************************************************/ /** * @file ctselect.cpp - * @brief CTA data selection tool + * @brief CTA data selection tool implementation * @author J. Knodlseder */ @@ -25,16 +25,32 @@ /***********************************************************************//** - * @brief Entry point + * @brief Main entry point * * @param[in] argc Number of arguments * @param[in] argv Arguments ***************************************************************************/ int main (int argc, char *argv[]) { - // Dummy - printf("Hello world!\n"); + // Create instance of application + ctselect application(argc, argv); + + // Run application + int rc = application.run(); // Return - return 0; + return rc; } + + +/***********************************************************************//** + * @brief Application + ***************************************************************************/ +int ctselect::run(void) +{ + // Test dump + std::cout << *this << std::endl; + + // Return + return 0; +} \ No newline at end of file diff --git a/src/ctselect/ctselect.hpp b/src/ctselect/ctselect.hpp index 247c50e..9cfe710 100644 --- a/src/ctselect/ctselect.hpp +++ b/src/ctselect/ctselect.hpp @@ -1,5 +1,5 @@ /*************************************************************************** - * ctselect * + * ctselect - CTA data selection tool * * ----------------------------------------------------------------------- * * copyright (C) 2010 by Jurgen Knodlseder * * ----------------------------------------------------------------------- * @@ -20,11 +20,26 @@ #define CTSELECT_HPP /* __ Includes ___________________________________________________________ */ +#include "GammaLib.hpp" -/* __ Namespaces _________________________________________________________ */ +/* __Definitions _________________________________________________________ */ +#define APP_NAME "ctselect" +#define APP_VERSION "v1r0p0" -/* __ Constants __________________________________________________________ */ -/* __ Prototypes ________________________________________________________ */ +/***********************************************************************//** + * @class ctselect + * + * @brief CTA data selection tool interface defintion. + ***************************************************************************/ +class ctselect : public GApplication { +public: + // Constructors and destructors + ctselect(int argc, char *argv[]) : + GApplication(APP_NAME, APP_VERSION, argc, argv) { return; } + + // Methods + int run(void); +}; #endif /* CTSELECT_HPP */ -- libgit2 0.21.4