Jpp
JPrintHeader.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <iomanip>
4 
6 #include "JAAnet/JHead.hh"
7 #include "JAAnet/JAAnetDictionary.hh"
10 #include "JSupport/JSupport.hh"
11 #include "JROOT/JRootPrinter.hh"
12 #include "Jeep/JParser.hh"
13 #include "Jeep/JMessage.hh"
14 
15 
16 /**
17  * \file
18  * Auxiliary program to print sum of Monte Carlo run headers.
19  *
20  * \author mdejong
21  */
22 int main(int argc, char **argv)
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 }
61 
Head.hh
JRootPrinter.hh
JMessage.hh
JHead.hh
JLANG::getInstance
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:75
JAANET::JHead::print
std::ostream & print(std::ostream &out) const
Print header to output.
Definition: JHead.cc:110
JAANET::JHead::write
std::ostream & write(std::ostream &out) const
Write header to output.
Definition: JHead.cc:79
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JAANET::JHead
Monte Carlo run header.
Definition: JHead.hh:839
JSupport.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JSUPPORT::getHeader
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Definition: JMonteCarloFileSupportkit.hh:458
debug
int debug
debug level
Definition: JSirene.cc:59
JMultipleFileScanner.hh
JParser.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition: JMultipleFileScanner.hh:167
std
Definition: jaanetDictionary.h:36
JMonteCarloFileSupportkit.hh
print
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
Definition: JTriggerMonitor.cc:38
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
main
int main(int argc, char **argv)
Definition: JPrintHeader.cc:22