Skip to content
Snippets Groups Projects
Commit b2860609 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: gen.sh

	modified:   src/pythia_dis.cc
parent 5d4b55ab
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment