Difference between revisions of "How to Add Constants"

From GlueXWiki
Jump to: navigation, search
(General Issues)
Line 3: Line 3:
 
==General Issues==
 
==General Issues==
  
The calibration constant database used by GlueX is the [[Calibration Database | CCDB]] software package.  The CCDB provides a feature-rich package for managing calibration constants, . Two different database backends are supported.  The master database is stored in a MySQL database, which is accessible both inside and outside JLab.  Standalone SQLite files are also supported for a variety of uses, including testing and running on batch farms.  Directions for managing SQLite files can be found here.
+
The calibration constant database used by GlueX is the [[Calibration Database | CCDB]] software package.  The CCDB provides a feature-rich package for managing calibration constants, with a rich support for history under the philosophy that constants and tables should always be added but never deleted. Two different database backends are supported.  The master database is stored in a MySQL database, which is accessible both inside and outside JLab.  Standalone SQLite files are also supported for a variety of uses, including testing and running on batch farms.  Directions for managing SQLite files can be found [[SQLite-form_of_the_CCDB_database|here]].
  
 
To run the CCDB program with a standalone SQLite DB, the CCDB_CONNECTION environmental variable should be set like this: (Note: csh syntax is used in this page)
 
To run the CCDB program with a standalone SQLite DB, the CCDB_CONNECTION environmental variable should be set like this: (Note: csh syntax is used in this page)

Revision as of 22:03, 27 July 2014

General Issues

The calibration constant database used by GlueX is the CCDB software package. The CCDB provides a feature-rich package for managing calibration constants, with a rich support for history under the philosophy that constants and tables should always be added but never deleted. Two different database backends are supported. The master database is stored in a MySQL database, which is accessible both inside and outside JLab. Standalone SQLite files are also supported for a variety of uses, including testing and running on batch farms. Directions for managing SQLite files can be found here.

To run the CCDB program with a standalone SQLite DB, the CCDB_CONNECTION environmental variable should be set like this: (Note: csh syntax is used in this page)

setenv CCDB_CONNECTION sqlite:////path/to/sqlite.ccdb

To connect to the main MySQL database, set CCDB_CONNECTION like:

setenv CCDB_CONNECTION mysql://ccdb_user@hallddb.jlab.org/ccdb

The creation of database tables is the beyond the scope of this page. For now, the best documentation is the excellent online help, which can be seen with the command "ccdb help mktbl". Please exercise caution since by design CCDB tables should not be deleted, and make such changes in consultation with the Calibration and Software Coordinators.

Adding Constants

ccdb add /FCAL/gains new_gains_file

Digi-level Constants