Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
software/JGizmo/JPrint.cc
Go to the documentation of this file.
1
2#include <string>
3#include <iostream>
4#include <iomanip>
5
9
11#include "JDAQ/JDAQEventIO.hh"
13
15
18
19#include "JAcoustics/JToA.hh"
20#include "JAcoustics/JEvent.hh"
21#include "JAcoustics/JEvt.hh"
26
27#include "JCompass/JEvt.hh"
28#include "JCompass/JSupport.hh"
29
30#include "JSupport/JSupport.hh"
34
36#include "JLang/JPipe.hh"
37#include "JLang/JManip.hh"
38
40
41#include "Jeep/JParser.hh"
42#include "Jeep/JMessage.hh"
43
44
45/**
46 * \file
47 * Auxiliary program to print 'any' data.
48 *
49 * The name of the data structure following option -C should be preceded by a '+' or '-'
50 * to add or remove data types in the output, respectively.\n
51 * In this, ROOT wildcards are accepted (e.g. <tt>-C -\\\.\\*</tt> will remove all data types).
52 *
53 * Note that for printing TRandom information and meta data, JPrintRandom.cc and JPrintMeta.cc should be used, respectively.
54 * \author mdejong
55 */
56int main(int argc, char **argv)
57{
58 using namespace std;
59 using namespace JPP;
60 using namespace KM3NETDAQ;
61
65 JCompassTypes_t>::typelist typelist;
66
68 JLimit_t& numberOfEvents = inputFile.getLimit();
70 int debug;
71
72 try {
73
74 JParser<> zap("Auxiliary program to print 'any' data.");
75
76 zap['f'] = make_field(inputFile);
77 zap['n'] = make_field(numberOfEvents) = 1;
78 zap['C'] = make_field(selection,
79 "Precede name of data structure by a '+' or '-' "
80 "to add or remove data types in the output, respectively."
81 "\nROOT wildcards are accepted.") = JPARSER::initialised();
82 zap['d'] = make_field(debug) = 1;
83
84 zap(argc, argv);
85 }
86 catch(const exception& error) {
87 FATAL(error.what() << endl);
88 }
89
91
92 if (debug >= JEEP::debug_t) {
93 setLongprint(cout);
94 }
95
97
98 inputFile | JValve<typelist>(selection) | out;
99}
Acoustic event.
Acoustic event fit.
ROOT TTree parameter settings.
JLANG::JTYPELIST< JACOUSTICS::JToA, JACOUSTICS::JEvent, JACOUSTICS::JEvt, JACOUSTICS::JSuperEvt, JACOUSTICS::JTriggerParameters, JACOUSTICS::JFitParameters >::typelist JAcousticsTypes_t
Type list of acoustics data types for I/O.
Acoustic trigger parameters.
Compass event data types.
ROOT TTree parameter settings.
Acoustic fit parameters.
I/O manipulators.
void setLongprint(std::ostream &out)
Set long print option.
Definition JManip.hh:132
General purpose messaging.
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Implementation of pipe operation for object iterators.
Acoustic event fit.
ROOT TTree parameter settings of various packages.
JTYPELIST< SPE_TimeSlice, ExtendedSummary_TimeSlice, PhysicsEvent >::typelist JAntaresTypes_t
Type list of Antares DAQ data types for I/O.
JTYPELIST< JAAnetTypes_t, JTriggerTypes_t >::typelist JAllDataTypes_t
Type list of Monte Carlo, trigger and DAQ data types for I/O.
Acoustic event.
Template implementation of stream output for single data type.
Auxiliary class for selection of data type.
Definition JValve.hh:23
Utility class to parse command line options.
Definition JParser.hh:1698
General purpose class for object reading from a list of file names.
@ debug_t
debug
Definition JMessage.hh:29
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::set< JROOTClassSelector > getROOTClassSelection(const bool option=false)
Get ROOT class selection.
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition JDAQPrint.hh:28
int main(int argc, char **argv)
Auxiliary class for recursive type list generation.
Definition JTypeList.hh:351
Type list.
Definition JTypeList.hh:23
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:68
Auxiliary class for ROOT class selection.
Auxiliary class for defining the range of iterations of objects.
Definition JLimit.hh:45