Jpp  master_rocky-43-ge265d140c
the software that should make you happy
Functions
software/JReconstruction/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/JSummaryFileRouter.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 34 of file software/JReconstruction/JHistory.cc.

35 {
36  using namespace std;
37  using namespace JPP;
38  using namespace KM3NETDAQ;
39 
42 
43  JSingleFileScanner_t inputFile;
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 
84 
85  io >> outputFile;
86 
87  outputFile.close();
88 }
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:69
#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
Definition: JSTDTypes.hh:14
Type list.
Definition: JTypeList.hh:23
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:45
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:72
Auxiliary base class for file name.