next up previous contents
Next: STAF - Primary and Up: STAR Software Infrastructure Tools Previous: STAF - Physics Analysis

STAF - Sorting Out The Many Names for STAF Tables

  Many names are associated with a given STAF table. There are the C-struct definition name or table type name, the table idl filename, the STAF run time table name(s), and the local name(s) in the various PAMs which use this table. Consider a table type defined in an idl file in the fictitious package abc. The table type name in the idl file must have the form,


     abc_tabletypename1

and the idl filename is required to be


     abc_tabletypename1.idl

A table type defined in STAF at run time need not be associated with any particular package, for example, using the tdm/newtable command we could define a new table type called,


     tabletypename2

From either of these table types a table (instance) may be created in STAF via the tdm/newtable command resulting in a specific instance, for example


     table_instance_name1, table_instance_name2

which would be the names used to refer to these tables in the other STAF commands. The local table name in a PAM might be, for example,


     local_table_name1

The table type name, run time table name and local table name are related to each other as follows. The local table name in a given PAM is related to its table type in the PAM idl file in the `amiModule' statement. The run time table name is related to the PAM local table name through the STAF ami/module/call command (see following tutorials). The compatibility between the table which is passed to the module at run time and the type definition in the PAM.idl file is automatically checked by STAF.

An example of using all these various names to refer to the same data structure is provided in the TPC tracking package, /ana/tpt, and the TPC fast simulator/tracking example in the following tutorials. For the TPC track table, the table type name is defined to be


     tpt_track

in the idl file tpt_track.idl in package tpt/inc. The TPC tracking module tpt.F refers to this track table by the local name


     track

In the tpt.idl file the last line in the interface amiModule statement associates the table type tpt_track with the local name track used in the module. In the TPC fast simulator/tracking example that we will study in the following tutorials, the TPC track table is declared at run time in STAF to be


     tptrack

and is placed within a defined DataSet (UNIX-like directory) in STAF. When the TPC tracking module is called by the ami/module/call STAF command, the last table name listed is the instance name, tptrack.

This table type, table (instance) and local table naming scheme is confusing at first, but provides significant new capabilities for STAR computing.


next up previous contents
Next: STAF - Primary and Up: STAR Software Infrastructure Tools Previous: STAF - Physics Analysis
Lanny Ray
2/20/1998