Jpp  master_rocky-43-ge265d140c
the software that should make you happy
getFrameIndex.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 
6 #include "TROOT.h"
7 #include "TFile.h"
8 
12 
14 #include "JSupport/JSupport.hh"
16 
18 
19 #include "Jeep/JPrint.hh"
20 #include "Jeep/JParser.hh"
21 #include "Jeep/JMessage.hh"
22 
23 
24 /**
25  * \file
26  *
27  * Auxiliary program to print frame index range of data taking run.
28  * \author mdejong
29  */
30 int main(int argc, char **argv)
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 }
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2142
I/O formatting auxiliaries.
Support methods.
ROOT TTree parameter settings of various packages.
Utility class to parse command line options.
Definition: JParser.hh:1698
Template definition for direct access of elements in ROOT TChain.
int main(int argc, char **argv)
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.