Jpp  19.1.0
the software that should make you happy
Functions
JHeadSet.cc File Reference

Example program to organise of Monte Carlo run headers. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JHeadSet.hh"
#include "JSupport/JSupport.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 organise of Monte Carlo run headers.

Author
mdejong

Definition in file JHeadSet.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 19 of file JHeadSet.cc.

20 {
21  using namespace std;
22  using namespace JPP;
23 
24  JMultipleFileScanner<> inputFile;
25  int debug;
26 
27  try {
28 
29  JParser<> zap("Example program to organise of Monte Carlo run headers.");
30 
31  zap['f'] = make_field(inputFile);
32  zap['d'] = make_field(debug) = 1;
33 
34  zap(argc, argv);
35  }
36  catch(const exception &error) {
37  FATAL(error.what() << endl);
38  }
39 
40 
41  JHeadSet<> headset(inputFile);
42 
43  for (JHeadSet<>::const_iterator i = headset.begin(); i != headset.end(); ++i) {
44  cout << *i << endl;
45  cout << endl;
46  }
47 }
#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:2142
Utility class to parse command line options.
Definition: JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
Auxiliary class for organising Monte Carlo run headers.
Definition: JHeadSet.hh:31