Previous: Defining objects
Up: Tutorial
Next: Command line arguments
Previous Page: Defining objects
Next Page: Command line arguments

.dspackrc file

$DSPACK_HOME/doc/tutorial contains a file called dspackrc_1. (by now it should be in the dspack_test/tutorial). This file may be used as a start-up file for any DSPACK program.


dspack.*.print             : dspackrc_1 file in $DSPACK_HOME/doc/tutorial

dspack.example_1.print : ********************* dspack.example_1.print : * This is Example 1 * dspack.example_1.print : ********************* dspack.example_1.echo : on dspack.example_1.errors : all : dspack_tut_1.d dspack.example_1.end :

This file executes the initial commands which the user had to type in the example above. By default DSPACK looks for a file called .dspackrc in the current directory or in the user's home directory but we can change it by setting environment variable $DSPACKRC.

Running Example 1 with dspackrc file

examples> setenv DSPACKRC ../dspackrc\_1

examples> example_1 dspackrc_1 file in $DSPACK_HOME/doc/tutorial ********************* * This is Example 1 * ********************* DSPACK 1.129, 30 Jun 1994 * * ******************************************************************** * * * *$$ * dspack_tut_1.d DSPACK tutorial - example 1 * * * * * ******************************************************************** * DEFINE V3 R 0 ! A template for three real numbers "X component" x "Y component" y "Z component" z END DEFINE

DEFINE track_t S 1 ! define structure track_t, section 1 V3 start ! start position V3 p ! momentum V3 d ! position errors V3 dp ! momentum errors .REAL4 charge .REAL4 chisq .INT4 n_hits .INT4 flags(2) point_t *point_p ! pointer to first hit vertex_t *vertex_p ! pointer to vertex structure track_t *nextvt_p ! pointer to next vertex track END DEFINE DS_FIXPNT Warning: Void pointer: point_t DS_FIXPNT Warning: From: track_t DS_FIXPNT Warning: Void pointer: vertex_t DS_FIXPNT Warning: From: track_t

dsdb> quit


Fri Nov 4 01:54:15 MET 1994