Commit 0fedf698ee2286b3e0cdf671dfece2fa63a328c8

Authored by knodlseder
1 parent df71d1cc

update for testing

configure.ac
1 1 # Process this file with autoconf to produce a configure script.
2 2  
3   -#AC_PREREQ([2.64])
4 3 AC_INIT([ctatools], [0.1.0], [knodlseder@cesr.fr])
5 4 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
6 5 AC_CONFIG_HEADERS([config.h])
7 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 12 # Checks for programs.
10 13 AC_PROG_CXX
11 14 AC_PROG_INSTALL
12 15  
13 16 # Checks for libraries.
14 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 19 else
17 20 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
18 21 fi
... ...
src/ctselect/Makefile.am
... ... @@ -11,6 +11,8 @@ INCLUDES = -I$(top_srcdir)/include \
11 11 bin_PROGRAMS = ctselect
12 12  
13 13 ctselect_SOURCES = ctselect.cpp
14   -#ctselect_LDADD = libgamma.la
15 14 ctselect_LDFLAGS = @LDFLAGS@
16 15 ctselect_CPPFLAGS = @CPPFLAGS@
  16 +
  17 +pfilesdir = $(prefix)/syspfiles
  18 +pfiles_DATA = ctselect.par
17 19 \ No newline at end of file
... ...
src/ctselect/ctselect.cpp
1 1 /***************************************************************************
2   - * ctselect *
  2 + * ctselect - CTA data selection tool *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) 2010 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -12,7 +12,7 @@
12 12 ***************************************************************************/
13 13 /**
14 14 * @file ctselect.cpp
15   - * @brief CTA data selection tool
  15 + * @brief CTA data selection tool implementation
16 16 * @author J. Knodlseder
17 17 */
18 18  
... ... @@ -25,16 +25,32 @@
25 25  
26 26  
27 27 /***********************************************************************//**
28   - * @brief Entry point
  28 + * @brief Main entry point
29 29 *
30 30 * @param[in] argc Number of arguments
31 31 * @param[in] argv Arguments
32 32 ***************************************************************************/
33 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 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 57 \ No newline at end of file
... ...
src/ctselect/ctselect.hpp
1 1 /***************************************************************************
2   - * ctselect *
  2 + * ctselect - CTA data selection tool *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) 2010 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -20,11 +20,26 @@
20 20 #define CTSELECT_HPP
21 21  
22 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 45 #endif /* CTSELECT_HPP */
... ...