diff --git a/dis/gen.sh b/dis/gen.sh index fe240c5dd18d83cda4958e1257414e7a1df87f39..451842245b33aa715488c43e4419237862eb0c55 100644 --- a/dis/gen.sh +++ b/dis/gen.sh @@ -47,9 +47,9 @@ if [[ "$?" -ne "0" ]] ; then fi echo "done" -./pythia_dis +./pythia_dis dis.hepmc if [[ "$?" -ne "0" ]] ; then - echo "ERROR running script" + echo "ERROR running pythia" exit 1 fi diff --git a/dis/src/pythia_dis.cc b/dis/src/pythia_dis.cc index ce23c0f056579fb4e65bc4f338850bbeaed18a82..a8a117597b94825940bf38e9c53d7eb146d42990 100644 --- a/dis/src/pythia_dis.cc +++ b/dis/src/pythia_dis.cc @@ -21,6 +21,7 @@ struct settings { bool success = false; double Q2_min = 4.0; int N_events = 1000; + mode selected = mode::none; }; template <typename T> @@ -64,22 +65,13 @@ void print_man_page(T cli, const char* argv0) settings cmdline_settings(int argc, char* argv[]) { settings s; auto lastOpt = - " options:" % (option("-h", "--help").set(s.selected, mode::help) % "show help", - option("-o", "--output") & value("out", s.outfile), value("file", s.infile).if_missing([] { - std::cout << "You need to provide an input xml filename as the last " - "argument!\n"; - }) % "input xml file"); - - auto server_cli = - ((option("-p", "--port") & value("http_port", s.http_port)) % - "port to which the http serve attaches. Default: 8090 ", - (option("-H", "--host") & value("http_host", s.http_host)) % - "Http server host name or IP address. Default: 127.0.0.1", - (option("-f", "--file") & value("io_file", s.in_out_file)) % - "File used to initialize and save plots. Default: top_folder.root"); + " options:" % (option("-h", "--help").set(s.selected, mode::help) % "show help"), + value("file", s.outfile).if_missing([] { + std::cout << "You need to provide an output filename argument!\n"; + }) % "output file"); auto cli = - (command("help").set(s.selected, mode::help) | (server_cli, lastOpt)); + (command("help").set(s.selected, mode::help) | lastOpt); assert(cli.flags_are_prefix_free());