#include #include #include #include #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" #include "JTools/JFunction1D_t.hh" #include "JTools/JFunctionalMap_t.hh" #include "JPhysics/JTransformer.hh" #include "JPhysics/JPDFTable.hh" #include "JPhysics/JCDFTable.hh" /** * Main program to create table of CDFs from table of PDFs. */ int main(int argc, char **argv) { using namespace std; string inputFile; string outputFile; double epsilon; int debug; try { JParser<> zap; zap['f'] = make_field(inputFile); zap['o'] = make_field(outputFile); zap['e'] = make_field(epsilon) = 0.0; zap['d'] = make_field(debug) = 0; if (zap.read(argc, argv) != 0) return 1; } catch(const exception& error) { FATAL(error.what() << endl); } using namespace JPHYSICS; using namespace JTOOLS; typedef JSplineFunction1S_t JFunction1D_t; typedef JMultipleMap<3, JPolint1FunctionalMap>::type_list 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) { FATAL(error.what() << endl); } }