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

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

#include <iostream>
#include <fstream>
#include <iomanip>
#include <memory>
#include "JDB/JSupport.hh"
#include "JDB/JDBincludes.hh"
#include "JDB/JDBDictionary.hh"
#include "JROOT/JRootStreamer.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JROOT/JASCIIFileStreamer.hh"
#include "JLang/JType.hh"
#include "JSupport/JFileRecorder.hh"
#include "JSupport/JMeta.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

◆ main()

int main ( int argc,
char ** argv )

Definition at line 101 of file JRootDB.cc.

102{
103 using namespace std;
104 using namespace JPP;
105
106 typedef JDBTypes_t typelist;
107
108 string inputFile;
109 string outputFile;
110 JROOTClassSelector selector;
111 int debug;
112
113 try {
114
115 JParser<> zap("Auxiliary program to convert ASCII data from data base into ROOT format.");
116
117 zap['f'] = make_field(inputFile, "ASCII formatted input file."\
118 "\nFirst line should list data members of data structure given at option -C");
119 zap['o'] = make_field(outputFile);
120 zap['C'] = make_field(selector, "name of data structure") = getROOTClassSelection<typelist>();
121 zap['d'] = make_field(debug) = 1;
122
124
125 zap(argc, argv);
126 }
127 catch(const exception &error) {
128 FATAL(error.what() << endl);
129 }
130
131 IO io(getType<typelist>());
132
133 io[selector]->copy(inputFile, JMeta(argc,argv), outputFile);
134}
string outputFile
#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).
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition JParser.hh:74
Auxiliary class to select ROOT class based on class name.
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72