A simple command line option parser. More...
#include <AcclaimCmdLineArgs.h>
Public Member Functions | |
CmdLineArgs (int argc, char *argv[]) | |
void | printHelp (const char *argv0) |
void | getArgs (int argc, char *argv[]) |
void | checkArgs (const char *argv0) |
Public Attributes | |
int | event_selection |
int | run |
int | numdivisions |
int | division |
int | anitaversion |
int | tag_output_as_mc |
TString | settings_filename |
TString | output_filename |
A simple command line option parser.
Parses a default set of command line arguments for the Acclaim analysis
Warning! Could prevent a program that uses it from running if it doesn't like what it gets!
Useage: In your executable, do
int main(int argc, char* argv[]){ Acclaim::CmdLineArgs args(argc, argv); args.run; // this is the run that was passed ...
Definition at line 26 of file AcclaimCmdLineArgs.h.
Acclaim::CmdLineArgs::CmdLineArgs | ( | int | argc, |
char * | argv[] | ||
) |
Constructor
argc | passed from main |
argv | passed from main |
Definition at line 182 of file AcclaimCmdLineArgs.cxx.
void Acclaim::CmdLineArgs::getArgs | ( | int | argc, |
char * | argv[] | ||
) |
Leverages getopt.h to actually do the parsing
argc | passed from main (via constructor) |
argv | passed from main (via constructor) |
Definition at line 55 of file AcclaimCmdLineArgs.cxx.
void Acclaim::CmdLineArgs::printHelp | ( | const char * | argv0 | ) |
Prints available options and default values
argv0 | should be the program name, i.e. argv[0] |
Definition at line 23 of file AcclaimCmdLineArgs.cxx.