Jpp  17.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPrintRootVersion.cc File Reference

Auxiliary program to print ROOT class version information. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "JROOT/JRootToolkit.hh"
#include "JSupport/JSupport.hh"
#include "JLang/JTypeList.hh"
#include "JLang/JType.hh"
#include "JLang/JNullType.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 ROOT class version information.

Author
mdejong

Definition in file JPrintRootVersion.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 93 of file JPrintRootVersion.cc.

94 {
95  using namespace std;
96 
97  string input_file;
98  string class_name;
99  int debug;
100 
101  try {
102 
103  JParser<> zap("Auxiliary program to print ROOT class version information.");
104 
105  zap['f'] = make_field(input_file) = "";
106  zap['c'] = make_field(class_name) = "";
107  zap['d'] = make_field(debug) = 1;
108 
109  zap(argc, argv);
110  }
111  catch(const exception &error) {
112  FATAL(error.what() << endl);
113  }
114 
115  cout.tie(&cerr);
116 
117  using namespace JPP;
118 
119  JRootInputFile file;
120 
121  if (input_file != "") {
122 
123  try {
124  file.open(input_file.c_str());
125  }
126  catch(const exception& error) {
127  FATAL(error.what() << endl);
128  }
129 
130  if (!file.is_open()) {
131  FATAL("Error opening file " << input_file << endl);
132  }
133  }
134 
135  if (class_name != "")
136  print(cout, class_name.c_str(), file.getFile());
137  else
138  print(cout, JType<JAllDataTypes_t>(), file.getFile());
139 }
Utility class to parse command line options.
Definition: JParser.hh:1500
Auxiliary class for a type holder.
Definition: JType.hh:19
virtual void open(const char *file_name) override
Open file.
Definition: JRootFile.hh:136
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
ROOT input file.
Definition: JRootFile.hh:95
int debug
debug level
Definition: JSirene.cc:66
print
Definition: JConvertDusj.sh:44
#define FATAL(A)
Definition: JMessage.hh:67