The table type and table feature of STAF permits repetitive use of previously defined table types for specific, run time applications. An example of this would be a single TPC pixel table type for one super-sector with 24 tables for each of the 24 TPC super-sectors. Tables may be created and placed in the same or in different STAF datasets, provided the usual precautions are taken to avoid naming conflicts.
Table type idl definition files are located in the PKG/inc subdirectories for SL97b. The maximum number of rows (memory allocation) and the number of rows actually used during processing may be set or changed (increased or decreased) during run time either using the TDM ASP commands or using programming statements in the PAM source code. The necessary Fortran include files and the C/C++ *.h files for these structures are generated automatically by the STAR Library make procedures.
The most common method in STAF for defining table types is with the table idl file. See for example the TPC track table type definition tpt_track.idl. The table idl files contain the filename identifier and other comments, followed by the declaration and definitions of variables. Note in the example that one-dimensional arrays are allowed and how these are declared. Table types are public and may be used by any other PKG in the STAR Library.
Table types may be declared in STAR at run time using the tdm/newtable command. When this ASP is used to declare a new table type the variable declarations are embedded in the command line. Examples of these commands are given in the following tutorials.
The list of allowed variable types in STAF SL97b are:
IDL ANSI-C C++ FORTRAN 77 _______________________________________________________________________ short short short INTEGER*2 unsigned short unsigned short unsigned short INTEGER*2 long long long INTEGER*4 unsigned long unsigned long unsigned long INTEGER*4 char char char CHARACTER*1 octet unsigned char unsigned char LOGICAL*1 float float float REAL*4 double double double REAL*8 _______________________________________________________________________
Except for the creation of new table types, STAF commands refer to table names as illustrated in the following tutorials.