next up previous contents index
Next: Fortran Application Interface Up: CTP Definition Files Previous: Include files   Contents   Index

Registering Local Variables

The variables used in CTP input files generally need to be registered in the analyzer. However, as some of the examples here show, there are many uses for CTP variables that are not known to the analyzer code. The uses of these variables, known as local variables, might be used as test results variables, locally calculated quantities to histogram, constants used to setting other parameters or array indices, etc.

When a CTP parameter, test, or gethit block is booked, any unregistered result variables will be created automatically. However, CTP may not always create the variables with the desired data type. Furthermore, CTP will print out a warnings when variables has been registered automatically. As these warnings can be disconcerting to the user and they can guide in identifying variables that the analyzer programmer has failed to properly register, a means has been provided to register variables within CTP blocks.

Some examples:

#integer.test allclean
#integer goodparticle, electron
#double.event missingmass
#real positions(10), emass

The allowed types are integer, real, double, and string. The types may be optionally qualified with a class, usually parm, test, or event.


next up previous contents index
Next: Fortran Application Interface Up: CTP Definition Files Previous: Include files   Contents   Index
Mohammad Ahmed 2003-07-23