Jpp  master_rocky-43-ge265d140c
the software that should make you happy
Functions
getFrameIndex.cc File Reference

Auxiliary program to print frame index range of data taking run. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "km3net-dataformat/online/JDAQTimeslice.hh"
#include "km3net-dataformat/online/JDAQSummaryslice.hh"
#include "km3net-dataformat/online/JDAQEvent.hh"
#include "JSupport/JAutoTreeScanner.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JSupportToolkit.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "Jeep/JPrint.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

Auxiliary program to print frame index range of data taking run.

Author
mdejong

Definition in file getFrameIndex.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file getFrameIndex.cc.

31 {
32  using namespace std;
33  using namespace JPP;
34 
35  string inputFile;
36  JROOTClassSelector selector;
37  int debug;
38 
39  try {
40 
41  JParser<> zap("Auxiliary program to print frame index range of data taking run.");
42 
43  zap['f'] = make_field(inputFile);
44  zap['C'] = make_field(selector, "data type selection.") = getROOTClassSelection<JDAQTypes_t>();
45  zap['d'] = make_field(debug) = 1;
46 
47  zap['C'] = JPARSER::not_initialised();
48 
49  zap(argc, argv);
50  }
51  catch(const exception &error) {
52  FATAL(error.what() << endl);
53  }
54 
56 
58 
59  zmap[selector]->configure(inputFile);
60 
61  cout << getFrameIndexRange(*zmap[selector]) << endl;
62 }
#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
Utility class to parse command line options.
Definition: JParser.hh:1698
Template definition for direct access of elements in ROOT TChain.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JFrameIndexRange getFrameIndexRange(JTreeScannerInterface< T, KM3NETDAQ::JDAQEvaluator > &in)
Get range of frame indices.
Definition: JSTDTypes.hh:14
Auxiliary class for a type holder.
Definition: JType.hh:19
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:74
Auxiliary class to select ROOT class based on class name.
Auxiliary class to select JTreeScanner based on ROOT class name.