Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JRootDB.cc File Reference

Auxiliary program to convert ASCII data from data base into ROOT format. More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <memory>
#include "JDB/JSupport.hh"
#include "JDB/JDBincludes.hh"
#include "JDB/JDBDictionary.hh"
#include "JROOT/JRootStreamer.hh"
#include "JROOT/JRootDictionary.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JROOT/JASCIIFileStreamer.hh"
#include "JLang/JNullStream.hh"
#include "JSupport/JFileRecorder.hh"
#include "Jeep/JeepToolkit.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 convert ASCII data from data base into ROOT format.

Author
mdejong

Definition in file JRootDB.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 87 of file JRootDB.cc.

88 {
89  using namespace std;
90  using namespace JPP;
91 
92  typedef JDBTypes_t typelist;
93 
94  string inputFile;
95  string outputFile;
96  JROOTClassSelector selector;
97  int debug;
98 
99  try {
100 
101  JParser<> zap("Auxiliary program to convert ASCII data from data base into ROOT format.");
102 
103  zap['f'] = make_field(inputFile, "ASCII formatted input file."\
104  "\nFirst line should list data members of data structure given at option -C");
105  zap['o'] = make_field(outputFile);
106  zap['C'] = make_field(selector, "name of data structure") = getROOTClassSelection<typelist>();
107  zap['d'] = make_field(debug) = 1;
108 
109  zap['C'] = JPARSER::not_initialised();
110 
111  zap(argc, argv);
112  }
113  catch(const exception &error) {
114  FATAL(error.what() << endl);
115  }
116 
117  IO io;
118 
119  for_each<typelist>(io);
120 
121  io[selector]->copy(inputFile, outputFile);
122 }
Utility class to parse command line options.
Definition: JParser.hh:1514
Auxiliary class to select ROOT class based on class name.
string outputFile
Type list.
Definition: JTypeList.hh:22
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define FATAL(A)
Definition: JMessage.hh:67
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:89
int debug
debug level