Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSupport
JPrintTreeScanner.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
#include <limits>
6
7
#include "
JDAQ/JDAQTimeslice.hh
"
8
#include "
JDAQ/JDAQEvaluator.hh
"
9
10
#include "
JROOT/JROOTClassSelector.hh
"
11
#include "
JSupport/JTreeScanner.hh
"
12
#include "
JSupport/JSupport.hh
"
13
#include "
JSupport/JAutoTreeScanner.hh
"
14
15
#include "
Jeep/JParser.hh
"
16
#include "
Jeep/JMessage.hh
"
17
18
19
/**
20
* \file
21
*
22
* Program to test ordered reading using JSUPPORT::JTreeScanner.
23
* \author mdejong
24
*/
25
int
main
(
int
argc,
char
**argv)
26
{
27
using namespace
std;
28
using namespace
JPP;
29
using namespace
KM3NETDAQ;
30
31
JMultipleFileScanner<>
inputFile;
32
JROOTClassSelector selector;
33
int
debug
;
34
35
try
{
36
37
JParser<>
zap(
"Program to test ordered reading from a ROOT TTree."
);
38
39
zap[
'f'
] =
make_field
(inputFile);
40
zap[
'C'
] =
make_field
(selector) = getROOTClassSelection<JDAQTimesliceTypes_t>();
41
zap[
'd'
] =
make_field
(
debug
) = 2;
42
43
zap(argc, argv);
44
}
45
catch
(
const
exception& error) {
46
FATAL
(error.what() << endl);
47
}
48
49
50
JTreeScanner<>::debug
=
debug
;
51
52
JAutoTreeScanner<JDAQTimeslice, JDAQEvaluator> zmap =
JType<JDAQTimesliceTypes_t>
();
53
54
JTreeScannerInterface<JDAQTimeslice>* ps = zmap[selector];
55
56
ps->configure(inputFile);
57
58
while
(ps->hasNext()) {
59
60
JDAQTimeslice
* p = ps->next();
61
62
cout << *p << endl;
63
}
64
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1410
JLANG::JType
Auxiliary class for a type holder.
Definition:
JType.hh:19
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1836
KM3NETDAQ::JDAQTimeslice
Data time slice.
Definition:
JDAQTimeslice.hh:36
debug
int debug
debug level
Definition:
JSirene.cc:59
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:65
JTreeScanner.hh
JSUPPORT::JMultipleFileScanner<>
JParser.hh
Utility class to parse command line options.
JROOTClassSelector.hh
JSupport.hh
ROOT TTree parameter settings.
JDAQTimeslice.hh
JDAQEvaluator.hh
JAutoTreeScanner.hh
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5