ctselect.cpp
2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/***************************************************************************
* ctselect - CTA data selection tool *
* ----------------------------------------------------------------------- *
* copyright (C) 2010 by Jurgen Knodlseder *
* ----------------------------------------------------------------------- *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/**
* @file ctselect.cpp
* @brief CTA data selection tool implementation
* @author J. Knodlseder
*/
/* __ Includes ___________________________________________________________ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include "ctselect.hpp"
/***********************************************************************//**
* @brief Main entry point
*
* @param[in] argc Number of arguments
* @param[in] argv Arguments
***************************************************************************/
int main (int argc, char *argv[])
{
// Initialise return code
int rc = 0;
// Put all code in try-catch brackets to catch all errors
try {
// Create instance of application
ctselect application(argc, argv);
// Run application
rc = application.run();
}
catch (std::exception &e) {
std::cout << e.what() << std::endl;
rc = -1;
}
// Return
return rc;
}
/***********************************************************************//**
* @brief Application
***************************************************************************/
int ctselect::run(void)
{
// Test dump
std::cout << *this << std::endl;
// DUMMY FOR TESTING
std::string value;
value = par("string")->value();
std::cout << value << std::endl;
value = par("chatter")->value();
std::cout << value << std::endl;
value = par("clobber")->value();
std::cout << value << std::endl;
// Return
return 0;
}