Jpp
15.0.1-rc.1-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
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/JDAQTimesliceIO.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/JTimer.hh
"
16
#include "
Jeep/JParser.hh
"
17
#include "
Jeep/JMessage.hh
"
18
19
20
/**
21
* \file
22
*
23
* Program to test ordered reading using JSUPPORT::JTreeScanner.
24
* \author mdejong
25
*/
26
int
main
(
int
argc,
char
**argv)
27
{
28
using namespace
std;
29
using namespace
JPP;
30
using namespace
KM3NETDAQ;
31
32
JMultipleFileScanner<>
inputFile;
33
JROOTClassSelector
selector;
34
JLimit
numberOfEvents;
35
int
debug
;
36
37
try
{
38
39
JParser<>
zap(
"Program to test ordered reading from a ROOT TTree."
);
40
41
zap[
'f'
] =
make_field
(inputFile);
42
zap[
'C'
] =
make_field
(selector) = getROOTClassSelection<JDAQTimesliceTypes_t>();
43
zap[
'n'
] =
make_field
(numberOfEvents) =
JLimit
();
44
zap[
'd'
] =
make_field
(
debug
) = 2;
45
46
zap(argc, argv);
47
}
48
catch
(
const
exception& error) {
49
FATAL
(error.what() << endl);
50
}
51
52
53
JTreeScanner<>::debug
=
debug
;
54
55
JAutoTreeScanner<JDAQTimeslice, JDAQEvaluator>
zmap =
JType<JDAQTimesliceTypes_t>
();
56
57
JTreeScannerInterface<JDAQTimeslice>
* ps = zmap[selector];
58
59
JTimer
timer;
60
61
timer.
start
();
62
63
ps->configure(inputFile, numberOfEvents);
64
65
timer.stop();
66
67
timer.print(cout,
milli_t
);
68
69
while
(ps->hasNext()) {
70
71
JDAQTimeslice
* p = ps->next();
72
73
cout << *p << endl;
74
}
75
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings of various packages.
JTimer.hh
JROOT::JROOTClassSelector
Auxiliary class to select ROOT class based on class name.
Definition:
JROOTClassSelector.hh:32
JLANG::JType
Auxiliary class for a type holder.
Definition:
JType.hh:19
JSUPPORT::JTreeScanner
Template definition for direct access of elements in ROOT TChain.
Definition:
JTreeScanner.hh:91
JSUPPORT::JTreeScannerInterface
Auxiliary interface for direct access of elements in ROOT TChain.
Definition:
JTreeScannerInterface.hh:34
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
JEEP::milli_t
milli
Definition:
JScale.hh:30
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JEEP::JTimer
Auxiliary class for CPU timing and usage.
Definition:
JTimer.hh:32
KM3NETDAQ::JDAQTimeslice
Data time slice.
Definition:
JDAQTimeslice.hh:30
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
JSUPPORT::JAutoTreeScanner
Auxiliary class to select JTreeScanner based on ROOT class name.
Definition:
JAutoTreeScanner.hh:34
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JTreeScanner.hh
JSUPPORT::JMultipleFileScanner<>
JParser.hh
Utility class to parse command line options.
JROOTClassSelector.hh
JDAQEvaluator.hh
JAutoTreeScanner.hh
JDAQTimesliceIO.hh
JEEP::JTimer::start
void start()
Start timer.
Definition:
JTimer.hh:89
Generated by
1.8.5