Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JFeedback.cc File Reference

Example program to analyse track fit results from Evt formatted data. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <set>
#include "TROOT.h"
#include "TFile.h"
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "km3net-dataformat/definitions/weightlist.hh"
#include "km3net-dataformat/online/JDAQClock.hh"
#include "flux/Flux.hh"
#include "JAAnet/JHead.hh"
#include "JLang/JManip.hh"
#include "JSupport/JSingleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JMonteCarloFileSupportkit.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

Example program to analyse track fit results from Evt formatted data.

Author
mdejong

Definition in file JFeedback.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 295 of file JFeedback.cc.

296{
297 using namespace std;
298 using namespace JPP;
299
300 JSingleFileScanner<Evt> inputFile;
301 JLimit_t& numberOfEvents = inputFile.getLimit();
302 int debug;
303
304 try {
305
306 JParser<> zap("Example program to analyse track fit results from Evt formatted data.");
307
308 zap['f'] = make_field(inputFile);
309 zap['n'] = make_field(numberOfEvents) = JLimit::max();
310 zap['d'] = make_field(debug) = 2;
311
312 zap(argc, argv);
313 }
314 catch(const exception& error) {
315 FATAL(error.what() << endl);
316 }
317
318
319 const JHead head = getHeader(inputFile);
320 const stats_t stats = getStats(head, inputFile);
321
322 DEBUG(inputFile << endl << head << endl << stats << endl);
323
324 cout << setw(132) << left << inputFile << right << ' '
325 << FIXED(9,1) << stats.events << ' '
326 << FIXED(7,1) << stats.range_s << ' '
327 << FIXED(7,1) << stats.livetime_s << ' '
328 << FIXED(7,1) << stats.daq_s << ' '
329 << FIXED(7,1) << stats.gap_s << endl;
330}
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#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
Monte Carlo run header.
Definition JHead.hh:1236
Utility class to parse command line options.
Definition JParser.hh:1698
Object reading from a list of files.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448
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