Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
examples/JTrigger/JTriggerParameters.cc
Go to the documentation of this file.
1
2#include <string>
3#include <iostream>
4#include <iomanip>
5
7
8#include "Jeep/JParser.hh"
9#include "Jeep/JMessage.hh"
10
11
12/**
13 * \file
14 * Example program to read trigger parameters.
15 * \author mdejong
16 */
17int main(int argc, char **argv)
18{
19 using namespace std;
20 using namespace JPP;
21
22 JTriggerParameters parameters;
23 int debug;
24
25 try {
26
27 JParser<> zap("Example program to read trigger parameters.");
28
29 zap['@'] = make_field(parameters) = JPARSER::initialised();
30 zap['d'] = make_field(debug) = 0;
31
32 zap(argc, argv);
33 }
34 catch(const exception &error) {
35 FATAL(error.what() << endl);
36 }
37
38 cout << parameters << endl;
39}
General purpose messaging.
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2140
Utility class to parse command line options.
Definition JParser.hh:1697
int main()
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:67