Jpp
18.0.0-rc.3
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
software
JGizmo
JPrintTreeParameters.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
JROOT/JTreeParameters.hh
"
7
8
#include "
JAAnet/JSupport.hh
"
9
#include "
JDAQ/JSupport.hh
"
10
#include "
JSupport/JSupport.hh
"
11
12
#include "
JLang/JBool.hh
"
13
#include "
JLang/JType.hh
"
14
15
#include "
Jeep/JParser.hh
"
16
#include "
Jeep/JMessage.hh
"
17
18
19
namespace
{
20
21
using namespace
JPP;
22
23
/**
24
* Printer for TTree parameters.
25
*/
26
struct
JPrinter
{
27
/**
28
* Print TTree parameters of given data type.
29
*
30
* \param type type
31
*/
32
template
<
class
T>
33
void
operator()(
JType<T>
type)
34
{
35
print
(type,
JBool
<
JTreeParametersAvailable<T>::result
>());
36
}
37
38
/**
39
* Print TTree parameters of given data type according option.
40
*
41
* \param type type
42
* \param option option
43
*/
44
template
<
class
T>
45
static
void
print
(
JType<T>
type,
JBool<true>
option)
46
{
47
using namespace
std;
48
using namespace
JPP;
49
50
cout << getTreeParameters<T>() << endl;
51
};
52
53
/**
54
* Print TTree parameters of given data type according option.
55
*
56
* \param type type
57
* \param option option
58
*/
59
template
<
class
T>
60
static
void
print
(
JType<T>
type,
JBool<false>
option)
61
{}
62
};
63
}
64
65
66
/**
67
* \file
68
*
69
* Auxiliary program to print ROOT TTree parameters.
70
* \author mdejong
71
*/
72
int
main
(
int
argc,
char
**argv)
73
{
74
using namespace
std;
75
using namespace
JPP;
76
using namespace
KM3NETDAQ;
77
78
int
debug
;
79
80
try
{
81
82
JParser<>
zap(
"Auxiliary program to print ROOT TTree parameters."
);
83
84
zap[
'd'
] =
make_field
(
debug
) = 1;
85
86
zap(argc, argv);
87
}
88
catch
(
const
exception &error) {
89
FATAL
(error.what() << endl);
90
}
91
92
JPrinter
printer;
93
94
for_each
(printer,
JType<JAllTypes_t>
());
95
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings of various packages.
JLANG::JPrinter
Auxiliary class to temporarily replace std::ostream.
Definition:
JPrintHelper.hh:155
JROOT::JTreeParametersAvailable
Test availability of TTree parameters for given class.
Definition:
JTreeParameters.hh:196
JLANG::JType
Auxiliary class for a type holder.
Definition:
JType.hh:19
JSupport.hh
ROOT TTree parameter settings.
JLANG::JBool
Auxiliary template class for type bool.
Definition:
JBool.hh:20
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JBool.hh
print
print
Definition:
JConvertDusj.sh:44
JMessage.hh
General purpose messaging.
JLANG::for_each
JObject_t & for_each(JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist)
For each data type method.
Definition:
JTypeList.hh:415
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JTreeParameters.hh
JType.hh
JParser.hh
Utility class to parse command line options.
JSupport.hh
ROOT TTree parameter settings.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5