Commit 0fedf698ee2286b3e0cdf671dfece2fa63a328c8

Authored by knodlseder
1 parent df71d1cc

update for testing

configure.ac
1 # Process this file with autoconf to produce a configure script. 1 # Process this file with autoconf to produce a configure script.
2 2
3 -#AC_PREREQ([2.64])  
4 AC_INIT([ctatools], [0.1.0], [knodlseder@cesr.fr]) 3 AC_INIT([ctatools], [0.1.0], [knodlseder@cesr.fr])
5 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) 4 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
6 AC_CONFIG_HEADERS([config.h]) 5 AC_CONFIG_HEADERS([config.h])
7 AM_INIT_AUTOMAKE 6 AM_INIT_AUTOMAKE
8 7
  8 +# Set prefix
  9 +AC_PREFIX_DEFAULT([/usr/local/gamma])
  10 +AC_DEFINE([PREFIX], [$prefix], 'Installation prefix')
  11 +
9 # Checks for programs. 12 # Checks for programs.
10 AC_PROG_CXX 13 AC_PROG_CXX
11 AC_PROG_INSTALL 14 AC_PROG_INSTALL
12 15
13 # Checks for libraries. 16 # Checks for libraries.
14 if test "x$prefix" = xNONE; then 17 if test "x$prefix" = xNONE; then
15 - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" 18 + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/gamma/lib/pkgconfig"
16 else 19 else
17 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig" 20 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
18 fi 21 fi
src/ctselect/Makefile.am
@@ -11,6 +11,8 @@ INCLUDES = -I$(top_srcdir)/include \ @@ -11,6 +11,8 @@ INCLUDES = -I$(top_srcdir)/include \
11 bin_PROGRAMS = ctselect 11 bin_PROGRAMS = ctselect
12 12
13 ctselect_SOURCES = ctselect.cpp 13 ctselect_SOURCES = ctselect.cpp
14 -#ctselect_LDADD = libgamma.la  
15 ctselect_LDFLAGS = @LDFLAGS@ 14 ctselect_LDFLAGS = @LDFLAGS@
16 ctselect_CPPFLAGS = @CPPFLAGS@ 15 ctselect_CPPFLAGS = @CPPFLAGS@
  16 +
  17 +pfilesdir = $(prefix)/syspfiles
  18 +pfiles_DATA = ctselect.par
17 \ No newline at end of file 19 \ No newline at end of file
src/ctselect/ctselect.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 - * ctselect * 2 + * ctselect - CTA data selection tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010 by Jurgen Knodlseder * 4 * copyright (C) 2010 by Jurgen Knodlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 ***************************************************************************/ 12 ***************************************************************************/
13 /** 13 /**
14 * @file ctselect.cpp 14 * @file ctselect.cpp
15 - * @brief CTA data selection tool 15 + * @brief CTA data selection tool implementation
16 * @author J. Knodlseder 16 * @author J. Knodlseder
17 */ 17 */
18 18
@@ -25,16 +25,32 @@ @@ -25,16 +25,32 @@
25 25
26 26
27 /***********************************************************************//** 27 /***********************************************************************//**
28 - * @brief Entry point 28 + * @brief Main entry point
29 * 29 *
30 * @param[in] argc Number of arguments 30 * @param[in] argc Number of arguments
31 * @param[in] argv Arguments 31 * @param[in] argv Arguments
32 ***************************************************************************/ 32 ***************************************************************************/
33 int main (int argc, char *argv[]) 33 int main (int argc, char *argv[])
34 { 34 {
35 - // Dummy  
36 - printf("Hello world!\n"); 35 + // Create instance of application
  36 + ctselect application(argc, argv);
  37 +
  38 + // Run application
  39 + int rc = application.run();
37 40
38 // Return 41 // Return
39 - return 0; 42 + return rc;
40 } 43 }
  44 +
  45 +
  46 +/***********************************************************************//**
  47 + * @brief Application
  48 + ***************************************************************************/
  49 +int ctselect::run(void)
  50 +{
  51 + // Test dump
  52 + std::cout << *this << std::endl;
  53 +
  54 + // Return
  55 + return 0;
  56 +}
41 \ No newline at end of file 57 \ No newline at end of file
src/ctselect/ctselect.hpp
1 /*************************************************************************** 1 /***************************************************************************
2 - * ctselect * 2 + * ctselect - CTA data selection tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010 by Jurgen Knodlseder * 4 * copyright (C) 2010 by Jurgen Knodlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
@@ -20,11 +20,26 @@ @@ -20,11 +20,26 @@
20 #define CTSELECT_HPP 20 #define CTSELECT_HPP
21 21
22 /* __ Includes ___________________________________________________________ */ 22 /* __ Includes ___________________________________________________________ */
  23 +#include "GammaLib.hpp"
23 24
24 -/* __ Namespaces _________________________________________________________ */ 25 +/* __Definitions _________________________________________________________ */
  26 +#define APP_NAME "ctselect"
  27 +#define APP_VERSION "v1r0p0"
25 28
26 -/* __ Constants __________________________________________________________ */  
27 29
28 -/* __ Prototypes ________________________________________________________ */ 30 +/***********************************************************************//**
  31 + * @class ctselect
  32 + *
  33 + * @brief CTA data selection tool interface defintion.
  34 + ***************************************************************************/
  35 +class ctselect : public GApplication {
  36 +public:
  37 + // Constructors and destructors
  38 + ctselect(int argc, char *argv[]) :
  39 + GApplication(APP_NAME, APP_VERSION, argc, argv) { return; }
  40 +
  41 + // Methods
  42 + int run(void);
  43 +};
29 44
30 #endif /* CTSELECT_HPP */ 45 #endif /* CTSELECT_HPP */