Jpp  18.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JHeadSet.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <iomanip>
4 
6 #include "JSupport/JHeadSet.hh"
7 #include "JSupport/JSupport.hh"
8 
9 #include "Jeep/JParser.hh"
10 #include "Jeep/JMessage.hh"
11 
12 
13 /**
14  * \file
15  * Example program to organise of Monte Carlo run headers.
16  *
17  * \author mdejong
18  */
19 int main(int argc, char **argv)
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 }
48 
Utility class to parse command line options.
Definition: JParser.hh:1514
int main(int argc, char *argv[])
Definition: Main.cc:15
ROOT TTree parameter settings of various packages.
Auxiliary class for organising Monte Carlo run headers.
Definition: JHeadSet.hh:29
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
int debug
debug level