evalusr command



evalusr usrfct 
      | files 
      / outfile() userstr() 
        debug

Purpose

Evaluate via user function.

Parameters

usrfct
Name of a an executable file with a user supplied evaluation function, created by means of the trxfct script.
files
List of input listmode track files to be evaluated. If no files are specified and this command is given before the simulation is run, the listmode data are directly passed to the evaluation routine.
outfile(filename)
Name of the file to receive the evaluated data.
userstr(string)
User specified string, passed "as is" to the evalusr function. It may be used to specify any user specific information.
debug
Debug switch. Lots of output !

Remarks

Note that in order for the created executable to be loadable, the library search path has to be adapted before TRAX is called, to include the current directory on some platforms:

   export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH # Linux, Solaris, IRIX
   export SHLIB_PATH=.:$SHLIB_PATH           # HP-UX
   export LIBPATH=.:$LIBPATH                 # AIX

Examples

An example for a user function. Adapt it according to your needs, i.e. delete the "user specific" parts and fill them with appropriate code. The event structures passed to this function are described in trxparticle.h and trxlmd.h.
Then compile and link:
   trxfct trxevalusr
Note that this requires the $TRAX environment variable to be properly set to the TRAX installation directory.
An example to run with a user function is here
Last updated: M.Kraemer,
$Id: traxcmdevalusr.html,v 1.7 2019/03/17 22:57:47 kraemer Exp $