herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
herwigopts.h
Go to the documentation of this file.
1 
8 #ifndef HERWIGOPTS_H
9 #define HERWIGOPTS_H
10 
11 /* If we use autoconf. */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15 
16 #include <stdio.h> /* for FILE */
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21 
22 #ifndef CMDLINE_PARSER_PACKAGE
23 
24 #define CMDLINE_PARSER_PACKAGE PACKAGE
25 #endif
26 
27 #ifndef CMDLINE_PARSER_PACKAGE_NAME
28 
29 #ifdef PACKAGE_NAME
30 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME
31 #else
32 #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE
33 #endif
34 #endif
35 
36 #ifndef CMDLINE_PARSER_VERSION
37 
38 #define CMDLINE_PARSER_VERSION VERSION
39 #endif
40 
43 {
44  const char *help_help;
45  const char *full_help_help;
46  const char *version_help;
48  char * numevents_orig;
49  const char *numevents_help;
50  int seed_arg;
51  char * seed_orig;
52  const char *seed_help;
53  char * tag_arg;
54  char * tag_orig;
55  const char *tag_help;
56  int debug_arg;
57  char * debug_orig;
58  const char *debug_help;
60  const char *debug_fpe_help;
61  int quiet_flag;
62  const char *quiet_help;
63  int jobs_arg;
64  char * jobs_orig;
65  const char *jobs_help;
66  char * setupfile_arg;
67  char * setupfile_orig;
68  const char *setupfile_help;
69  char * cachedir_arg;
70  char * cachedir_orig;
71  const char *cachedir_help;
72  long jobsize_arg;
73  char * jobsize_orig;
74  const char *jobsize_help;
75  long maxjobs_arg;
76  char * maxjobs_orig;
77  const char *maxjobs_help;
78  char * jobid_arg;
79  char * jobid_orig;
80  const char *jobid_help;
81  char ** append_read_arg;
82  char ** append_read_orig;
83  unsigned int append_read_min;
84  unsigned int append_read_max;
85  const char *append_read_help;
86  char ** prepend_read_arg;
88  unsigned int prepend_read_min;
89  unsigned int prepend_read_max;
90  const char *prepend_read_help;
91  char ** append_arg;
92  char ** append_orig;
93  unsigned int append_min;
94  unsigned int append_max;
95  const char *append_help;
96  char ** prepend_arg;
97  char ** prepend_orig;
98  unsigned int prepend_min;
99  unsigned int prepend_max;
100  const char *prepend_help;
101  char * repo_arg;
102  char * repo_orig;
103  const char *repo_help;
105  const char *noexitonerror_help;
107  const char *resume_help;
109  unsigned int help_given ;
110  unsigned int full_help_given ;
111  unsigned int version_given ;
112  unsigned int numevents_given ;
113  unsigned int seed_given ;
114  unsigned int tag_given ;
115  unsigned int debug_given ;
116  unsigned int debug_fpe_given ;
117  unsigned int quiet_given ;
118  unsigned int jobs_given ;
119  unsigned int setupfile_given ;
120  unsigned int cachedir_given ;
121  unsigned int jobsize_given ;
122  unsigned int maxjobs_given ;
123  unsigned int jobid_given ;
124  unsigned int append_read_given ;
125  unsigned int prepend_read_given ;
126  unsigned int append_given ;
127  unsigned int prepend_given ;
128  unsigned int repo_given ;
129  unsigned int noexitonerror_given ;
130  unsigned int resume_given ;
132  char **inputs ;
133  unsigned inputs_num ;
134 } ;
135 
138 {
139  int override;
144 } ;
145 
147 extern const char *gengetopt_args_info_purpose;
149 extern const char *gengetopt_args_info_usage;
151 extern const char *gengetopt_args_info_description;
153 extern const char *gengetopt_args_info_help[];
155 extern const char *gengetopt_args_info_full_help[];
156 
164 int cmdline_parser (int argc, char **argv,
165  struct gengetopt_args_info *args_info);
166 
178 int cmdline_parser2 (int argc, char **argv,
179  struct gengetopt_args_info *args_info,
180  int override, int initialize, int check_required);
181 
190 int cmdline_parser_ext (int argc, char **argv,
191  struct gengetopt_args_info *args_info,
192  struct cmdline_parser_params *params);
193 
200 int cmdline_parser_dump(FILE *outfile,
201  struct gengetopt_args_info *args_info);
202 
210 int cmdline_parser_file_save(const char *filename,
211  struct gengetopt_args_info *args_info);
212 
216 void cmdline_parser_print_help(void);
225 
232 
239 
245 void cmdline_parser_init (struct gengetopt_args_info *args_info);
251 void cmdline_parser_free (struct gengetopt_args_info *args_info);
252 
260 int cmdline_parser_required (struct gengetopt_args_info *args_info,
261  const char *prog_name);
262 
263 
264 #ifdef __cplusplus
265 }
266 #endif /* __cplusplus */
267 #endif /* HERWIGOPTS_H */
const char * repo_help
Repository file to use.
Definition: herwigopts.h:103
unsigned int noexitonerror_given
Whether noexitonerror was given.
Definition: herwigopts.h:129
unsigned int prepend_read_min
Prepend a search path for the read command.
Definition: herwigopts.h:88
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
Definition: herwigopts.h:140
int resume_flag
Try to resume execution from an earlier interrupted run.
Definition: herwigopts.h:106
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
const char * seed_help
The random number generator seed.
Definition: herwigopts.h:52
const char * debug_fpe_help
Enable floating point exceptions.
Definition: herwigopts.h:60
Where the command line options are stored.
Definition: herwigopts.h:42
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.
unsigned int jobs_given
Whether jobs was given.
Definition: herwigopts.h:118
char * cachedir_arg
Matchbox cache directory.
Definition: herwigopts.h:69
int seed_arg
The random number generator seed.
Definition: herwigopts.h:50
unsigned int help_given
Whether help was given.
Definition: herwigopts.h:109
const char * prepend_read_help
Prepend a search path for the read command.
Definition: herwigopts.h:90
char * debug_orig
Set the ThePEG debug level.
Definition: herwigopts.h:57
char * seed_orig
The random number generator seed.
Definition: herwigopts.h:51
char * repo_orig
Repository file to use.
Definition: herwigopts.h:102
unsigned int cachedir_given
Whether cachedir was given.
Definition: herwigopts.h:120
int debug_fpe_flag
Enable floating point exceptions.
Definition: herwigopts.h:59
unsigned int append_read_min
Append a search path for the read command.
Definition: herwigopts.h:83
unsigned int prepend_read_given
Whether prepend-read was given.
Definition: herwigopts.h:125
const char * append_read_help
Append a search path for the read command.
Definition: herwigopts.h:85
char * jobid_orig
Integrate the given integration job.
Definition: herwigopts.h:79
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
unsigned int numevents_given
Whether numevents was given.
Definition: herwigopts.h:112
const char * jobs_help
Number of jobs to run in parallel (max 10).
Definition: herwigopts.h:65
char * tag_arg
A tag to append to the run name.
Definition: herwigopts.h:53
const char * gengetopt_args_info_help[]
all the lines making the help output
const char * cachedir_help
Matchbox cache directory.
Definition: herwigopts.h:71
const char * gengetopt_args_info_purpose
the purpose string of the program
unsigned int append_min
Append a search path for dynamically loaded libraries.
Definition: herwigopts.h:93
const char * maxjobs_help
The maximum number of integration jobs to be created (build only).
Definition: herwigopts.h:77
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
The additional parameters to pass to parser functions.
Definition: herwigopts.h:137
long numevents_arg
Number of events to generate.
Definition: herwigopts.h:47
const char * jobid_help
Integrate the given integration job.
Definition: herwigopts.h:80
const char * debug_help
Set the ThePEG debug level.
Definition: herwigopts.h:58
char ** prepend_orig
Prepend a search path for dynamically loaded libraries.
Definition: herwigopts.h:97
const char * prepend_help
Prepend a search path for dynamically loaded libraries.
Definition: herwigopts.h:100
unsigned int maxjobs_given
Whether maxjobs was given.
Definition: herwigopts.h:122
const char * setupfile_help
An input file to modify run parameters.
Definition: herwigopts.h:68
const char * append_help
Append a search path for dynamically loaded libraries.
Definition: herwigopts.h:95
void cmdline_parser_print_full_help(void)
Print the full help (including hidden options)
unsigned int seed_given
Whether seed was given.
Definition: herwigopts.h:113
unsigned int append_given
Whether append was given.
Definition: herwigopts.h:126
int jobs_arg
Number of jobs to run in parallel (max 10).
Definition: herwigopts.h:63
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure&#39;s fields (also set default values for options th...
char * numevents_orig
Number of events to generate.
Definition: herwigopts.h:48
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
char * jobs_orig
Number of jobs to run in parallel (max 10).
Definition: herwigopts.h:64
const char * quiet_help
Disable event counter.
Definition: herwigopts.h:62
char ** prepend_read_orig
Prepend a search path for the read command.
Definition: herwigopts.h:87
char ** append_read_arg
Append a search path for the read command.
Definition: herwigopts.h:81
unsigned int repo_given
Whether repo was given.
Definition: herwigopts.h:128
char ** append_read_orig
Append a search path for the read command.
Definition: herwigopts.h:82
unsigned int append_read_given
Whether append-read was given.
Definition: herwigopts.h:124
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
const char * gengetopt_args_info_full_help[]
all the lines making the full help output (including hidden options)
const char * version_help
Print version and exit help description.
Definition: herwigopts.h:46
unsigned int resume_given
Whether resume was given.
Definition: herwigopts.h:130
unsigned int setupfile_given
Whether setupfile was given.
Definition: herwigopts.h:119
unsigned int full_help_given
Whether full-help was given.
Definition: herwigopts.h:110
char * cachedir_orig
Matchbox cache directory.
Definition: herwigopts.h:70
char ** prepend_read_arg
Prepend a search path for the read command.
Definition: herwigopts.h:86
unsigned int debug_fpe_given
Whether debug-fpe was given.
Definition: herwigopts.h:116
const char * noexitonerror_help
If set, ThePEG will not try to recover from failures, but will exit with a non-zero return code...
Definition: herwigopts.h:105
long maxjobs_arg
The maximum number of integration jobs to be created (build only).
Definition: herwigopts.h:75
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
unsigned int quiet_given
Whether quiet was given.
Definition: herwigopts.h:117
char * repo_arg
Repository file to use.
Definition: herwigopts.h:101
char * setupfile_orig
An input file to modify run parameters.
Definition: herwigopts.h:67
char * jobid_arg
Integrate the given integration job.
Definition: herwigopts.h:78
const char * tag_help
A tag to append to the run name.
Definition: herwigopts.h:55
char * setupfile_arg
An input file to modify run parameters.
Definition: herwigopts.h:66
unsigned int debug_given
Whether debug was given.
Definition: herwigopts.h:115
const char * resume_help
Try to resume execution from an earlier interrupted run.
Definition: herwigopts.h:107
char ** prepend_arg
Prepend a search path for dynamically loaded libraries.
Definition: herwigopts.h:96
unsigned inputs_num
unamed options number
Definition: herwigopts.h:133
unsigned int jobsize_given
Whether jobsize was given.
Definition: herwigopts.h:121
int noexitonerror_flag
If set, ThePEG will not try to recover from failures, but will exit with a non-zero return code...
Definition: herwigopts.h:104
const char * jobsize_help
The number of subprocesses to integrate per job (build only).
Definition: herwigopts.h:74
const char * help_help
Print help and exit help description.
Definition: herwigopts.h:44
long jobsize_arg
The number of subprocesses to integrate per job (build only).
Definition: herwigopts.h:72
char ** append_arg
Append a search path for dynamically loaded libraries.
Definition: herwigopts.h:91
unsigned int prepend_min
Prepend a search path for dynamically loaded libraries.
Definition: herwigopts.h:98
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
Definition: herwigopts.h:143
int quiet_flag
Disable event counter.
Definition: herwigopts.h:61
unsigned int tag_given
Whether tag was given.
Definition: herwigopts.h:114
unsigned int append_read_max
Append a search path for the read command.
Definition: herwigopts.h:84
char ** append_orig
Append a search path for dynamically loaded libraries.
Definition: herwigopts.h:92
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
Definition: herwigopts.h:142
unsigned int append_max
Append a search path for dynamically loaded libraries.
Definition: herwigopts.h:94
int check_required
whether to check that all required options were provided (default 1)
Definition: herwigopts.h:141
char * jobsize_orig
The number of subprocesses to integrate per job (build only).
Definition: herwigopts.h:73
void cmdline_parser_print_help(void)
Print the help.
const char * numevents_help
Number of events to generate.
Definition: herwigopts.h:49
const char * full_help_help
Print help, including hidden options, and exit help description.
Definition: herwigopts.h:45
int debug_arg
Set the ThePEG debug level.
Definition: herwigopts.h:56
unsigned int jobid_given
Whether jobid was given.
Definition: herwigopts.h:123
char * maxjobs_orig
The maximum number of integration jobs to be created (build only).
Definition: herwigopts.h:76
const char * gengetopt_args_info_description
the description string of the program
void cmdline_parser_print_version(void)
Print the version.
char ** inputs
unamed options (options without names)
Definition: herwigopts.h:132
const char * gengetopt_args_info_usage
the usage string of the program
unsigned int prepend_given
Whether prepend was given.
Definition: herwigopts.h:127
unsigned int prepend_read_max
Prepend a search path for the read command.
Definition: herwigopts.h:89
char * tag_orig
A tag to append to the run name.
Definition: herwigopts.h:54
unsigned int version_given
Whether version was given.
Definition: herwigopts.h:111
unsigned int prepend_max
Prepend a search path for dynamically loaded libraries.
Definition: herwigopts.h:99