Jpp
15.0.1-rc.2-highQE
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
Jeep
JComment.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <sstream>
3
#include <iomanip>
4
#include <string>
5
6
#include "
JSupport/JMeta.hh
"
7
#include "
Jeep/JComment.hh
"
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Example program to test file name handling using JEEP::JComment.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
char
**argv)
19
{
20
using namespace
std;
21
using namespace
JPP;
22
23
int
debug
;
24
25
try
{
26
27
JParser<>
zap(
"Example program to test comments."
);
28
29
zap[
'd'
] =
make_field
(
debug
) = 1;
30
31
zap(argc, argv);
32
}
33
catch
(
const
exception &error) {
34
FATAL
(error.what() << endl);
35
}
36
37
JComment comment;
38
39
comment.add(
"This is a comment"
);
40
comment.add(JMeta(argc, argv));
41
42
NOTICE
(comment);
43
44
stringstream io;
45
46
io << comment;
47
48
JComment buffer;
49
50
io >> buffer;
51
52
DEBUG
(buffer);
53
54
ASSERT
(comment == buffer);
55
56
return
0;
57
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
JComment.hh
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
ASSERT
#define ASSERT(A,...)
Assert macro.
Definition:
JMessage.hh:90
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JMeta.hh
ROOT I/O of application specific meta data.
NOTICE
#define NOTICE(A)
Definition:
JMessage.hh:64
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
DEBUG
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
Definition:
JCalibratePMT.sh:21
Generated by
1.8.5