!!Hooks

SimTree handles some of its internal operations through so-called hooks.
A hook is a script template containing replaceable parameters. When SimTree
executes a hook, it takes the template and instantiates the replaceable
parameters with concrete values suitable for the currently required operation.

The interface of the built-in hooks is NOT guaranteed to be compatible between
SimTree version or even SimTree patch revisions. It is up to the user to
trace changes in the built-in hooks and adapt its own hooks.

For each operation which is executed through a hook, a default hook file template
is builtin into SimTree. The user may replace such a hook file template with a customized
implementation by creating a file in the directoy <StudyRoot>/<MetaData>/Hooks.
A user provided hook file template must have the same name as the builtin
template.

It is advisable to use the builtin templates as starting points
and modify them as appropriate. The builtin templates may be retrieved
by extracting them from the SimTree jar-File in the subdirectory
./res/hooks.

Hook script files which are only used during the execution time of the
current SimTree process are created in the directory <StudyRoot>/Temp
and deleted after the SimTree process, which has created them, has finished.

The following hooks are currently used:

* simtree-callsim: This script is used to start a simulation or collect run. In this
  the simulation binary is called and the created log files are examined and packed when
  requested. This script handles the execution on the lowest layer of the call
  hierarchy.

* execute-simprog-local: This script is called when a simulation or collect run has to be started
  on the local host. It calls itself SimTree with specific parameters which itself
  lead to calling simtree-callsim.

. This script may be used to submit SimTree jobs to a batch queuing system. When this
  script returns immeadetely after submitting the job, the main SimTree process will return
  also after all jobs are submitted.

* execute-simprog-remote: This script is called when a simulation or collect run has to be started
  on an remote host. Besides this it works like execute-simprog-local.

* condition-notifier: This script is called when certain conditions during the operation
  of SimTree are reached. This script must not do nothing which affects the operation of
  SimTree. The default implementation allows sending mail to the user on certain conditions.
  On which conditions a mail is sent is customizable through properties (see documentation
  in properties file).
