Jpp  test_elongated_shower_pde
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JTreeRecorder.cc File Reference

Program to test ordered reading using JSUPPORT::JTreeRecorder. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <limits>
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JTreeRecorder.hh"
#include "JSupport/JSupport.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

Program to test ordered reading using JSUPPORT::JTreeRecorder.

Author
mdejong

Definition in file JTreeRecorder.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 24 of file JTreeRecorder.cc.

25 {
26  using namespace std;
27  using namespace JPP;
28  using namespace KM3NETDAQ;
29 
31  JLimit_t& numberOfEvents = inputFile.getLimit();
32  string outputFile;
33  Long64_t size;
34  int debug;
35 
36  try {
37 
38  JParser<> zap("Program to test TTree recording with circular buffer.");
39 
40  zap['f'] = make_field(inputFile);
41  zap['n'] = make_field(numberOfEvents) = JLimit::max();
42  zap['o'] = make_field(outputFile);
43  zap['c'] = make_field(size, "circular buffer size") = 0;
44  zap['d'] = make_field(debug) = 2;
45 
46  zap(argc, argv);
47  }
48  catch(const exception& error) {
49  FATAL(error.what() << endl);
50  }
51 
53 
54  if (size > 0) {
55  out.SetCircular(size);
56  }
57 
58  inputFile >> out;
59 
60  out.close();
61 }
Utility class to parse command line options.
Definition: JParser.hh:1500
ROOT TTree object output.
string outputFile
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:68
void SetCircular(Long64_t size)
Set circular buffer size.
#define FATAL(A)
Definition: JMessage.hh:67
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:73