Jpp 20.0.0-rc.8
the software that should make you happy
Loading...
Searching...
No Matches
is_gzipped.cc File Reference
#include <string>
#include <iostream>
#include "JLang/JZip.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Auxiliary program to test JEquationFacet.
 

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Auxiliary program to test JEquationFacet.

Definition at line 13 of file is_gzipped.cc.

14{
15 using namespace std;
16 using namespace JPP;
17
18 string file_name;
19 int debug;
20
21 try {
22
23 JParser<> zap;
24
25 zap['f'] = make_field(file_name);
26 zap['d'] = make_field(debug) = 0;
27
28 zap(argc, argv);
29 }
30 catch(const exception &error) {
31 FATAL(error.what() << endl);
32 }
33
34 cout << file_name << ' ' << is_gzipped(file_name.c_str()) << endl;
35}
#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
bool is_gzipped(const char *const file_name)
Check if file is gzipped.
Definition JZip.hh:22
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).