Jpp
software/JGizmo/JPrint.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 
8 
10 #include "JDAQ/JDAQEventIO.hh"
12 
14 
17 
21 #include "JSupport/JSupport.hh"
23 #include "JLang/JPipe.hh"
25 
26 #include "Jeep/JParser.hh"
27 #include "Jeep/JMessage.hh"
28 
29 
30 /**
31  * \file
32  * Auxiliary program to print 'any' data.
33  *
34  * The name of the data structure following option -C should be preceded by a '+' or '-'
35  * to add or remove data types in the output, respectively.\n
36  * In this, ROOT wildcards are accepted (e.g. <pre>-C -\\.\\*</pre> will remove all data types).
37  *
38  * Note that for printing TRandom information and meta data, JPrintRandom.cc and JPrintMeta.cc should be used, respectively.
39  * \author mdejong
40  */
41 int main(int argc, char **argv)
42 {
43  using namespace std;
44  using namespace JPP;
45  using namespace KM3NETDAQ;
46 
48 
50  JLimit_t& numberOfEvents = inputFile.getLimit();
51  JROOTClassSelection selection = getROOTClassSelection<typelist>();
52  int debug;
53 
54  try {
55 
56  JParser<> zap("Auxiliary program to print 'any' data.");
57 
58  zap['f'] = make_field(inputFile);
59  zap['n'] = make_field(numberOfEvents) = 1;
60  zap['C'] = make_field(selection,
61  "Precede name of data structure by a '+' or '-' "
62  "to add or remove data types in the output, respectively."
63  "\nROOT wildcards are accepted.") = JPARSER::initialised();
64  zap['d'] = make_field(debug) = 1;
65 
66  zap(argc, argv);
67  }
68  catch(const exception& error) {
69  FATAL(error.what() << endl);
70  }
71 
73 
75 
76  inputFile | JValve<typelist>(selection) | out;
77 }
Head.hh
JTriggerParameters.hh
TimeSlice.hh
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
main
int main(int argc, char **argv)
Definition: software/JGizmo/JPrint.cc:41
JMessage.hh
JPARSER::initialised
Empty structure for specification of parser element that is initialised (i.e.
Definition: JParser.hh:63
JROOTClassSelector.hh
Evt.hh
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JSupport.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JLANG::JStreamObjectOutput
Template implementation of stream output for single data type.
Definition: JStreamObjectOutput.hh:28
JDAQEventIO.hh
JDAQTimesliceIO.hh
debug
int debug
debug level
Definition: JSirene.cc:59
JLANG::JValve
Auxiliary class for selection of data type.
Definition: JObjectIterator.hh:32
JMultipleFileScanner.hh
JLANG::JTypeList
Type list.
Definition: JTypeList.hh:22
JParser.hh
JROOT::JROOTClassSelection
Auxiliary class for ROOT class selection.
Definition: JROOTClassSelector.hh:91
JTriggerParametersSupportkit.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
JStreamObjectOutput.hh
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition: JMultipleFileScanner.hh:167
PhysicsEvent.hh
JPipe.hh
std
Definition: jaanetDictionary.h:36
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
JDAQSummarysliceIO.hh
KM3NETDAQ::setDAQLongprint
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition: JDAQPrint.hh:28
JMonteCarloFileSupportkit.hh
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
JEEP::debug_t
debug
Definition: JMessage.hh:29