Chapter 2. What you can do with the SpecTcl Sqlite database package.

Databases are useful when storing data that has some well defined format and capturing the relationships between those data. SpecTcl data analysis configurations, spectra and even event data match that description. Below, let's look at glossary of terms that will be used throughout the rest of this manual. The glossary will also give an idea of what the SpecTcl Sqlite data package can do in conjunction with SpecTcl.

Database

In this manual database means a relational database, specifically and sqlite3 database. Sqlite3 databases live in a file. While there are mechanisms to join several files together int one database, these are not used by this package.

Relational databases have a schema that describes a set of tables. Each table has several fields. Fields in one table can link rows of that table to rows of a nother table. These are the relations in relational databases.

The SpecTcl database package provides schema definitions and code to manipulate an Sqlite3 database file to store several types of objects interesting to SpecTcl.

Save Set

A saved set is a named entity that stores objects. Save sets are analgous to directories. Each save set owns a set of objects that are stored and can be retrieved. Save sets provide a mechanism for users to organize the data saved in the database and to tag related data with a user friendly name.

Configuration

One of the things that can be stored in a save set is a configuration. A configuration is the SpecTcl analysis configuration at some point in time. This includes parameter and tree parameter definitions, Spectrum definitions, gate definitions, the application of gates to spectra and tree variables and their values.

Configurations represent repeatable SpecTcl analysis conditions.

Spectra

SpecTcl's purpose in life is to produce histograms, which it calls spectra. The contents of one or more spectra can be saved in a save set. This represents the products of an analysis of a specific run. It is normal, though not required, that spectra be saved in the same saveset as the configuration that produced them.

Event Data

When SpecTcl analyzes raw data, either from a data file or from an online data source, the first thing it does is pass each event through a user define event processing pipeline. The purpose of that pipeline is to extract useful parameters from the raw data into raw parameters or tree parameters. SpecTcl then histograms these unpacked parameters.

It is possible to save the parameters extraced from raw data for a run in a save set. When this done, subsequent playback of the run from the save set is much faster than from the original raw data set. This is because the entire user event processing pipline, which is normally where the majority of the time is spent, is completely bypasssed.

This capability provides a mechanism to quickly reply runs over and over again, optimizing the analysis configuration in SpecTcl. It also provides an analysis neutral format from which, theoretically, any other analysis program can analyze the data.