Jpp
17.3.2
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
JReconstruction
software/JReconstruction/JHistory.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
km3net-dataformat/offline/Head.hh
"
6
#include "
km3net-dataformat/offline/MultiHead.hh
"
7
#include "
km3net-dataformat/offline/Evt.hh
"
8
9
#include "
JDAQ/JDAQEventIO.hh
"
10
#include "
JDAQ/JDAQTimesliceIO.hh
"
11
#include "
JDAQ/JDAQSummarysliceIO.hh
"
12
13
#include "
JTrigger/JTriggerParameters.hh
"
14
15
#include "
JSupport/JSupport.hh
"
16
#include "
JSupport/JParallelFileScanner.hh
"
17
#include "
JSupport/JFileRecorder.hh
"
18
#include "
JSupport/JSummaryFileRouter.hh
"
19
#include "
JSupport/JMeta.hh
"
20
21
#include "
JReconstruction/JEvt.hh
"
22
23
#include "
Jeep/JParser.hh
"
24
#include "
Jeep/JMessage.hh
"
25
26
27
/**
28
* \file
29
*
30
* Program to set fit status according match of history with list of application types.
31
*
32
* \author mdejong
33
*/
34
int
main
(
int
argc,
char
**argv)
35
{
36
using namespace
std;
37
using namespace
JPP;
38
using namespace
KM3NETDAQ;
39
40
typedef
JTYPELIST<JAllTypes_t, JFIT::JEvt>::typelist
typelist;
41
typedef
JSingleFileScanner<JFIT::JEvt>
JSingleFileScanner_t
;
42
43
JSingleFileScanner_t
inputFile;
44
JFileRecorder<typelist>
outputFile
;
45
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
46
vector<int>
apps;
47
int
debug
;
48
49
try
{
50
51
JParser<>
zap(
"Program to set fit status according match of history with list of application types."
);
52
53
zap[
'f'
] =
make_field
(inputFile);
54
zap[
'o'
] =
make_field
(
outputFile
) =
"history.root"
;
55
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
56
zap[
'A'
] =
make_field
(apps);
57
zap[
'd'
] =
make_field
(
debug
) = 1;
58
59
zap(argc, argv);
60
}
61
catch
(
const
exception& error) {
62
FATAL
(error.what() << endl);
63
}
64
65
66
outputFile
.open();
67
outputFile
.put(
JMeta
(argc, argv));
68
69
while
(inputFile.hasNext()) {
70
71
STATUS
(
"event: "
<< setw(10) << inputFile.getCounter() <<
'\r'
);
DEBUG
(endl);
72
73
JFIT::JEvt
out = *inputFile.next();
74
75
for
(JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
76
i->setStatus(i->getHistory().getStatus(apps) ?
COMPLETE_CHAIN
:
INCOMPLETE_CHAIN
);
77
}
78
79
outputFile
.put(out);
80
}
81
STATUS
(endl);
82
83
JSingleFileScanner<JRemove<typelist, JFIT::JEvt>::typelist
> io(inputFile);
84
85
io >>
outputFile
;
86
87
outputFile
.close();
88
}
89
JSUPPORT::JMeta
Auxiliary class for ROOT I/O of application specific meta data.
Definition:
JMeta.hh:70
JSUPPORT::JFileRecorder
Object writing to file.
Definition:
JFileRecorder.hh:41
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings of various packages.
STATUS
#define STATUS(A)
Definition:
JMessage.hh:63
JFileRecorder.hh
Recording of objects on file according a format that follows from the file name extension.
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
std::vector< int >
JRECONSTRUCTION::COMPLETE_CHAIN
Definition:
JFitStatus.hh:24
JSUPPORT::JSingleFileScanner_t
Auxiliary base class for file name.
Definition:
JSingleFileScanner.hh:39
JLANG::JTypeList
Type list.
Definition:
JTypeList.hh:22
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
JEvt.hh
JSummaryFileRouter.hh
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1993
MultiHead.hh
JParallelFileScanner.hh
Parallel scanning of objects from a single file or multiple files according a format that follows fro...
JMeta.hh
ROOT I/O of application specific meta data.
JDAQSummarysliceIO.hh
JRECONSTRUCTION::INCOMPLETE_CHAIN
Definition:
JFitStatus.hh:23
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JFIT::JEvt
Data structure for set of track fit results.
Definition:
JReconstruction/JEvt.hh:376
Evt.hh
JParser.hh
Utility class to parse command line options.
JSUPPORT::JSingleFileScanner
Object reading from a list of files.
Definition:
JSingleFileScanner.hh:75
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:73
JDAQEventIO.hh
Head.hh
JDAQTimesliceIO.hh
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
JTriggerParameters.hh
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5