Public Member Functions | Public Attributes | List of all members
Acclaim::CmdLineArgs Class Reference

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
 

Detailed Description

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.

Collaboration diagram for Acclaim::CmdLineArgs:
Collaboration graph
[legend]

Constructor & Destructor Documentation

Acclaim::CmdLineArgs::CmdLineArgs ( int  argc,
char *  argv[] 
)

Constructor

Parameters
argcpassed from main
argvpassed from main

Definition at line 182 of file AcclaimCmdLineArgs.cxx.

Member Function Documentation

void Acclaim::CmdLineArgs::getArgs ( int  argc,
char *  argv[] 
)

Leverages getopt.h to actually do the parsing

Parameters
argcpassed from main (via constructor)
argvpassed 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

Parameters
argv0should be the program name, i.e. argv[0]

Definition at line 23 of file AcclaimCmdLineArgs.cxx.


The documentation for this class was generated from the following files: