Jpp
17.3.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSystem
JGlob.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JSystem/JGlob.hh
"
5
6
#include "
Jeep/JParser.hh
"
7
#include "
Jeep/JMessage.hh
"
8
9
/**
10
* Example program for JGlob.
11
*/
12
int
main
(
int
argc,
char
**argv)
13
{
14
using namespace
std;
15
using namespace
JPP;
16
17
string
pattern;
18
int
debug
;
19
20
try
{
21
22
JParser<>
zap(
"Example program for JGlob."
);
23
24
zap[
'p'
] =
make_field
(pattern) =
"*"
;
25
zap[
'd'
] =
make_field
(
debug
) = 1;
26
27
zap(argc, argv);
28
}
29
catch
(
const
exception &error) {
30
FATAL
(error.what() << endl);
31
}
32
33
DEBUG
(
"pattern <"
<< pattern <<
">."
<< endl);
34
35
try
{
36
37
JGlob
g1
(pattern);
38
39
for
(
const
auto
& i : g1) {
40
cout << i << endl;
41
}
42
}
43
catch
(
const
exception& error) {
44
FATAL
(error.what() << endl);
45
}
46
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1993
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
JGlob.hh
File list.
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
g1
Double_t g1(const Double_t x)
Function.
Definition:
JQuantiles.cc:25
Generated by
1.8.5