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

Example program to edit energy correction. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JReconstruction/JEnergyCorrection.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

Example program to edit energy correction.

Author
mdejong

Definition in file JEditEnergyCorrection.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 17 of file JEditEnergyCorrection.cc.

18 {
19  using namespace std;
20  using namespace JPP;
21 
22  string outputFile;
24  int debug;
25 
26  try {
27 
28  JParser<> zap("Example program to edit energy correction.");
29 
30  zap['E'] = make_field(fcn) = JEnergyCorrection();
31  zap['o'] = make_field(outputFile) = "";
32  zap['d'] = make_field(debug) = 2;
33 
34  zap(argc, argv);
35  }
36  catch(const exception& error) {
37  FATAL(error.what() << endl);
38  }
39 
40 
41  DEBUG("Formula " << fcn << endl);
42 
43  if (outputFile != "") {
44  fcn.store(outputFile.c_str());
45  }
46 }
string outputFile
#define DEBUG(A)
Message macros.
Definition: JMessage.hh: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
Auxiliary class for correction of energy determined by JEnergy.cc.
void store(const char *file_name)
Store formula to file.
Utility class to parse command line options.
Definition: JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14