Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JMergeDisable.cc File Reference
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include "JAcoustics/JTransmission_t.hh"
#include "JSupport/JMeta.hh"
#include "Jeep/JContainer.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int argc,
char ** argv )
Author
mdejong

Auxiliary program to merge disable files.

Definition at line 21 of file JMergeDisable.cc.

22{
23 using namespace std;
24 using namespace JPP;
25
26 typedef JContainer< set<JTransmission_t> > disable_container;
27
28 vector<string> inputFile;
29 string outputFile;
30 int debug;
31
32 try {
33
34 JParser<> zap("Auxiliary program to merge disable files.");
35
36 zap['f'] = make_field(inputFile, "input file") = JPARSER::initialised();
37 zap['o'] = make_field(outputFile, "output file");
38 zap['d'] = make_field(debug) = 1;
39
40 zap(argc, argv);
41 }
42 catch(const exception &error) {
43 FATAL(error.what() << endl);
44 }
45
46
47 disable_container disable;
48
49 for (vector<string>::const_iterator i = inputFile.begin(); i != inputFile.end(); ++i) {
50 disable.load(i->c_str());
51 }
52
53 disable.comment.add(JMeta(argc, argv));
54
55 disable.store(outputFile.c_str());
56}
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
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary wrapper for I/O of container with optional comment (see JComment).
Definition JContainer.hh:42
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:68
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72