Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
Functions
software/JGizmo/JPrint.cc File Reference

Auxiliary program to print 'any' data. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/MultiHead.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "antares-dataformat/TimeSlice.hh"
#include "antares-dataformat/PhysicsEvent.hh"
#include "JAcoustics/JEvent.hh"
#include "JAcoustics/JEvt.hh"
#include "JAcoustics/JSuperEvt.hh"
#include "JAcoustics/JTriggerParameters.hh"
#include "JAcoustics/JFitParameters.hh"
#include "JAcoustics/JSupport.hh"
#include "JCompass/JEvt.hh"
#include "JCompass/JSupport.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JMonteCarloFileSupportkit.hh"
#include "JSupport/JTriggerParametersSupportkit.hh"
#include "JLang/JStreamObjectOutput.hh"
#include "JLang/JPipe.hh"
#include "JLang/JManip.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to print 'any' data.

The name of the data structure following option -C should be preceded by a '+' or '-' to add or remove data types in the output, respectively.
In this, ROOT wildcards are accepted (e.g. -C -\.\* will remove all data types).

Note that for printing TRandom information and meta data, JPrintRandom.cc and JPrintMeta.cc should be used, respectively.

Author
mdejong

Definition in file software/JGizmo/JPrint.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 55 of file software/JGizmo/JPrint.cc.

56 {
57  using namespace std;
58  using namespace JPP;
59  using namespace KM3NETDAQ;
60 
61  typedef JTYPELIST<JAllDataTypes_t,
64  JCompassTypes_t>::typelist typelist;
65 
67  JLimit_t& numberOfEvents = inputFile.getLimit();
68  JROOTClassSelection selection = getROOTClassSelection<typelist>(true);
69  int debug;
70 
71  try {
72 
73  JParser<> zap("Auxiliary program to print 'any' data.");
74 
75  zap['f'] = make_field(inputFile);
76  zap['n'] = make_field(numberOfEvents) = 1;
77  zap['C'] = make_field(selection,
78  "Precede name of data structure by a '+' or '-' "
79  "to add or remove data types in the output, respectively."
80  "\nROOT wildcards are accepted.") = JPARSER::initialised();
81  zap['d'] = make_field(debug) = 1;
82 
83  zap(argc, argv);
84  }
85  catch(const exception& error) {
86  FATAL(error.what() << endl);
87  }
88 
90 
91  if (debug >= JEEP::debug_t) {
92  setLongprint(cout);
93  }
94 
96 
97  inputFile | JValve<typelist>(selection) | out;
98 }
JLANG::JTYPELIST< JACOUSTICS::JEvent, JACOUSTICS::JEvt, JACOUSTICS::JSuperEvt, JACOUSTICS::JTriggerParameters, JACOUSTICS::JFitParameters >::typelist JAcousticsTypes_t
Type list of acoustics data types for I/O.
void setLongprint(std::ostream &out)
Set long print option.
Definition: JManip.hh:132
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2142
JTYPELIST< JAAnetTypes_t, JTriggerTypes_t >::typelist JAllDataTypes_t
Type list of Monte Carlo, trigger and DAQ data types for I/O.
JTYPELIST< SPE_TimeSlice, ExtendedSummary_TimeSlice, PhysicsEvent >::typelist JAntaresTypes_t
Type list of Antares DAQ data types for I/O.
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).
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition: JDAQPrint.hh:28
Definition: JSTDTypes.hh:14
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