Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
Functions
JHistory.cc File Reference

Program to set fit status according match of history with list of application types. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/MultiHead.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JParallelFileScanner.hh"
#include "JSupport/JFileRecorder.hh"
#include "JSupport/JMeta.hh"
#include "JReconstruction/JEvt.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Program to set fit status according match of history with list of application types.

Author
mdejong

Definition in file software/JReconstruction/JHistory.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 33 of file software/JReconstruction/JHistory.cc.

34{
35 using namespace std;
36 using namespace JPP;
37 using namespace KM3NETDAQ;
38
41
42 JSingleFileScanner_t inputFile;
44 JLimit_t& numberOfEvents = inputFile.getLimit();
46 int debug;
47
48 try {
49
50 JParser<> zap("Program to set fit status according match of history with list of application types.");
51
52 zap['f'] = make_field(inputFile);
53 zap['o'] = make_field(outputFile) = "history.root";
54 zap['n'] = make_field(numberOfEvents) = JLimit::max();
55 zap['A'] = make_field(apps);
56 zap['d'] = make_field(debug) = 1;
57
58 zap(argc, argv);
59 }
60 catch(const exception& error) {
61 FATAL(error.what() << endl);
62 }
63
64
65 outputFile.open();
67
68 while (inputFile.hasNext()) {
69
70 STATUS("event: " << setw(10) << inputFile.getCounter() << '\r'); DEBUG(endl);
71
72 JFIT::JEvt out = *inputFile.next();
73
74 for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
75 i->setStatus(i->getHistory().getStatus(apps) ? COMPLETE_CHAIN : INCOMPLETE_CHAIN);
76 }
77
78 outputFile.put(out);
79 }
80 STATUS(endl);
81
83
84 io >> outputFile;
85
86 outputFile.close();
87}
string outputFile
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#define STATUS(A)
Definition JMessage.hh:63
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Data structure for set of track fit results.
Template definition of a multi-dimensional oscillation probability interpolation table.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
Auxiliary class for defining the range of iterations of objects.
Definition JLimit.hh:45
static counter_type max()
Get maximum counter value.
Definition JLimit.hh:128
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72
Auxiliary base class for file name.