Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPrint.cc File Reference

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

#include <string>
#include <iostream>
#include <iomanip>
#include "evt/Head.hh"
#include "evt/Evt.hh"
#include "JDAQ/JDAQTimeslice.hh"
#include "JDAQ/JDAQEvent.hh"
#include "JDAQ/JDAQSummaryslice.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 "JLang/JStreamObjectOutput.hh"
#include "JLang/JPipe.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 JPrint.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 41 of file JPrint.cc.

42 {
43  using namespace std;
44  using namespace JPP;
45 
47 
48  JMultipleFileScanner<typelist> inputFile;
49  JLimit_t& numberOfEvents = inputFile.getLimit();
50  JROOTClassSelection selection = getROOTClassSelection<typelist>();
51  int debug;
52 
53  try {
54 
55  JParser<> zap("Auxiliary program to print 'any' data.");
56 
57  zap['f'] = make_field(inputFile);
58  zap['n'] = make_field(numberOfEvents) = 1;
59  zap['C'] = make_field(selection,
60  "Precede name of data structure by a '+' or '-'"
61  "to add or remove data types in the output, respectively."
62  "\nROOT wildcards are accepted.") = JPARSER::initialised();
63  zap['d'] = make_field(debug) = 1;
64 
65  zap(argc, argv);
66  }
67  catch(const exception& error) {
68  FATAL(error.what() << endl);
69  }
70 
71  if (debug >= JEEP::debug_t) {
72  setLongprint(cout);
73  }
74 
75  JStreamObjectOutput<typelist> out(cout);
76 
77  inputFile | JValve<typelist>(selection) | out;
78 }
Utility class to parse command line options.
Definition: JParser.hh:1410
debug
Definition: JMessage.hh:27
Append to type list.
Definition: JTypeList.hh:61
void setLongprint(std::ostream &out)
Set long print option.
Definition: JPrint.hh:149
Empty structure for specification of parser element that is initialised (i.e.
Definition: JParser.hh:64
JLimit JLimit_t
Type definition of limit.
Definition: JLimit.hh:214
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:72