Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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 }
Utility class to parse command line options.
Definition: JParser.hh:1711
JFrameIndexRange getFrameIndexRange(JTreeScannerInterface< T, KM3NETDAQ::JDAQEvaluator > &in)
Get range of frame indices.
Auxiliary class to select ROOT class based on class name.
Auxiliary class for a type holder.
Definition: JType.hh:19
Template definition for direct access of elements in ROOT TChain.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2158
Auxiliary class to select JTreeScanner based on ROOT class name.
#define FATAL(A)
Definition: JMessage.hh:67
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:90
int debug
debug level