Jpp  17.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
software/JGizmo/JPrint.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 
9 
10 #include "JDAQ/JDAQTimesliceIO.hh"
11 #include "JDAQ/JDAQEventIO.hh"
13 
15 
18 
22 #include "JSupport/JSupport.hh"
24 #include "JLang/JPipe.hh"
26 
27 #include "Jeep/JParser.hh"
28 #include "Jeep/JMessage.hh"
29 
30 
31 /**
32  * \file
33  * Auxiliary program to print 'any' data.
34  *
35  * The name of the data structure following option -C should be preceded by a '+' or '-'
36  * to add or remove data types in the output, respectively.\n
37  * In this, ROOT wildcards are accepted (e.g. <tt>-C -\\\.\\*</tt> will remove all data types).
38  *
39  * Note that for printing TRandom information and meta data, JPrintRandom.cc and JPrintMeta.cc should be used, respectively.
40  * \author mdejong
41  */
42 int main(int argc, char **argv)
43 {
44  using namespace std;
45  using namespace JPP;
46  using namespace KM3NETDAQ;
47 
49 
51  JLimit_t& numberOfEvents = inputFile.getLimit();
52  JROOTClassSelection selection = getROOTClassSelection<typelist>();
53  int debug;
54 
55  try {
56 
57  JParser<> zap("Auxiliary program to print 'any' data.");
58 
59  zap['f'] = make_field(inputFile);
60  zap['n'] = make_field(numberOfEvents) = 1;
61  zap['C'] = make_field(selection,
62  "Precede name of data structure by a '+' or '-' "
63  "to add or remove data types in the output, respectively."
64  "\nROOT wildcards are accepted.") = JPARSER::initialised();
65  zap['d'] = make_field(debug) = 1;
66 
67  zap(argc, argv);
68  }
69  catch(const exception& error) {
70  FATAL(error.what() << endl);
71  }
72 
74 
76 
77  inputFile | JValve<typelist>(selection) | out;
78 }
Utility class to parse command line options.
Definition: JParser.hh:1517
debug
Definition: JMessage.hh:29
int main(int argc, char *argv[])
Definition: Main.cc:15
ROOT TTree parameter settings of various packages.
Auxiliary class for ROOT class selection.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition: JParser.hh:83
Auxiliary class for selection of data type.
Type list.
Definition: JTypeList.hh:22
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition: JDAQPrint.hh:28
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1993
Implementation of pipe operation for object iterators.
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...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
Template implementation of stream output for single data type.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:73
int debug
debug level