Jpp
18.0.0-rc.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
JSupport
JTreeRecorder.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
#include <limits>
5
6
#include "
JDAQ/JDAQEventIO.hh
"
7
#include "
JDAQ/JDAQSummarysliceIO.hh
"
8
#include "
JDAQ/JDAQTimesliceIO.hh
"
9
10
#include "
JSupport/JMultipleFileScanner.hh
"
11
#include "
JSupport/JTreeRecorder.hh
"
12
#include "
JSupport/JSupport.hh
"
13
14
#include "
Jeep/JParser.hh
"
15
#include "
Jeep/JMessage.hh
"
16
17
18
/**
19
* \file
20
*
21
* Program to test ordered reading using JSUPPORT::JTreeRecorder.
22
* \author mdejong
23
*/
24
int
main
(
int
argc,
char
**argv)
25
{
26
using namespace
std;
27
using namespace
JPP;
28
using namespace
KM3NETDAQ;
29
30
JMultipleFileScanner<JDAQTypes_t>
inputFile;
31
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
32
string
outputFile
;
33
Long64_t size;
34
int
debug
;
35
36
try
{
37
38
JParser<>
zap(
"Program to test TTree recording with circular buffer."
);
39
40
zap[
'f'
] =
make_field
(inputFile);
41
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
42
zap[
'o'
] =
make_field
(
outputFile
);
43
zap[
'c'
] =
make_field
(size,
"circular buffer size"
) = 0;
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
JTreeRecorder<JDAQTypes_t>
out(
outputFile
.c_str());
53
54
if
(size > 0) {
55
out.
SetCircular
(size);
56
}
57
58
inputFile >> out;
59
60
out.close();
61
}
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.
JSUPPORT::JTreeRecorder
ROOT TTree object output.
Definition:
JTreeRecorder.hh:28
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JDAQSummarysliceIO.hh
JMessage.hh
General purpose messaging.
JROOT::JTreeWriterObjectOutput::SetCircular
void SetCircular(Long64_t size)
Set circular buffer size.
Definition:
JTreeWriterObjectOutput.hh:99
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JMultipleFileScanner.hh
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JTreeRecorder.hh
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition:
JMultipleFileScanner.hh:199
JParser.hh
Utility class to parse command line options.
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:84
JDAQEventIO.hh
JDAQTimesliceIO.hh
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5