28 class CommandHandler {
32 CommandHandler(
int argc,
char* argv[] );
42 std::function< bool( std::deque< std::string >& ) >
cmd_;
49 using CommandMap = std::map< std::string, CommandInfo >;
67 std::deque< std::string >
cmds_;
74 static bool cmd_generate( std::deque< std::string >& args );
77 static bool cmd_decay( std::deque< std::string >& args );
80 static bool cmd_xsec( std::deque< std::string >& args );
83 static bool cmd_help( std::deque< std::string >& args );
86 static bool cmd_print( std::deque< std::string >& args );
89 static bool cmd_reweight( std::deque< std::string >& args );
95 static bool cmd_convert( std::deque< std::string >& args );
static bool cmd_help(std::deque< std::string > &args)
Display top-level or command-specific help messages.
static bool cmd_summarize(std::deque< std::string > &args)
Summarize an existing sample of MARLEY events as a ROOT TTree.
static bool print_top_level_help()
static bool cmd_xsec(std::deque< std::string > &args)
Tabulate energy-dependent total cross section values.
static const CommandMap command_map_
std::function< bool(std::deque< std::string > &) > cmd_
Function to call to execute the command.
std::deque< std::string > cmds_
static bool cmd_print(std::deque< std::string > &args)
Print existing MARLEY events in a human-readable format.
std::function< void() > print_help_
Functiont that prints a detailed help message to stdout.
static bool cmd_decay(std::deque< std::string > &args)
Simulate nuclear de-excitations.
static bool cmd_generate(std::deque< std::string > &args)
Generate Monte Carlo events.
static bool cmd_reweight(std::deque< std::string > &args)
Reweight existing MARLEY events.
static bool cmd_convert(std::deque< std::string > &args)
Convert MARLEY event files between supported formats.
std::string summary_
Simple description of the command.