There are actually three distinct Tcl APIs:
Encapsulates much of the C++ API. The missing pieces are event recording as this is not anticipated to be something done directly from Tcl. If this becomes needed, then let us know and we can consider adding that for a future release.
A package intended only for use in SpecTcl. Provides an API against which SpecTcl GUIs can be written to manage savesets. This also does not address recording event data.
This is intended only for use in SpecTcl and provides the API required to set up and tear dow the infrastructure needed to record event data to a saveset.
We will provide reference material for each of these in turn in separate subsections.
The raw API consists of three command ensembles.
This command ensemble provides the ability to create new databases and open existing databases.
These command ensembles are dynamically created with unique base commands. When DBTcl opens a database, a new Database instance command ensemble is created and its base command returned to the application.
The Database instance ensembles can create and access save sets within the database.
Saveset instances are also dynamically created command ensembles. When a Database instance command accesses a save set it generates a new ensemble with a unique command name.
Thus only the DBTcl command is a fixed command. You can think of Database instances and Saveste instances a objects whose subcommands are callable methods.
The SpecTcl API contains procs that SpecTcl uses to access the database. While it provides a higher level model of the database, it makes extensive use of SpecTcl commands and therefore is highly SpecTcl specific.
The procs are defined in the dbconfig package and all are defined in the dbconfig namespace. This section provides reference information about these procs.
The event recording API consist of Tcl commands that allow clients to set up SpecTcl event recording into database save sets. When enabled, each time a begin run for a new run is seen, a new save-set is created, the current configuration saved to it, and events and scaler data are added to that saveset. The first time an end run record is encountered for a run, the end run time from that record is recorded and the contents of any spectrum marked for auto-save are saved.
The Event recording API has been subsumed into the SpecTclDB package. We supply reference documentation here to support user written graphical user interfaces that support event recording.