Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
getLivetime.cc File Reference

Auxiliary program to print live time of data taking. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "JSupport/JSupport.hh"
#include "JSupport/JSupportToolkit.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 live time of data taking.

Author
mdejong

Definition in file getLivetime.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 22 of file getLivetime.cc.

23 {
24  using namespace std;
25  using namespace JPP;
26 
27  vector<string> inputFile;
28  int debug;
29 
30  try {
31 
32  JParser<> zap("Auxiliary program to print live time of data taking.");
33 
34  zap['f'] = make_field(inputFile);
35  zap['d'] = make_field(debug) = 1;
36 
37  zap(argc, argv);
38  }
39  catch(const exception &error) {
40  FATAL(error.what() << endl);
41  }
42 
43  cout.tie(&cerr);
44 
45  cout << getLivetime(inputFile.begin(), inputFile.end()) << endl;
46 }
Utility class to parse command line options.
Definition: JParser.hh:1410
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65
double getLivetime(const std::string &file_name)
Get data taking live time.