Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
Functions
JSon.cc File Reference

Auxiliary program to print 'any' data in JSON format. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "km3net-dataformat/offline/Head.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 "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JMonteCarloFileSupportkit.hh"
#include "JSupport/JTriggerParametersSupportkit.hh"
#include "JSupport/JSupport.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JROOT/JSonObjectOutput.hh"
#include "JLang/JPipe.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 in JSON format.

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 JSon.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 43 of file JSon.cc.

44{
45 using namespace std;
46 using namespace JPP;
47 using namespace KM3NETDAQ;
48
50
52 JLimit_t& numberOfEvents = inputFile.getLimit();
54 int debug;
55
56 try {
57
58 JParser<> zap("Auxiliary program to print 'any' data.");
59
60 zap['f'] = make_field(inputFile);
61 zap['n'] = make_field(numberOfEvents) = 1;
62 zap['C'] = make_field(selection,
63 "Precede name of data structure by a '+' or '-' "
64 "to add or remove data types in the output, respectively."
65 "\nROOT wildcards are accepted.") = JPARSER::initialised();
66 zap['d'] = make_field(debug) = 1;
67
68 zap(argc, argv);
69 }
70 catch(const exception& error) {
71 FATAL(error.what() << endl);
72 }
73
75
76 inputFile | JValve<typelist>(selection) | out;
77}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Template definition of a multi-dimensional oscillation probability interpolation table.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
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