Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JHistory.cc File Reference

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

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();
45 vector<int> apps;
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();
66 outputFile.put(JMeta(argc, argv));
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.
Utility class to parse command line options.
Definition JParser.hh:1698
Object writing to file.
Object reading from a list of files.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
Type list.
Definition JTypeList.hh:23
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.