2002-08-19 18:43:10 +00:00
|
|
|
<title>Operational Tools: Work and Results</title>
|
2002-08-20 23:54:17 +00:00
|
|
|
<body bgcolor=ffffff>
|
2002-07-29 19:01:38 +00:00
|
|
|
<h2>Operational Tools: Work and Results</h2>
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
Workunits and results can be created using either a utility program
|
2002-07-29 19:01:38 +00:00
|
|
|
or a C++ function.
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
The program
|
2002-05-24 04:29:10 +00:00
|
|
|
<pre>
|
|
|
|
create_work
|
|
|
|
-appname name
|
|
|
|
-wu_name name
|
|
|
|
-wu_template file
|
|
|
|
-result_template file
|
|
|
|
-nresults n
|
|
|
|
infile_1 ... infile_m
|
2002-07-29 19:01:38 +00:00
|
|
|
</pre>
|
2002-08-19 18:43:10 +00:00
|
|
|
<p> <b>-appname</b> specifies the name of the application
|
|
|
|
<p> <b>-wu_name</b> gives the name of the workunit.
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
<b>-wu_template</b> gives the filename of a template for the
|
|
|
|
workunit XML document.
|
|
|
|
This template is macro-substituted as follows:
|
2002-05-24 04:29:10 +00:00
|
|
|
<ul>
|
2002-08-19 18:43:10 +00:00
|
|
|
<li>
|
|
|
|
<INFILE_n/> is replaced with the name of the nth input
|
2002-07-29 19:01:38 +00:00
|
|
|
file.
|
2002-08-19 18:43:10 +00:00
|
|
|
<li>
|
|
|
|
<MD5_n/> is replaced with the MD5 checksum of the nth
|
2002-07-29 19:01:38 +00:00
|
|
|
input file.
|
2002-08-19 18:43:10 +00:00
|
|
|
<li>
|
|
|
|
<WU_NAME/> is replaced with the workunit name.
|
2002-05-24 04:29:10 +00:00
|
|
|
</ul>
|
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
<b>-result_template</b> gives the filename of a template for the
|
|
|
|
result XML document.
|
|
|
|
This template is macro-substituted as follows:
|
2002-05-24 04:29:10 +00:00
|
|
|
<ul>
|
2002-08-19 18:43:10 +00:00
|
|
|
<li>
|
|
|
|
<OUTFILE_n> is replaced with a string of the form
|
2002-07-29 19:01:38 +00:00
|
|
|
"wuname_resultnum_n" where wuname is the workunit name and resultnum is
|
|
|
|
the ordinal number of the result (0, 1, ...).
|
2002-08-19 18:43:10 +00:00
|
|
|
<li>
|
|
|
|
<WU_NAME> is replaced with the workunit name.
|
|
|
|
<li>
|
|
|
|
<RESULT_NAME> is replaced with a string of the form
|
2002-07-29 19:01:38 +00:00
|
|
|
"wuname_resultnum".
|
2002-05-24 04:29:10 +00:00
|
|
|
</ul>
|
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
<b>-nresults</b> gives the number of results to be created.
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
<b>infile_1 ... infile_m</b> are the names of the input files.
|
2002-05-24 04:29:10 +00:00
|
|
|
<hr>
|
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
The C++ library (backend_lib.C,h) provides the function:
|
2002-05-24 04:29:10 +00:00
|
|
|
<pre>
|
|
|
|
int create_work(
|
|
|
|
int appid,
|
|
|
|
char* wu_name,
|
|
|
|
char* wu_template,
|
|
|
|
char* result_template,
|
|
|
|
int nresults,
|
|
|
|
char* infile_dir,
|
|
|
|
char** infiles,
|
|
|
|
int ninfiles
|
|
|
|
);
|
2002-07-29 19:01:38 +00:00
|
|
|
</pre>
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
This creates a workunit and one or more results.
|
|
|
|
The arguments are
|
2002-07-29 19:01:38 +00:00
|
|
|
the same as for the utility program, except that the application is
|
|
|
|
identified by its database ID.
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
"infile_dir" is the path of the directory containing the input
|
2002-07-29 19:01:38 +00:00
|
|
|
files.
|
2002-05-24 04:29:10 +00:00
|
|
|
<p>
|
2002-08-19 18:43:10 +00:00
|
|
|
"infiles" is an array of names of the input files, of length "ninfiles".
|