Jpp  debug
the software that should make you happy
Functions
examples/JTrigger/JTriggerParameters.cc File Reference

Example program to read trigger parameters. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JTrigger/JTriggerParameters.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to read trigger parameters.

Author
mdejong

Definition in file examples/JTrigger/JTriggerParameters.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 17 of file examples/JTrigger/JTriggerParameters.cc.

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 }
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2158
Utility class to parse command line options.
Definition: JParser.hh:1714
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition: JParser.hh:84