Overriding command line options

From: Jeff Levesque <JPLevesque_at_lbl.gov>
Date: Fri, 11 Feb 2005 15:04:42 -0800

Hello ROOTers,

I'm writing a stand-alone ROOT program, and am having a problem making my own usage help. If I try to implement a help option (with a "-?", "-h", or "--help" command line option), the ROOT usage help will show up instead. This also happens with any argument I give that begins with "-h". For instance, naming my program "main" and running it with:

main -hello=10

will show the ROOT message:


Usage: main [-l] [-b] [-n] [-q] [dir] [file1.C ... fileN.C] Options:
-b : run in batch mode without graphics
-n : do not execute logon and logoff macros as specified in .rootrc
-q : exit after processing command line macro files
-l : do not show splash screen

 dir : if dir is a valid directory cd to it before executing

-? : print usage
-h : print usage
--help : print usage
-config : print ./configure options


instead of displaying the "-h____" argument I implement in my program. Is there any way I can override the given root command line options for my stand-alone program? I'm running ROOT version 4.02/00 with cygwin on a WinXP machine. My current compiling command is:

g++ -o main main.cpp `root-config --libs`

Thank you,
Jeff Levesque Received on Sat Feb 12 2005 - 00:04:52 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET