Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPrintHeader.cc File Reference

Auxiliary program to print sum of Monte Carlo run headers. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "km3net-dataformat/offline/Head.hh"
#include "JAAnet/JHead.hh"
#include "JAAnet/JAAnetDictionary.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JMonteCarloFileSupportkit.hh"
#include "JSupport/JSupport.hh"
#include "JROOT/JRootPrinter.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

Auxiliary program to print sum of Monte Carlo run headers.

Author
mdejong

Definition in file JPrintHeader.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 22 of file JPrintHeader.cc.

23 {
24  using namespace std;
25  using namespace JPP;
26 
28  string key;
29  bool print_only_mapped;
30  int debug;
31 
32  try {
33 
34  JParser<> zap("Auxiliary program to print sum of Monte Carlo run headers.");
35 
36  zap['f'] = make_field(inputFile);
37  zap['k'] = make_field(key) = "";
38  zap['O'] = make_field(print_only_mapped);
39  zap['d'] = make_field(debug) = 1;
40 
41  zap(argc, argv);
42  }
43  catch(const exception &error) {
44  FATAL(error.what() << endl);
45  }
46 
47  const JHead header = getHeader(inputFile);
48 
49  if (key == "") {
50 
51  if (print_only_mapped)
52  header.write(cout);
53  else
54  header.print(cout);
55 
56  } else {
57 
59  }
60 }
Utility class to parse command line options.
Definition: JParser.hh:1493
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:75
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
int debug
debug level
Definition: JSirene.cc:61
print
Definition: JConvertDusj.sh:44
Monte Carlo run header.
Definition: JHead.hh:836
#define FATAL(A)
Definition: JMessage.hh:67
General purpose class for object reading from a list of file names.