#include #include #include #include "km3net-dataformat/offline/Head.hh" #include "JAAnet/JHead.hh" #include "JAAnet/JAAnetDictionary.hh" #include "JAAnet/JVolume.hh" #include "JSupport/JSingleFileScanner.hh" #include "JSupport/JSupport.hh" #include "JSupport/JMonteCarloFileSupportkit.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to test JVolume. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; JSingleFileScanner inputFile; int debug; try { JParser<> zap("Auxiliary program to test volume function."); zap['f'] = make_field(inputFile); zap['d'] = make_field(debug) = 3; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } const JHead header = getHeader(inputFile); for (bool option : { true, false }) { const JVolume volume(header, option); ASSERT(volume.getXmax() > volume.getXmin(), "Test range."); const double E = 1.0; const double x = volume.getX(E); ASSERT(volume.getE(x) == E, "Test energy."); } return 0; }