This repository was archived by the owner on Sep 26, 2019. It is now read-only.
forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cxx
More file actions
44 lines (38 loc) · 1.22 KB
/
main.cxx
File metadata and controls
44 lines (38 loc) · 1.22 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
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
///
/// @file main.cxx
/// @author Barthelemy von Haller
///
#include "ExampleModule2/Foo.h"
#include <boost/program_options.hpp>
#include <iostream>
#include <TClass.h>
namespace po = boost::program_options;
using namespace std;
int main(int argc, char *argv[])
{
// Arguments parsing
po::variables_map vm;
po::options_description desc("Allowed options");
desc.add_options()("help,h", "Produce help message.");
po::store(parse_command_line(argc, argv, desc), vm);
po::notify(vm);
// help
if (vm.count("help")) {
std::cout << desc << std::endl;
return EXIT_SUCCESS;
}
// Actual "work"
o2::Examples::ExampleModule2::Foo hello;
hello.greet();
std::cout << "Class is " << hello.Class()->GetName() << std::endl;
return EXIT_SUCCESS;
}