39{
42
45 bool print_as_head;
46 bool print_as_json;
47 bool common;
49
50 try {
51
52 JParser<> zap(
"Auxiliary program to print contents of summed Monte Carlo run headers.");
53
56 "optional key corresponds to a data member or any of the values "\
57 << offset_t << ", "
58 << origin_t << ", "
59 << cylinder_t << ".") = "";
64
65 zap(argc, argv);
66 }
67 catch(const exception &error) {
68 FATAL(error.what() << endl);
69 }
70
71 try {
72
74
75 if (key == "") {
76
78
80
83
84 output_type out = (print_as_json ?
85 (output_type) new JSonObjectOutput <typelist>(cout) :
87
88 if (print_as_head)
90 else
91 out->put(header);
92
93 delete out;
94
95 } else {
96
97 if (key == offset_t)
99 else if (key == origin_t)
101 else if (key == cylinder_t)
103 else
105 }
106 }
107 catch (const exception& error) {
108 FATAL(error.what() << endl);
109 }
110}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template interface of object output for single data type.
virtual bool put(const T &object)=0
Object output.
Template implementation of stream output for single data type.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
Vec getOrigin(const JHead &header)
Get origin.
JCylinder3D getCylinder(const JHead &header)
Get cylinder corresponding to the positions of generated tracks (i.e.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Vec getOffset(const JHead &header)
Get offset.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getCommonHeader(const JMultipleFileScanner_t &file_list)
Get common Monte Carlo header.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
static void print(JRootWriter &writer, const JRootWritableClass &cls)
Write class contents to output.