#include #include #include #include #include "JTools/JFunction1D_t.hh" #include "JTools/JFunctionalMap_t.hh" #include "JPhysics/JPDFTable.hh" #include "JPhysics/JCDFTable.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Main program to create table of CDFs from table of PDFs for Cherenkov light from EM-shower. * \author mdejong */ int main(int argc, char **argv) { using namespace std; string inputFile; string outputFile; double epsilon; int debug; try { JParser<> zap("Main program to create table of CDFs from table of PDFs for Cherenkov light from EM-shower."); zap['f'] = make_field(inputFile); zap['o'] = make_field(outputFile); zap['e'] = make_field(epsilon) = 0.0; zap['d'] = make_field(debug) = 0; zap(argc, argv); } catch(const exception& error) { FATAL(error.what() << endl); } using namespace JPP; typedef JMAPLIST::maplist JMapList_t; typedef JPDFTable JPDF_t; typedef JCDFTable JCDF_t; JPDF_t pdf; try { NOTICE("loading input from file " << inputFile << "... " << flush); pdf.load(inputFile.c_str()); NOTICE("OK" << endl); } catch(const JException& error) { FATAL(error.what() << endl); } NOTICE("converting... " << flush); JCDF_t cdf(pdf, epsilon); NOTICE("OK" << endl); try { NOTICE("storing output to file " << outputFile << "... " << flush); cdf.store(outputFile.c_str()); NOTICE("OK" << endl); } catch(const JException& error) { NOTICE(error.what() << endl); } }